Some instructions can write to pc directly
Jeffrey Pfau jeffrey@endrift.com
Sat, 02 Nov 2013 17:07:58 -0700
1 files changed,
2 insertions(+),
0 deletions(-)
jump to
M
src/arm/decoder-thumb.c
→
src/arm/decoder-thumb.c
@@ -139,6 +139,7 @@ DEFINE_THUMB_DECODER(NAME, MNEMONIC, \
info->op1.reg = (opcode & 0x0007) | H1; \ info->op2.reg = ((opcode >> 3) & 0x0007) | H2; \ info->accessesSpecialRegisters = info->op1.reg > 12 || info->op2.reg > 12; \ + info->branches = info->op1.reg == ARM_PC; \ info->affectsCPSR = CPSR; \ info->operandFormat = ARM_OPERAND_REGISTER_1 | \ AFFECTED | \@@ -224,6 +225,7 @@ DEFINE_THUMB_DECODER(NAME, MNEMONIC, \
info->memory.baseReg = RN; \ info->accessesSpecialRegisters = SPECIAL_REG; \ info->op1.immediate = (opcode & 0xFF) | ADDITIONAL_REG; \ + info->branches = info->op1.immediate & (1 << ARM_PC); \ info->operandFormat = ARM_OPERAND_MEMORY_1; \ info->memory.format = ARM_MEMORY_REGISTER_BASE | \ ARM_MEMORY_POST_INCREMENT;)