all repos — mgba @ adfd8f68725fd7be9b7082af94c8d25c9f12768b

mGBA Game Boy Advance Emulator

Make sure if we reset the CPSR to the SPSR that we check if we get tossed into Thumb
Jeffrey Pfau jeffrey@endrift.com
Fri, 19 Apr 2013 21:26:00 -0700
commit

adfd8f68725fd7be9b7082af94c8d25c9f12768b

parent

633a87269ad02928d7d2509ce34eeb2cdd99eb3e

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

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

@@ -269,7 +269,11 @@ BODY; \

S_BODY; \ POST_BODY; \ if (rd == ARM_PC) { \ - ARM_WRITE_PC; \ + if (cpu->executionMode == MODE_ARM) { \ + ARM_WRITE_PC; \ + } else { \ + THUMB_WRITE_PC; \ + } \ }) #define DEFINE_ALU_INSTRUCTION_ARM(NAME, S_BODY, BODY, POST_BODY) \