Closed
Description
Hi,
Capstone correctly outputs this T2 encoding instruction (thumb mode, detail enabled
ldr.w r3, [r2, r3, lsl #2]
But the <cs_arm_op>.mem.shift.type
of the second operand = ARM_SFT_INVALID, which is wrong.
I found that in printT2AddrModeSoRegOperand
at arch/ARM/ARMInstPrinter.c
line 2094: MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count - 1].shift.type = ARM_SFT_LSL;
line 2095: MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count - 1].shift.value = ShAmt;
It seems like
MI->flat_insn->detail->arm.op_count - 1
should be MI->flat_insn->detail->arm.op_count
Metadata
Metadata
Assignees
Labels
No labels