From 26cb4aa50f8a126a163f1b0d5e2b883378c5867f Mon Sep 17 00:00:00 2001 From: me Date: Sun, 12 Apr 2015 15:37:00 +0200 Subject: [PATCH] x86: add more cases to print as unsigned 8bit imm --- arch/X86/X86ATTInstPrinter.c | 3 +++ arch/X86/X86IntelInstPrinter.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/arch/X86/X86ATTInstPrinter.c b/arch/X86/X86ATTInstPrinter.c index dbff4e74..dd0c963c 100644 --- a/arch/X86/X86ATTInstPrinter.c +++ b/arch/X86/X86ATTInstPrinter.c @@ -649,6 +649,9 @@ static void printOperand(MCInst *MI, unsigned OpNo, SStream *O) case X86_TEST8mi_alt: case X86_XOR8mi: case X86_XOR8mi8: + case X86_PUSH64i8: + case X86_CMP32ri8: + case X86_CMP64ri8: imm = imm & 0xff; opsize = 1; // immediate of 1 byte diff --git a/arch/X86/X86IntelInstPrinter.c b/arch/X86/X86IntelInstPrinter.c index 11a2f549..ebdb88e8 100644 --- a/arch/X86/X86IntelInstPrinter.c +++ b/arch/X86/X86IntelInstPrinter.c @@ -776,6 +776,9 @@ static void printOperand(MCInst *MI, unsigned OpNo, SStream *O) case X86_TEST8mi_alt: case X86_XOR8mi: case X86_XOR8mi8: + case X86_PUSH64i8: + case X86_CMP32ri8: + case X86_CMP64ri8: imm = imm & 0xff; opsize = 1; // immediate of 1 byte