diff --git a/src/isa-thumb.c b/src/isa-thumb.c index d6e6f3d53..da28f27af 100644 --- a/src/isa-thumb.c +++ b/src/isa-thumb.c @@ -394,7 +394,7 @@ DEFINE_INSTRUCTION_THUMB(BL2, \ THUMB_WRITE_PC;) DEFINE_INSTRUCTION_THUMB(BX, \ - int rm = opcode & 0x0000000F; \ + int rm = (opcode >> 3) & 0xF; \ _ARMSetMode(cpu, cpu->gprs[rm] & 0x00000001); int misalign = 0; if (rm == ARM_PC) {