diff --git a/src/crab/thumb/software_interrupt.cr b/src/crab/thumb/software_interrupt.cr index 4699de7..bc21d1b 100644 --- a/src/crab/thumb/software_interrupt.cr +++ b/src/crab/thumb/software_interrupt.cr @@ -1,6 +1,6 @@ module THUMB def thumb_software_interrupt(instr : Word) : Nil - lr = @r[15] - 4 + lr = @r[15] - 2 switch_mode CPU::Mode::SVC set_reg(14, lr) @cpsr.irq_disable = true