comparison python/ppci/target/basetarget.py @ 381:6df89163e114

Fix section and ldr pseudo instruction
author Windel Bouwman
date Sat, 26 Apr 2014 17:41:56 +0200
parents 39bf68bf1891
children d056b552d3f4
comparison
equal deleted inserted replaced
380:67a584582aee 381:6df89163e114
13 def relocations(self): 13 def relocations(self):
14 return [] 14 return []
15 15
16 def symbols(self): 16 def symbols(self):
17 return [] 17 return []
18
19 def literals(self, add_literal):
20 pass
18 21
19 22
20 class Nop(Instruction): 23 class Nop(Instruction):
21 """ Instruction that does nothing and has zero size """ 24 """ Instruction that does nothing and has zero size """
22 def encode(self): 25 def encode(self):
136 """ Lower instructions from frame to output stream """ 139 """ Lower instructions from frame to output stream """
137 for im in frame.instructions: 140 for im in frame.instructions:
138 if isinstance(im.assem, Instruction): 141 if isinstance(im.assem, Instruction):
139 outs.emit(im.assem) 142 outs.emit(im.assem)
140 else: 143 else:
144 # TODO assert isinstance(Abs
141 ins = self.lower_functions[im.assem](im) 145 ins = self.lower_functions[im.assem](im)
142 outs.emit(ins) 146 outs.emit(ins)
143 147
144 def add_lowering(self, cls, f): 148 def add_lowering(self, cls, f):
145 """ Add a function to the table of lowering options for this target """ 149 """ Add a function to the table of lowering options for this target """