PPC: print 16bit imm as unsigned
diff --git a/arch/PowerPC/PPCInstPrinter.c b/arch/PowerPC/PPCInstPrinter.c
index df15aef..c46d067 100644
--- a/arch/PowerPC/PPCInstPrinter.c
+++ b/arch/PowerPC/PPCInstPrinter.c
@@ -460,18 +460,11 @@
static void printS16ImmOperand(MCInst *MI, unsigned OpNo, SStream *O)
{
if (MCOperand_isImm(MCInst_getOperand(MI, OpNo))) {
- short Imm = (short)MCOperand_getImm(MCInst_getOperand(MI, OpNo));
- if (Imm >= 0) {
- if (Imm > HEX_THRESHOLD)
- SStream_concat(O, "0x%x", Imm);
- else
- SStream_concat(O, "%u", Imm);
- } else {
- if (Imm < -HEX_THRESHOLD)
- SStream_concat(O, "-0x%x", -Imm);
- else
- SStream_concat(O, "-%u", -Imm);
- }
+ unsigned short Imm = (unsigned short)MCOperand_getImm(MCInst_getOperand(MI, OpNo));
+ if (Imm > HEX_THRESHOLD)
+ SStream_concat(O, "0x%x", Imm);
+ else
+ SStream_concat(O, "%u", Imm);
if (MI->csh->detail) {
MI->flat_insn->detail->ppc.operands[MI->flat_insn->detail->ppc.op_count].type = PPC_OP_IMM;