ppc: do not print a dot in front of absolute address. issue reported by @pancake

This commit is contained in:
Nguyen Anh Quynh 2014-11-11 11:05:20 +08:00
parent b6f4c1da05
commit d82b28a75f

View File

@ -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