diff python/target/arminstructionselector.py @ 318:e84047f29c78

Add burg and yacc initial attempts
author Windel Bouwman
date Tue, 31 Dec 2013 12:38:15 +0100
parents 56e6ff84f646
children 44f336460c2a
line wrap: on
line diff
--- a/python/target/arminstructionselector.py	Sun Dec 22 15:50:59 2013 +0100
+++ b/python/target/arminstructionselector.py	Tue Dec 31 12:38:15 2013 +0100
@@ -12,9 +12,7 @@
 class ArmInstructionSelector(InstructionSelector):
     """ Instruction selector for the arm architecture """
     def munchExpr(self, e):
-        if isinstance(e, ir.Alloc):
-            return 0
-        elif isinstance(e, ir.Binop) and e.operation == '+' and \
+        if isinstance(e, ir.Binop) and e.operation == '+' and \
             isinstance(e.b, ir.Const) and e.b.value < 8:
             a = self.munchExpr(e.a)
             d = self.newTmp()
@@ -142,4 +140,4 @@
             raise NotImplementedError('Stmt --> {}'.format(s))
 
     def move(self, dst, src):
-        self.emit(Mov2, src=[src], dst=[dst])
+        self.emit(Mov2, src=[src], dst=[dst], ismove=True)