arm: add operand details for 'mov pc, lr'. bug reported by Daniel Colascione

v2
Nguyen Anh Quynh 11 years ago
parent 48b6cb4ce5
commit 6eb55cf52e
  1. 13
      arch/ARM/ARMInstPrinter.c

@ -270,6 +270,19 @@ void ARM_post_printer(csh ud, cs_insn *insn, char *insn_asm, MCInst *mci)
insn->detail->arm.cc = ARM_CC_AL;
}
// manual fix for some special instructions
// printf(">>> id: %u, mcid: %u\n", insn->id, mci->Opcode);
switch(mci->Opcode) {
default:
break;
case ARM_MOVPCLR:
insn->detail->arm.operands[0].type = ARM_OP_REG;
insn->detail->arm.operands[0].reg = ARM_REG_PC;
insn->detail->arm.operands[1].type = ARM_OP_REG;
insn->detail->arm.operands[1].reg = ARM_REG_LR;
insn->detail->arm.op_count = 2;
break;
}
}
void ARM_printInst(MCInst *MI, SStream *O, void *Info)

Loading…
Cancel
Save