x86: ATT syntax print unsigned imm with 0x prefix

This commit is contained in:
Nguyen Anh Quynh 2019-02-13 01:26:04 +08:00
parent 8a7ebc3bd6
commit 7228b4a3a6

View File

@ -335,7 +335,7 @@ static void _printOperand(MCInst *MI, unsigned OpNo, SStream *O)
int64_t imm = MCOperand_getImm(Op);
if (imm < 0) {
if (MI->csh->imm_unsigned) {
SStream_concat(O, "$%"PRIx64, imm);
SStream_concat(O, "$0x%"PRIx64, imm);
} else {
if (imm < -HEX_THRESHOLD)
SStream_concat(O, "$-0x%"PRIx64, -imm);
@ -678,7 +678,7 @@ static void printOperand(MCInst *MI, unsigned OpNo, SStream *O)
SStream_concat(O, "$%"PRIu64, imm);
} else {
if (MI->csh->imm_unsigned) {
SStream_concat(O, "$%"PRIx64, imm);
SStream_concat(O, "$0x%"PRIx64, imm);
} else {
if (imm == 0x8000000000000000LL) // imm == -imm
SStream_concat0(O, "$0x8000000000000000");