diff python/tcodegen.py @ 279:2ccd57b1d78c

Fix register allocator to do burn2 OK
author Windel Bouwman
date Sat, 12 Oct 2013 09:56:23 +0200
parents 9fca39eebe50
children
line wrap: on
line diff
--- a/python/tcodegen.py	Sun Sep 29 14:08:15 2013 +0200
+++ b/python/tcodegen.py	Sat Oct 12 09:56:23 2013 +0200
@@ -82,6 +82,10 @@
 function int ab(int a, int b)
 {
   var int c;
+  var int *a2;
+  a2 = cast<int*>(2);
+  *a2 = 2;
+  *a2 = *a2 + 2;
   c = 0;
   c = c + a + b;
   return c; 
@@ -127,16 +131,11 @@
     cga = codegenarm.ArmCodeGenerator(outs)
     ir2 = cga.generate(irc)
 
-    #with open('cfg.gv', 'w') as cfg_file:
-    #    dump_cfg(cga, cfg_file)
+    with open('cfg.gv', 'w') as cfg_file:
+        dump_cfg(cga, cfg_file)
 
-    #with open('ig.gv', 'w') as ig_file:
-    #    dump_ig(cga, ig_file)
+    with open('ig.gv', 'w') as ig_file:
+        dump_ig(cga, ig_file)
         
-    #for f in ir2:
-    #    print(f)
-    #    for i in f.instructions:
-    #        print('   {}'.format(i))
-
     outs.dump()