all repos — mgba @ 38b1c8d235c1e7dd359fa847e9ef5afee239692a

mGBA Game Boy Advance Emulator

Make sure CPSR is updated for IRQ mode properly
Jeffrey Pfau jeffrey@endrift.com
Wed, 17 Apr 2013 00:29:20 -0700
commit

38b1c8d235c1e7dd359fa847e9ef5afee239692a

parent

f30b367c7eec09e479317b8689d66d503a556673

1 files changed, 2 insertions(+), 1 deletions(-)

jump to
M src/arm/arm.csrc/arm/arm.c

@@ -122,8 +122,9 @@ instructionWidth = WORD_SIZE_THUMB;

} else { instructionWidth = WORD_SIZE_ARM; } + cpu->spsr = cpsr; ARMSetPrivilegeMode(cpu, MODE_IRQ); - cpu->spsr = cpsr; + cpu->cpsr.priv = MODE_IRQ; cpu->gprs[ARM_LR] = cpu->gprs[ARM_PC] - instructionWidth + WORD_SIZE_ARM; cpu->gprs[ARM_PC] = BASE_IRQ + WORD_SIZE_ARM; cpu->memory->setActiveRegion(cpu->memory, cpu->gprs[ARM_PC]);