Skip to content

Commit

Permalink
helo5 scceeded.
Browse files Browse the repository at this point in the history
  • Loading branch information
unnohideyuki committed Jan 12, 2015
1 parent 998f0ae commit a98b2c4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions final/helo5.tig
@@ -0,0 +1 @@
for i := 1 to 5 do print("Hello, world!\n")
2 changes: 1 addition & 1 deletion final/src/Assem.hs
Expand Up @@ -95,7 +95,7 @@ binOper binop dst src =
concat [s1, s2, s3, s4, s5, s6]
in
OPER { oper_assem = assem
, oper_dst = dst
, oper_dst = dst ++ src -- src should be protected
, oper_src = src
, oper_jump = Nothing
}
Expand Down
2 changes: 1 addition & 1 deletion final/src/MakeGraph.hs
Expand Up @@ -164,9 +164,9 @@ trInsts [] = return ()
trInsts (A.LABEL{A.lab_lab=lab}:insts) =
do
node <- newNode
add_edge (Known node) NextInstr
insertLabel lab node
solve_labeled_edges lab node
add_edge (Known node) NextInstr
set_def node []
set_use node []
set_ismove node False
Expand Down
6 changes: 3 additions & 3 deletions final/tandorc.hs
Expand Up @@ -58,8 +58,8 @@ compile_frags (frg:frgs) t s =
Just c -> "v" ++ show (c + 2)
_ -> error $ "mkString error: " ++ (show n) ++ "\n"

-- str = concat $ fmap (A.format mkString) insts
str = concat $ fmap (A.format Temp.makeString) insts
str = concat $ fmap (A.format mkString) insts
-- str = concat $ fmap (A.format Temp.makeString) insts

hdr =
".method public static "
Expand All @@ -71,7 +71,7 @@ compile_frags (frg:frgs) t s =

ftr = "nop\n.end method\n"
in
compile_frags frgs t' (s ++ hdr ++ str ++ ftr ++ show colmap ++ show adjListMap ++ show outs ++ show (zip [0..] insts) ++ show g)
compile_frags frgs t' (s ++ hdr ++ str ++ ftr)

printPreamble :: IO ()
printPreamble = do
Expand Down

0 comments on commit a98b2c4

Please sign in to comment.