thumb software interrupt fix link register offset

This commit is contained in:
Matthew Berry 2020-11-03 00:04:15 -08:00
parent ba6fde31b1
commit 59769a222c

View file

@ -1,6 +1,6 @@
module THUMB module THUMB
def thumb_software_interrupt(instr : Word) : Nil def thumb_software_interrupt(instr : Word) : Nil
lr = @r[15] - 4 lr = @r[15] - 2
switch_mode CPU::Mode::SVC switch_mode CPU::Mode::SVC
set_reg(14, lr) set_reg(14, lr)
@cpsr.irq_disable = true @cpsr.irq_disable = true