Mercurial > lcfOS
diff python/ppci/target/arm/__init__.py @ 398:c0d9837acde8
x86 target refactor
author | Windel Bouwman |
---|---|
date | Thu, 29 May 2014 12:13:37 +0200 |
parents | 2a970e7270e2 |
children |
line wrap: on
line diff
--- a/python/ppci/target/arm/__init__.py Thu May 29 10:47:28 2014 +0200 +++ b/python/ppci/target/arm/__init__.py Thu May 29 12:13:37 2014 +0200 @@ -4,7 +4,8 @@ from ..arm.registers import R8, R9, R10, R11, R12, SP, LR, PC from ..arm.registers import register_range -from .instructions import Dcd, Mov, Mov1, Add, Add2, Sub, Orr1, Mul, Mov2, Add1, Mul1 +from .instructions import Dcd, Mov, Mov1, Add, Add2, Sub, Orr1, Mul, Mov2 +from .instructions import Add1, Mul1 from .instructions import Lsr1, Lsl1, And1, Sub1 from .instructions import B, Bl, Ble, Bgt, Beq, Blt, Cmp, Cmp2 from .instructions import Push, Pop, Str, Ldr, Ldr3, Str1, Ldr1, Adr @@ -26,6 +27,7 @@ self.target.add_instruction(['repeat', 'imm32'], self.begin_repeat) self.target.add_instruction(['endrepeat'], self.end_repeat) + # Construct the parser from the given rules: self.make_parser() self.lit_pool = [] self.lit_counter = 0 @@ -101,7 +103,6 @@ outs.emit(Label(lname)) outs.emit(Dcd(0)) - def make_parser(self): # Assembly grammar: self.add_keyword('r0')