Make sure if we reset the CPSR to the SPSR that we check if we get tossed into Thumb

This commit is contained in:
Jeffrey Pfau 2013-04-19 21:26:00 -07:00
parent 633a87269a
commit adfd8f6872
1 changed files with 5 additions and 1 deletions

View File

@ -269,7 +269,11 @@ void ARMStep(struct ARMCore* cpu) {
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) \