[X86] Fix disassembling of EVEX instructions to stop accidentally decoding the SIB...
authorCraig Topper <craig.topper@intel.com>
Sat, 21 Oct 2017 20:03:20 +0000 (20:03 +0000)
committerCraig Topper <craig.topper@intel.com>
Sat, 21 Oct 2017 20:03:20 +0000 (20:03 +0000)
commitca2382d8097b5cee4dfbeb30f7b791aa242f313a
tree84efed07d62027bcc306035487154d0e68b861d3
parentcb028c73214c0ce18ed1fe76e2417c961f0389c9
[X86] Fix disassembling of EVEX instructions to stop accidentally decoding the SIB index register as an XMM/YMM/ZMM register.

This introduces a new operand type to encode the whether the index register should be XMM/YMM/ZMM. And new code to fixup the results created by readSIB.

This has the nice effect of removing a bunch of code that hard coded the name of every GATHER and SCATTER instruction to map the index type.

This fixes PR32807.

llvm-svn: 316273
llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp
llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp
llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h
llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h
llvm/test/MC/Disassembler/X86/x86-64.txt
llvm/utils/TableGen/X86RecognizableInstr.cpp