From e7d4f3ae8a1c33a43fc3d73f945c7c7fdefed630 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Mon, 20 Jan 2014 15:40:56 -0800 Subject: [PATCH] Fix MSR with immediate --- src/arm/isa-arm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/arm/isa-arm.c b/src/arm/isa-arm.c index 718e4cf55..e88e19ca4 100644 --- a/src/arm/isa-arm.c +++ b/src/arm/isa-arm.c @@ -795,7 +795,7 @@ DEFINE_INSTRUCTION_ARM(MRSR, \ 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(MSRI, 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;