diff python/target/armframe.py @ 341:4d204f6f7d4e devel

Rewrite of assembler parts
author Windel Bouwman
date Fri, 28 Feb 2014 18:07:14 +0100
parents e9fe6988497c
children
line wrap: on
line diff
--- a/python/target/armframe.py	Sun Feb 23 16:24:01 2014 +0100
+++ b/python/target/armframe.py	Fri Feb 28 18:07:14 2014 +0100
@@ -3,7 +3,7 @@
 from .basetarget import Imm7
 from ppci.irmach import makeIns, Frame
 from .arminstructions import Dcd, AddSp, SubSp, Push, Pop, Mov2
-from .arminstructions import R0, R1, R2, R3, R4, R5, R6, R7, LR, PC, SP
+from .armregisters import R0, R1, R2, R3, R4, R5, R6, R7, LR, PC, SP
 
 
 class ArmFrame(Frame):
@@ -64,7 +64,7 @@
             Push({LR, R7})
             ]
         if self.stacksize > 0:
-            pre.append(SubSp(SP, SP, Imm7(self.stacksize)))  # Reserve stack space
+            pre.append(SubSp(self.stacksize))  # Reserve stack space
         pre += [
             Mov2(R7, SP)                          # Setup frame pointer
             ]
@@ -74,7 +74,7 @@
         """ Return epilogue sequence for a frame. Adjust frame pointer and add constant pool """
         post = []
         if self.stacksize > 0:
-            post.append(AddSp(SP, SP, Imm7(self.stacksize)))
+            post.append(AddSp(self.stacksize))
         post += [
             Pop({PC, R7}),
             Alignment(4)   # Align at 4 bytes