all repos — mgba @ f90b01b95d6f8ed936ffbc0fa456a8ea0016cc18

mGBA Game Boy Advance Emulator

Fix setting privilege mode when entering SVC
Jeffrey Pfau jeffrey@endrift.com
Mon, 14 Oct 2013 22:32:52 -0700
commit

f90b01b95d6f8ed936ffbc0fa456a8ea0016cc18

parent

9430040cb3f3ebab2e927fa34dc9a2b7580b7e2b

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

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

@@ -145,7 +145,7 @@ } else {

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