mirror of
https://github.com/libretro/mgba.git
synced 2024-11-27 10:11:00 +00:00
Implement BL
This commit is contained in:
parent
133d574667
commit
d90d7d1899
@ -291,8 +291,17 @@ DEFINE_LOAD_STORE_MULTIPLE_EX_THUMB(PUSHR, \
|
||||
DEFINE_INSTRUCTION_THUMB(ILL, ARM_STUB)
|
||||
DEFINE_INSTRUCTION_THUMB(BKPT, ARM_STUB)
|
||||
DEFINE_INSTRUCTION_THUMB(B, ARM_STUB)
|
||||
DEFINE_INSTRUCTION_THUMB(BL1, ARM_STUB)
|
||||
DEFINE_INSTRUCTION_THUMB(BL2, ARM_STUB)
|
||||
DEFINE_INSTRUCTION_THUMB(BL1, \
|
||||
int16_t immediate = (opcode & 0x07FF) << 7; \
|
||||
cpu->gprs[ARM_LR] = cpu->gprs[ARM_PC] + (((int32_t) immediate) << 4);)
|
||||
|
||||
DEFINE_INSTRUCTION_THUMB(BL2, \
|
||||
uint16_t immediate = (opcode & 0x07FF) << 1; \
|
||||
uint32_t pc = cpu->gprs[ARM_PC]; \
|
||||
cpu->gprs[ARM_PC] = cpu->gprs[ARM_LR] + immediate; \
|
||||
cpu->gprs[ARM_LR] = pc - 1; \
|
||||
THUMB_WRITE_PC;)
|
||||
|
||||
DEFINE_INSTRUCTION_THUMB(BX, ARM_STUB)
|
||||
DEFINE_INSTRUCTION_THUMB(SWI, ARM_STUB)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user