[x86] Infer disassembler mode from SubtargetInfo feature bits
authorDavid Woodhouse <dwmw2@infradead.org>
Mon, 20 Jan 2014 12:02:31 +0000 (12:02 +0000)
committerDavid Woodhouse <dwmw2@infradead.org>
Mon, 20 Jan 2014 12:02:31 +0000 (12:02 +0000)
commite6f5bb99fc30e9a7453436bff127e3ceed0df67a
treeeee859c4e8ecce8f4c2d0aea3b0d6ce01ebdca77
parent70ece0ada7f221b089183142440f927fa2ea3b1b
[x86] Infer disassembler mode from SubtargetInfo feature bits

Aside from cleaning up the code, this also adds support for the -code16
environment and actually enables the MODE_16BIT mode that was previously
not accessible.

There is no point adding any testing for 16-bit yet though; basically
nothing will work because we aren't handling the OpSize prefix correctly
for 16-bit mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199649 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/Disassembler/X86Disassembler.cpp
lib/Target/X86/Disassembler/X86Disassembler.h