Mercurial > lcfOS
comparison python/target/armtarget.py @ 334:6f4753202b9a
Added more recipes
author | Windel Bouwman |
---|---|
date | Thu, 13 Feb 2014 22:02:08 +0100 |
parents | 44f336460c2a |
children | c7cc54c0dfdf |
comparison
equal
deleted
inserted
replaced
333:dcae6574c974 | 334:6f4753202b9a |
---|---|
23 # TODO: fix this nicer? | 23 # TODO: fix this nicer? |
24 #setattr(self, i.__name__, i) | 24 #setattr(self, i.__name__, i) |
25 self.check() | 25 self.check() |
26 self.ins_sel = ArmInstructionSelector() | 26 self.ins_sel = ArmInstructionSelector() |
27 self.FrameClass = ArmFrame | 27 self.FrameClass = ArmFrame |
28 | |
29 def startCode(self, outs): | |
30 """ Emit some startup code in the output stream """ | |
31 outs.selectSection('code') | |
32 # assembly glue to make it work: | |
33 # TODO: this must be in source code, not in compiler | |
34 outs.emit(Dcd(Imm32(0x20000678))) # initial SP | |
35 outs.emit(Dcd(Imm32(0x08000009))) # reset vector | |
36 outs.emit(B(LabelRef('main'))) |