From abcb26af2ba419739e19a6b68f886148bf7540a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Thu, 12 Nov 2020 01:48:01 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20compilation=20when=20combining=20?= =?UTF-8?q?=E2=80=9Cdiet=E2=80=9D=20and=20=E2=80=9Cx86=5Freduce=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not that it makes a whole lot of sense anyway. --- arch/X86/X86GenAsmWriter1_reduce.inc | 2 ++ arch/X86/X86IntelInstPrinter.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/X86/X86GenAsmWriter1_reduce.inc b/arch/X86/X86GenAsmWriter1_reduce.inc index 801dd289d4..f205dd4ecf 100644 --- a/arch/X86/X86GenAsmWriter1_reduce.inc +++ b/arch/X86/X86GenAsmWriter1_reduce.inc @@ -2110,7 +2110,9 @@ static void printInstruction(MCInst *MI, SStream *O) // Emit the opcode for the instruction. uint32_t Bits = 0; Bits |= OpInfo0[opcode] << 0; +#ifndef CAPSTONE_DIET SStream_concat0(O, AsmStrs+(Bits & 4095)-1); +#endif // Fragment 0 encoded into 6 bits for 33 unique commands. diff --git a/arch/X86/X86IntelInstPrinter.c b/arch/X86/X86IntelInstPrinter.c index 8b2cb5909f..9592e3067d 100644 --- a/arch/X86/X86IntelInstPrinter.c +++ b/arch/X86/X86IntelInstPrinter.c @@ -1035,6 +1035,7 @@ static void printanymem(MCInst *MI, unsigned OpNo, SStream *O) case X86_LEA64r: MI->x86opsize = 8; break; +#ifndef CAPSTONE_X86_REDUCE case X86_BNDCL32rm: case X86_BNDCN32rm: case X86_BNDCU32rm: @@ -1045,6 +1046,7 @@ static void printanymem(MCInst *MI, unsigned OpNo, SStream *O) case X86_BNDCU64rm: MI->x86opsize = 16; break; +#endif } printMemReference(MI, OpNo, O);