ARM7: Fix regression with Thumb branches

This commit is contained in:
Jeffrey Pfau 2015-10-21 19:57:29 -07:00
parent 5922beb475
commit c27dde73e7
1 changed files with 2 additions and 2 deletions

View File

@ -308,8 +308,8 @@ DEFINE_LOAD_STORE_MULTIPLE_THUMB(STMIA,
#define DEFINE_CONDITIONAL_BRANCH_THUMB(COND) \
DEFINE_INSTRUCTION_THUMB(B ## COND, \
if (ARM_COND_ ## COND) { \
uint8_t immediate = opcode; \
cpu->gprs[ARM_PC] += immediate << 1; \
int8_t immediate = opcode; \
cpu->gprs[ARM_PC] += (int32_t) immediate << 1; \
THUMB_WRITE_PC; \
})