mirror of https://github.com/mgba-emu/mgba.git
Fix sign-extension on BL1
This commit is contained in:
parent
eed0e77079
commit
67750e351b
|
@ -344,8 +344,8 @@ DEFINE_INSTRUCTION_THUMB(ILL, ARM_STUB)
|
|||
DEFINE_INSTRUCTION_THUMB(BKPT, ARM_STUB)
|
||||
DEFINE_INSTRUCTION_THUMB(B, ARM_STUB)
|
||||
DEFINE_INSTRUCTION_THUMB(BL1, \
|
||||
int16_t immediate = (opcode & 0x07FF) << 7; \
|
||||
cpu->gprs[ARM_LR] = cpu->gprs[ARM_PC] + (((int32_t) immediate) << 5);)
|
||||
int16_t immediate = (opcode & 0x07FF) << 5; \
|
||||
cpu->gprs[ARM_LR] = cpu->gprs[ARM_PC] + (((int32_t) immediate) << 7);)
|
||||
|
||||
DEFINE_INSTRUCTION_THUMB(BL2, \
|
||||
uint16_t immediate = (opcode & 0x07FF) << 1; \
|
||||
|
|
Loading…
Reference in New Issue