From 0a02fe238b7d2f4de24d7b32ddfbfde0a497d17f Mon Sep 17 00:00:00 2001 From: cyanpencil Date: Wed, 1 Jul 2020 16:04:06 +0200 Subject: [PATCH] Fix cmp register access on aarch64 --- arch/AArch64/AArch64InstPrinter.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/AArch64/AArch64InstPrinter.c b/arch/AArch64/AArch64InstPrinter.c index 0dc399a776..31d31b5733 100644 --- a/arch/AArch64/AArch64InstPrinter.c +++ b/arch/AArch64/AArch64InstPrinter.c @@ -834,9 +834,8 @@ static void printOperand(MCInst *MI, unsigned OpNum, SStream *O) #ifndef CAPSTONE_DIET uint8_t access; - access = get_op_access(MI->csh, MCInst_getOpcode(MI), MI->ac_idx); + access = get_op_access(MI->csh, MCInst_getOpcode(MI), OpNum); MI->flat_insn->detail->arm64.operands[MI->flat_insn->detail->arm64.op_count].access = access; - MI->ac_idx++; #endif MI->flat_insn->detail->arm64.operands[MI->flat_insn->detail->arm64.op_count].type = ARM64_OP_REG; MI->flat_insn->detail->arm64.operands[MI->flat_insn->detail->arm64.op_count].reg = Reg; @@ -867,9 +866,8 @@ static void printOperand(MCInst *MI, unsigned OpNum, SStream *O) #ifndef CAPSTONE_DIET uint8_t access; - access = get_op_access(MI->csh, MCInst_getOpcode(MI), MI->ac_idx); + access = get_op_access(MI->csh, MCInst_getOpcode(MI), OpNum); MI->flat_insn->detail->arm64.operands[MI->flat_insn->detail->arm64.op_count].access = access; - MI->ac_idx++; #endif MI->flat_insn->detail->arm64.operands[MI->flat_insn->detail->arm64.op_count].type = ARM64_OP_IMM; MI->flat_insn->detail->arm64.operands[MI->flat_insn->detail->arm64.op_count].imm = imm;