|
|
|
@ -446,7 +446,7 @@ static void _printOperand(MCInst *MI, unsigned OpNo, SStream *O) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void printMemReference(MCInst *MI, unsigned Op, SStream *O) // qqq
|
|
|
|
|
static void printMemReference(MCInst *MI, unsigned Op, SStream *O) |
|
|
|
|
{ |
|
|
|
|
MCOperand *BaseReg = MCInst_getOperand(MI, Op); |
|
|
|
|
uint64_t ScaleVal = MCOperand_getImm(MCInst_getOperand(MI, Op+1)); |
|
|
|
@ -493,18 +493,11 @@ static void printMemReference(MCInst *MI, unsigned Op, SStream *O) // qqq |
|
|
|
|
MI->flat_insn.x86.operands[MI->flat_insn.x86.op_count].mem.disp = DispVal; |
|
|
|
|
if (DispVal || (!MCOperand_getReg(IndexReg) && !MCOperand_getReg(BaseReg))) { |
|
|
|
|
if (NeedPlus) { |
|
|
|
|
if (DispVal > 0) |
|
|
|
|
SStream_concat(O, " + "); |
|
|
|
|
else { |
|
|
|
|
SStream_concat(O, " - "); |
|
|
|
|
DispVal = -DispVal; |
|
|
|
|
} |
|
|
|
|
SStream_concat(O, " + "); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (DispVal < 0) { |
|
|
|
|
if (DispVal < -HEX_THRESHOLD) |
|
|
|
|
SStream_concat(O, "-0x%"PRIx64, -DispVal); |
|
|
|
|
else |
|
|
|
|
SStream_concat(O, "-%"PRIu64, -DispVal); |
|
|
|
|
SStream_concat(O, "0x%"PRIx64, ((1L << (8*MI->csh->mode)) - 1) & DispVal); |
|
|
|
|
} else { |
|
|
|
|
if (DispVal > HEX_THRESHOLD) |
|
|
|
|
SStream_concat(O, "0x%"PRIx64, DispVal); |
|
|
|
|