comparison python/codegenarm.py @ 243:ef683881c64e

Remove various files
author Windel Bouwman
date Tue, 23 Jul 2013 16:50:02 +0200
parents 6259856841a0
children e41e4109addd
comparison
equal deleted inserted replaced
242:c94965418684 243:ef683881c64e
86 lname = ins.target.name + '_ivalue' 86 lname = ins.target.name + '_ivalue'
87 self.emit(arm.ldr_pcrel(arm.r0, LabelRef(lname))) 87 self.emit(arm.ldr_pcrel(arm.r0, LabelRef(lname)))
88 self.imms.append((lname, ins.value)) 88 self.imms.append((lname, ins.value))
89 self.emit(arm.str_sprel(arm.r0, arm.MemSpRel(self.addStack(ins.target)))) 89 self.emit(arm.str_sprel(arm.r0, arm.MemSpRel(self.addStack(ins.target))))
90 elif type(ins) is ir.Store: 90 elif type(ins) is ir.Store:
91 print('STORE', ins, self.localVars)
92 # Load value in r0: 91 # Load value in r0:
93 self.loadStack(arm.r0, ins.value) 92 self.loadStack(arm.r0, ins.value)
94 # store in memory: 93 # store in memory:
95 # TODO: split globals and locals?? 94 # TODO: split globals and locals??
96 #self.getGlobal(arm.r1, ins.location) 95 #self.getGlobal(arm.r1, ins.location)
97 # Horrible hack with localVars 96 # Horrible hack with localVars
98 if ins.location in self.localVars: 97 if ins.location in self.localVars:
99 print('local', ins.location) 98 # The value was alloc'ed
100 self.emit(arm.str_sprel(arm.r0, arm.MemSpRel(self.getStack(ins.location)))) 99 self.emit(arm.str_sprel(arm.r0, arm.MemSpRel(self.getStack(ins.location))))
101 else: 100 else:
102 self.loadStack(arm.r1, ins.location) 101 self.loadStack(arm.r1, ins.location)
103 self.emit(arm.storeimm5_ins(arm.r0, arm.MemR8Rel(arm.r1, 0))) 102 self.emit(arm.storeimm5_ins(arm.r0, arm.MemR8Rel(arm.r1, 0)))
104 elif type(ins) is ir.Load: 103 elif type(ins) is ir.Load: