mirror of
https://github.com/mattrberry/crab.git
synced 2025-01-15 03:40:56 +01:00
thumb software interrupt fix link register offset
This commit is contained in:
parent
ba6fde31b1
commit
59769a222c
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue