summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2017-10-21 20:03:20 +0000
committerCraig Topper <craig.topper@intel.com>2017-10-21 20:03:20 +0000
commitca2382d8097b5cee4dfbeb30f7b791aa242f313a (patch)
tree84efed07d62027bcc306035487154d0e68b861d3 /llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h
parentcb028c73214c0ce18ed1fe76e2417c961f0389c9 (diff)
downloadbcm5719-llvm-ca2382d8097b5cee4dfbeb30f7b791aa242f313a.tar.gz
bcm5719-llvm-ca2382d8097b5cee4dfbeb30f7b791aa242f313a.zip
[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
Diffstat (limited to 'llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h')
-rw-r--r--llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h b/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h
index e0f4399b368..9169d1aeef1 100644
--- a/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h
+++ b/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h
@@ -410,6 +410,9 @@ enum OperandEncoding {
ENUM_ENTRY(TYPE_AVX512ICC, "1-byte immediate operand for AVX512 icmp") \
ENUM_ENTRY(TYPE_UIMM8, "1-byte unsigned immediate operand") \
ENUM_ENTRY(TYPE_M, "Memory operand") \
+ ENUM_ENTRY(TYPE_MVSIBX, "Memory operand using XMM index") \
+ ENUM_ENTRY(TYPE_MVSIBY, "Memory operand using YMM index") \
+ ENUM_ENTRY(TYPE_MVSIBZ, "Memory operand using ZMM index") \
ENUM_ENTRY(TYPE_SRCIDX, "memory at source index") \
ENUM_ENTRY(TYPE_DSTIDX, "memory at destination index") \
ENUM_ENTRY(TYPE_MOFFS, "memory offset (relative to segment base)") \
OpenPOWER on IntegriCloud