mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-12-15 01:18:38 +00:00
ppc: do not print a dot in front of absolute address. issue reported by @pancake
This commit is contained in:
parent
b6f4c1da05
commit
d82b28a75f
@ -514,7 +514,6 @@ static void printBranchOperand(MCInst *MI, unsigned OpNo, SStream *O)
|
||||
|
||||
// Branches can take an immediate operand. This is used by the branch
|
||||
// selection pass to print .+8, an eight byte displacement from the PC.
|
||||
//SStream_concat0(O, ".+");
|
||||
printAbsBranchOperand(MI, OpNo, O);
|
||||
}
|
||||
|
||||
@ -533,7 +532,7 @@ static void printAbsBranchOperand(MCInst *MI, unsigned OpNo, SStream *O)
|
||||
imm = (int)MI->address + imm;
|
||||
}
|
||||
|
||||
SStream_concat(O, ".0x%x", imm);
|
||||
SStream_concat(O, "0x%x", imm);
|
||||
|
||||
if (MI->csh->detail) {
|
||||
MI->flat_insn->detail->ppc.operands[MI->flat_insn->detail->ppc.op_count].type = PPC_OP_IMM;
|
||||
@ -608,18 +607,11 @@ static void printTLSCall(MCInst *MI, unsigned OpNo, SStream *O)
|
||||
|
||||
// On PPC64, VariantKind is VK_None, but on PPC32, it's VK_PLT, and it must
|
||||
// come at the _end_ of the expression.
|
||||
// MCOperand *Op;
|
||||
// Op = MCInst_getOperand(MI, OpNo);
|
||||
//const MCSymbolRefExpr &refExp = cast<MCSymbolRefExpr>(*Op.getExpr());
|
||||
//O << refExp.getSymbol().getName();
|
||||
|
||||
SStream_concat0(O, "(");
|
||||
printOperand(MI, OpNo + 1, O);
|
||||
SStream_concat0(O, ")");
|
||||
set_mem_access(MI, false);
|
||||
|
||||
//if (refExp.getKind() != MCSymbolRefExpr::VK_None)
|
||||
// O << '@' << MCSymbolRefExpr::getVariantKindName(refExp.getKind());
|
||||
}
|
||||
|
||||
#ifndef CAPSTONE_DIET
|
||||
|
Loading…
Reference in New Issue
Block a user