diff python/codegenarm.py @ 212:62386bcee1ba

Added parser combinator lib
author Windel Bouwman
date Sun, 30 Jun 2013 19:00:41 +0200
parents 99164160fb0b
children 494828a7adf1
line wrap: on
line diff
--- a/python/codegenarm.py	Sat Jun 29 10:10:45 2013 +0200
+++ b/python/codegenarm.py	Sun Jun 30 19:00:41 2013 +0200
@@ -35,6 +35,11 @@
             self.emit(arm.jmp_ins(ins.target))
         elif type(ins) is ir.ImmLoad and ins.value < 255:
             self.emit(arm.mov_ins(arm.r0, arm.Imm8(ins.value)))
+            # determine stack frame..
+            self.emit(arm.mov_ins(arm.r1, arm.Imm8(9)))
+            #self.emit(arm.
+        elif type(ins) is ir.ImmLoad and ins.value < (2**32):
+            print(ins)
         elif type(ins) is ir.Store:
             print(ins)
         elif type(ins) is ir.Return:
@@ -43,6 +48,8 @@
             print(ins)
         elif type(ins) is ir.BinaryOperator:
             print(ins)
+        elif type(ins) is ir.ConditionalBranch:
+            print(ins)
         else:
             print(ins)
             raise CompilerError('IR "{}" not covered'.format(ins))