Fix arm PUSH (#141)

If sp is in the list, it gets pushed incorrectly because it gets
updated by the stack_pushes for registers that occur before it
This commit is contained in:
Mark Mossberg
2017-04-18 14:00:13 -04:00
committed by GitHub
parent 398e4d2510
commit 531f245817
+2 -2
View File
@@ -626,9 +626,9 @@ class Armv7Cpu(Cpu):
@instruction
def PUSH(cpu, *regs):
high_to_low_regs = regs[::-1]
high_to_low_regs = [r.read() for r in regs[::-1]]
for reg in high_to_low_regs:
cpu.stack_push(reg.read())
cpu.stack_push(reg)
@instruction