From: Bernhard Urban Date: Sat, 16 Jun 2012 21:21:57 +0000 (+0200) Subject: codegen: again, a bug regarding BB ordering X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mate.git;a=commitdiff_plain;h=aa0c59209b67bb291a5baa5e944beae0e29722cd codegen: again, a bug regarding BB ordering --- diff --git a/Mate/X86CodeGen.hs b/Mate/X86CodeGen.hs index d09304d..d619879 100644 --- a/Mate/X86CodeGen.hs +++ b/Mate/X86CodeGen.hs @@ -78,7 +78,10 @@ emitFromBB method sig cls hmap = do let calls' = calls `M.union` M.fromList (catMaybes cs) case successor bb of Return -> return (calls', bbstarts') - FallThrough t -> efBB (t, hmap M.! t) calls' bbstarts' lmap + FallThrough t -> do + -- TODO(bernhard): le dirty hax. see java/lang/Integer.toString(int, int) + jmp (getLabel t lmap) + efBB (t, hmap M.! t) calls' bbstarts' lmap OneTarget t -> efBB (t, hmap M.! t) calls' bbstarts' lmap TwoTarget t1 t2 -> do (calls'', bbstarts'') <- efBB (t1, hmap M.! t1) calls' bbstarts' lmap