comparison python/target/armtarget.py @ 322:44f336460c2a

Half of use of burg spec for arm
author Windel Bouwman
date Mon, 27 Jan 2014 19:58:07 +0100
parents 534b94b40aa8
children 6f4753202b9a
comparison
equal deleted inserted replaced
321:8c569fbe60e4 322:44f336460c2a
3 from .basetarget import Imm32, Imm8, Imm7, Imm3 3 from .basetarget import Imm32, Imm8, Imm7, Imm3
4 from .arminstructions import allins, Reg8Op, ArmRegister 4 from .arminstructions import allins, Reg8Op, ArmRegister
5 from .arminstructions import Dcd, B 5 from .arminstructions import Dcd, B
6 from .arminstructions import R0, R1, R2, R3, R4, R5, R6, R7, LR, PC, SP 6 from .arminstructions import R0, R1, R2, R3, R4, R5, R6, R7, LR, PC, SP
7 7
8 from .armframe import ArmFrame
9 from .arminstructionselector import ArmInstructionSelector
8 10
9 """ ARM target description. """ 11 """ ARM target description. """
10 12
11 # TODO: encode this in DSL (domain specific language) 13 # TODO: encode this in DSL (domain specific language)
12 # TBD: is this required? 14 # TBD: is this required?
19 for i in allins: 21 for i in allins:
20 self.addInstruction(i) 22 self.addInstruction(i)
21 # TODO: fix this nicer? 23 # TODO: fix this nicer?
22 #setattr(self, i.__name__, i) 24 #setattr(self, i.__name__, i)
23 self.check() 25 self.check()
26 self.ins_sel = ArmInstructionSelector()
27 self.FrameClass = ArmFrame
24 28
25 def startCode(self, outs): 29 def startCode(self, outs):
26 """ Emit some startup code in the output stream """ 30 """ Emit some startup code in the output stream """
27 outs.selectSection('code') 31 outs.selectSection('code')
28 # assembly glue to make it work: 32 # assembly glue to make it work: