Skip to content

Commit

Permalink
x86: ATT syntax print unsigned imm with 0x prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
aquynh committed Feb 12, 2019
1 parent 047c720 commit 7b25118
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/X86/X86ATTInstPrinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 7b25118

Please sign in to comment.