[llvm] r333727 - [X86][Disassembler] Ignore EVEX.X extension of modrm.rm to 5-bits when modrm.rm encodes a k-register.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu May 31 22:36:08 PDT 2018
Author: ctopper
Date: Thu May 31 22:36:08 2018
New Revision: 333727
URL: http://llvm.org/viewvc/llvm-project?rev=333727&view=rev
Log:
[X86][Disassembler] Ignore EVEX.X extension of modrm.rm to 5-bits when modrm.rm encodes a k-register.
Modified:
llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp
llvm/trunk/test/MC/Disassembler/X86/x86-64.txt
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=333727&r1=333726&r2=333727&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp (original)
+++ llvm/trunk/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp Thu May 31 22:36:08 2018
@@ -1479,6 +1479,7 @@ static int readModRM(struct InternalInst
case TYPE_XMM: \
return prefix##_XMM0 + index; \
case TYPE_VK: \
+ index &= 0xf; \
if (index > 7) \
*valid = 0; \
return prefix##_K0 + index; \
Modified: llvm/trunk/test/MC/Disassembler/X86/x86-64.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Disassembler/X86/x86-64.txt?rev=333727&r1=333726&r2=333727&view=diff
==============================================================================
--- llvm/trunk/test/MC/Disassembler/X86/x86-64.txt (original)
+++ llvm/trunk/test/MC/Disassembler/X86/x86-64.txt Thu May 31 22:36:08 2018
@@ -581,5 +581,10 @@
#CHECK: vaddps (%rax), %xmm16, %xmm1
0x62 0xb1 0x7c 0x00 0x58 0x08
+# Make sure we ignore EVEX.X when modrm.rm encodes a GPR.
#CHECK: vcvtusi2sdq %rax, %xmm1, %xmm1
0x62 0xb1 0xf7 0x08 0x7b 0xc8
+
+# Make sure we ignore EVEX.X when modrm.rm encodes a k-register.
+#CHECK: vpmovm2b %k0, %xmm0
+0x62,0xb2,0x7e,0x08,0x28,0xc0
More information about the llvm-commits
mailing list