[llvm] r230931 - [X86] There are only 8 mask registers. Fail disassembly if instruction tries to reference more.
Craig Topper
craig.topper at gmail.com
Sun Mar 1 19:33:11 PST 2015
Author: ctopper
Date: Sun Mar 1 21:33:11 2015
New Revision: 230931
URL: http://llvm.org/viewvc/llvm-project?rev=230931&view=rev
Log:
[X86] There are only 8 mask registers. Fail disassembly if instruction tries to reference more.
Modified:
llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp
Modified: llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp?rev=230931&r1=230930&r2=230931&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp (original)
+++ llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp Sun Mar 1 21:33:11 2015
@@ -1458,6 +1458,8 @@ static int readModRM(struct InternalInst
case TYPE_VK1: \
case TYPE_VK8: \
case TYPE_VK16: \
+ if (index > 7) \
+ *valid = 0; \
return prefix##_K0 + index; \
case TYPE_MM64: \
return prefix##_MM0 + (index & 0x7); \
More information about the llvm-commits
mailing list