all repos — mgba @ 3121ed0bb6a717886ccc81ecae3bbdc5b45ab4ba

mGBA Game Boy Advance Emulator

Fix BX
Jeffrey Pfau jeffrey@endrift.com
Sun, 14 Apr 2013 03:23:37 -0700
commit

3121ed0bb6a717886ccc81ecae3bbdc5b45ab4ba

parent

8eb8cdfad86df5f501a960dd20ffbe5d14e0d6ca

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

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

@@ -394,7 +394,7 @@ cpu->gprs[ARM_LR] = pc - 1; \

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) {