Skip to content

Commit

Permalink
Fix AddrMode3Operand_1
Browse files Browse the repository at this point in the history
The immediate was not processed through ARM_AM_getAM3Offset
before adding it to detail.
  • Loading branch information
Rot127 committed Jul 23, 2023
1 parent 03bf3f5 commit 9590978
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/ARM/ARMMapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -1536,12 +1536,12 @@ static void add_cs_detail_template_1(MCInst *MI, arm_op_group op_group,
ARM_set_mem_access(MI, false);
break;
}
unsigned ImmOffs = ARM_AM_getAM3Offset(
MCOperand_getImm(MCInst_getOperand(MI, OpNum + 2)));
unsigned ImmOffs =
ARM_AM_getAM3Offset(MCInst_getOpVal(MI, OpNum + 2));

if (AlwaysPrintImm0 || ImmOffs || Sign == ARM_AM_sub) {
ARM_set_detail_op_mem(MI, OpNum + 2, false, 0, 0,
MCInst_getOpVal(MI, OpNum + 2));
ImmOffs);
ARM_get_detail_op(MI, 0)->subtracted = Sign ==
ARM_AM_sub;
}
Expand Down

0 comments on commit 9590978

Please sign in to comment.