[x86] Fix 16-bit handling of OpSize bit
authorDavid Woodhouse <dwmw2@infradead.org>
Mon, 20 Jan 2014 12:02:35 +0000 (12:02 +0000)
committerDavid Woodhouse <dwmw2@infradead.org>
Mon, 20 Jan 2014 12:02:35 +0000 (12:02 +0000)
commit7360e8caa397945de67a218d0d9abcee783573a9
tree7c69a1fcb01e894efd599b8c0c95e32c2df0c548
parente6f5bb99fc30e9a7453436bff127e3ceed0df67a
[x86] Fix 16-bit handling of OpSize bit

When disassembling in 16-bit mode the meaning of the OpSize bit is
inverted. Instructions found in the IC_OPSIZE context will actually
*not* have the 0x66 prefix, and instructions in the IC context will
have the 0x66 prefix. Make use of the existing special-case handling
for the 0x66 prefix being in the wrong place, to cope with this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199650 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/Disassembler/X86DisassemblerDecoder.c
test/MC/Disassembler/X86/x86-16.txt [new file with mode: 0644]