fix(tests): Fix thumb t225

THUMB 14: Push / pop do not align base


Former-commit-id: e8f511387edf5bd2f3991558f7757f997d0289c7
This commit is contained in:
Michel Heily 2020-01-17 13:04:14 +02:00
parent da7f66890d
commit 5b90223717

View file

@ -12,10 +12,9 @@ fn push(cpu: &mut Core, bus: &mut SysBus, r: usize) {
bus.write_32(stack_addr, cpu.get_reg(r))
}
fn pop(cpu: &mut Core, bus: &mut SysBus, r: usize) {
let stack_addr = cpu.gpr[REG_SP] & !3;
let val = cpu.ldr_word(stack_addr, bus);
let val = bus.read_32(cpu.gpr[REG_SP] & !3);
cpu.set_reg(r, val);
cpu.gpr[REG_SP] = stack_addr + 4;
cpu.gpr[REG_SP] += 4;
}
impl Core {