Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
This file details the changelog of Capstone.

---------------------------------
Version 4.x: **SETDATE**


[ Arm ]

- Fix 4.0 regression: the `tbh [r0, r1, lsl #1]` instruction sets the operand.shift.value back again (see #1317)


---------------------------------
Version 4.0: December 18th, 2018

Expand Down
2 changes: 2 additions & 0 deletions arch/ARM/ARMInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,8 @@ static void printAddrModeTBH(MCInst *MI, unsigned Op, SStream *O)
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].mem.index = MCOperand_getReg(MO2);
SStream_concat0(O, ", lsl #1]");
if (MI->csh->detail) {
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].shift.type = ARM_SFT_LSL;
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].shift.value = 1;
MI->flat_insn->detail->arm.operands[MI->flat_insn->detail->arm.op_count].mem.lshift = 1;
}
set_mem_access(MI, false);
Expand Down
4 changes: 3 additions & 1 deletion include/capstone/arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,9 @@ typedef struct arm_op_mem {
arm_reg index; ///< index register
int scale; ///< scale for index register (can be 1, or -1)
int disp; ///< displacement/offset value
int lshift; ///< left-shift on index register, or 0 if irrelevant.
/// left-shift on index register, or 0 if irrelevant
/// NOTE: this value can also be fetched via operand.shift.value
int lshift;
} arm_op_mem;

/// Instruction operand
Expand Down