Implement B

This commit is contained in:
Jeffrey Pfau 2013-04-13 12:38:47 -07:00
parent abd522a2ce
commit dbe9796b34
1 changed files with 5 additions and 1 deletions

View File

@ -358,7 +358,11 @@ 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(B, \
int16_t immediate = (opcode & 0x07FF) << 5; \
cpu->gprs[ARM_PC] += (((int32_t) immediate) >> 4); \
THUMB_WRITE_PC;)
DEFINE_INSTRUCTION_THUMB(BL1, \
int16_t immediate = (opcode & 0x07FF) << 5; \
cpu->gprs[ARM_LR] = cpu->gprs[ARM_PC] + (((int32_t) immediate) << 7);)