diff --git a/arch/AArch64/AArch64InstPrinter.c b/arch/AArch64/AArch64InstPrinter.c index 0314e56d6..de2a4cf08 100644 --- a/arch/AArch64/AArch64InstPrinter.c +++ b/arch/AArch64/AArch64InstPrinter.c @@ -1248,7 +1248,7 @@ static void printAlignedLabel(MCInst *MI, unsigned OpNum, SStream *O) // If the label has already been resolved to an immediate offset (say, when // we're running the disassembler), just print the immediate. if (MCOperand_isImm(Op)) { - uint64_t imm = (MCOperand_getImm(Op) << 2) + MI->address; + uint64_t imm = (MCOperand_getImm(Op) * 4) + MI->address; printUInt64Bang(O, imm); if (MI->csh->detail) { MI->flat_insn->detail->arm64.operands[MI->flat_insn->detail->arm64.op_count].type = ARM64_OP_IMM; diff --git a/arch/PowerPC/PPCInstPrinter.c b/arch/PowerPC/PPCInstPrinter.c index e24451310..561dd2af7 100644 --- a/arch/PowerPC/PPCInstPrinter.c +++ b/arch/PowerPC/PPCInstPrinter.c @@ -533,7 +533,7 @@ static void printAbsBranchOperand(MCInst *MI, unsigned OpNo, SStream *O) return; } - imm = ((int)MCOperand_getImm(MCInst_getOperand(MI, OpNo)) << 2); + imm = ((int)MCOperand_getImm(MCInst_getOperand(MI, OpNo)) * 4); if (!PPC_abs_branch(MI->csh, MCInst_getOpcode(MI))) { imm = (int)MI->address + imm;