From 1e1901a2945182b9c53f2ed5c2bd471cebfdf29b Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Wed, 2 Feb 2011 01:09:02 +0000 Subject: [PATCH] Fixed a bug in the disassembler where the mandatory 0x66 prefix would be misinterpreted in some cases on 32-bit x86 platforms. Thanks to Olivier Meurant for identifying the bug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124709 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/Disassembler/X86DisassemblerDecoder.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c b/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c index 7b17f1e5a3a..b6546fc9e86 100644 --- a/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c +++ b/lib/Target/X86/Disassembler/X86DisassemblerDecoder.c @@ -388,6 +388,7 @@ static int readPrefixes(struct InternalInstruction* insn) { } } else { unconsumeByte(insn); + insn->necessaryPrefixLocation = insn->readerCursor - 1; } if (insn->mode == MODE_16BIT) {