all repos — mgba @ e7d4f3ae8a1c33a43fc3d73f945c7c7fdefed630

mGBA Game Boy Advance Emulator

Fix MSR with immediate
Jeffrey Pfau jeffrey@endrift.com
Mon, 20 Jan 2014 15:40:56 -0800
commit

e7d4f3ae8a1c33a43fc3d73f945c7c7fdefed630

parent

12f4ff6cbb524d97980100cb09c0c4e0e6ab5667

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

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

@@ -795,7 +795,7 @@

DEFINE_INSTRUCTION_ARM(MSRI, int c = opcode & 0x00010000; int f = opcode & 0x00080000; - int rotate = (opcode & 0x00000F00) >> 8; + int rotate = (opcode & 0x00000F00) >> 7; int32_t operand = ARM_ROR(opcode & 0x000000FF, rotate); int32_t mask = (c ? 0x000000FF : 0) | (f ? 0xFF000000 : 0); if (mask & PSR_USER_MASK) {

@@ -809,7 +809,7 @@

DEFINE_INSTRUCTION_ARM(MSRRI, int c = opcode & 0x00010000; int f = opcode & 0x00080000; - int rotate = (opcode & 0x00000F00) >> 8; + int rotate = (opcode & 0x00000F00) >> 7; int32_t operand = ARM_ROR(opcode & 0x000000FF, rotate); int32_t mask = (c ? 0x000000FF : 0) | (f ? 0xFF000000 : 0); mask &= PSR_USER_MASK | PSR_PRIV_MASK | PSR_STATE_MASK;