diff --git a/arch/X86/X86ATTInstPrinter.c b/arch/X86/X86ATTInstPrinter.c index 37b0f1c5..ff42f619 100644 --- a/arch/X86/X86ATTInstPrinter.c +++ b/arch/X86/X86ATTInstPrinter.c @@ -530,6 +530,13 @@ static void printOperand(MCInst *MI, unsigned OpNo, SStream *O) SStream_concat(O, "$-%"PRIu64, -imm); } break; + case X86_INS_INT: + // do not print number in negative form + if (imm >= 0 && imm <= HEX_THRESHOLD) + SStream_concat(O, "$%u", imm); + else + SStream_concat(O, "$0x%x", imm & 0xff); + break; case X86_INS_RET: // RET imm16 if (imm >= 0 && imm <= HEX_THRESHOLD) diff --git a/arch/X86/X86IntelInstPrinter.c b/arch/X86/X86IntelInstPrinter.c index 68ec5440..3e33c1d0 100644 --- a/arch/X86/X86IntelInstPrinter.c +++ b/arch/X86/X86IntelInstPrinter.c @@ -616,6 +616,13 @@ static void printOperand(MCInst *MI, unsigned OpNo, SStream *O) break; + case X86_INS_INT: + // do not print number in negative form + if (imm >= 0 && imm <= HEX_THRESHOLD) + SStream_concat(O, "%u", imm); + else + SStream_concat(O, "0x%x", imm & 0xff); + break; case X86_INS_AND: case X86_INS_OR: case X86_INS_XOR: