all repos — mgba @ 8e5b806cdd2fed1695f069fc8bc7e0eb0b3703ae

mGBA Game Boy Advance Emulator

Have board re-read CPSR when it is modified by MSR
Jeffrey Pfau jeffrey@endrift.com
Mon, 27 Jan 2014 00:21:14 -0800
commit

8e5b806cdd2fed1695f069fc8bc7e0eb0b3703ae

parent

ef66e4a8c7ca318ac8e7ed29647d23608bbd9325

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

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

@@ -659,7 +659,8 @@ }

if (cpu->privilegeMode != MODE_USER && (mask & PSR_PRIV_MASK)) { ARMSetPrivilegeMode(cpu, (enum PrivilegeMode) ((operand & 0x0000000F) | 0x00000010)); cpu->cpsr.packed = (cpu->cpsr.packed & ~PSR_PRIV_MASK) | (operand & PSR_PRIV_MASK); - }) + } + _ARMReadCPSR(cpu);) DEFINE_INSTRUCTION_ARM(MSRR, int c = opcode & 0x00010000;

@@ -689,7 +690,8 @@ }

if (cpu->privilegeMode != MODE_USER && (mask & PSR_PRIV_MASK)) { ARMSetPrivilegeMode(cpu, (enum PrivilegeMode) ((operand & 0x0000000F) | 0x00000010)); cpu->cpsr.packed = (cpu->cpsr.packed & ~PSR_PRIV_MASK) | (operand & PSR_PRIV_MASK); - }) + } + _ARMReadCPSR(cpu);) DEFINE_INSTRUCTION_ARM(MSRRI, int c = opcode & 0x00010000;