1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

[X86][Disassembler] Ignore EVEX.X extension of modrm.rm to 5-bits when modrm.rm encodes a k-register.

llvm-svn: 333727
This commit is contained in:
Craig Topper 2018-06-01 05:36:08 +00:00
parent 43650cbe76
commit d8d6c7045a
2 changed files with 6 additions and 0 deletions

View File

@ -1479,6 +1479,7 @@ static int readModRM(struct InternalInstruction* insn) {
case TYPE_XMM: \
return prefix##_XMM0 + index; \
case TYPE_VK: \
index &= 0xf; \
if (index > 7) \
*valid = 0; \
return prefix##_K0 + index; \

View File

@ -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