diff python/canon.py @ 279:2ccd57b1d78c

Fix register allocator to do burn2 OK
author Windel Bouwman
date Sat, 12 Oct 2013 09:56:23 +0200
parents 6f2423df0675
children 02385f62f250
line wrap: on
line diff
--- a/python/canon.py	Sun Sep 29 14:08:15 2013 +0200
+++ b/python/canon.py	Sat Oct 12 09:56:23 2013 +0200
@@ -58,7 +58,7 @@
         return frame.parMap[exp]
     elif isinstance(exp, ir.LocalVariable):
         offset = frame.allocVar(exp)
-        return ir.Mem(ir.Binop(frame.fp, '+', ir.Const(offset)))
+        return ir.Add(frame.fp, ir.Const(offset))
     elif isinstance(exp, ir.Mem):
         exp.e = rewriteExp(exp.e, frame)
         return exp