mirror of
https://github.com/capstone-engine/capstone.git
synced 2025-02-08 23:26:19 +00:00
parent
de55611538
commit
fbb90bcb35
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user