summaryrefslogtreecommitdiff
path: root/test/MC
diff options
context:
space:
mode:
authorAndrew V. Tischenko <andrew.v.tischenko@gmail.com>2017-12-29 08:31:01 +0000
committerAndrew V. Tischenko <andrew.v.tischenko@gmail.com>2017-12-29 08:31:01 +0000
commit2959168a5487300623286ba69708ba9af01a3b5a (patch)
tree6c13c7dffaf81e9963db3024ea80c3450ec80140 /test/MC
parentffbb3d026a67e50bfe8a622009e2bc3f47765cfa (diff)
Fix incorrect operand sizes for some MMX instructions: punpcklwd, punpcklbw and punpckldq.
Differential Revision: https://reviews.llvm.org/D41595 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321549 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/X86/intel-syntax-error.s10
-rw-r--r--test/MC/X86/intel-syntax.s8
-rw-r--r--test/MC/X86/x86_64-asm-match.s4
3 files changed, 20 insertions, 2 deletions
diff --git a/test/MC/X86/intel-syntax-error.s b/test/MC/X86/intel-syntax-error.s
index 23ee7813556..ab875b4e982 100644
--- a/test/MC/X86/intel-syntax-error.s
+++ b/test/MC/X86/intel-syntax-error.s
@@ -34,3 +34,13 @@ lea RDX, [4 * RAX + 27 * RBX + _pat]
lea RDX, [[arr]
//CHECK: error: unexpected bracket encountered
lea RDX, [arr[]
+
+.intel_syntax
+
+// CHECK: error: invalid operand for instruction
+punpcklbw mm0, qword ptr [rsp]
+// CHECK: error: invalid operand for instruction
+punpcklwd mm0, word ptr [rsp]
+// CHECK: error: invalid operand for instruction
+punpckldq mm0, qword ptr [rsp]
+
diff --git a/test/MC/X86/intel-syntax.s b/test/MC/X86/intel-syntax.s
index 5e118674f92..0421add11d0 100644
--- a/test/MC/X86/intel-syntax.s
+++ b/test/MC/X86/intel-syntax.s
@@ -867,3 +867,11 @@ movsd qword ptr [rax], xmm0
xlat byte ptr [eax]
// CHECK: xlatb
// CHECK-STDERR: memory operand is only for determining the size, (R|E)BX will be used for the location
+
+// CHECK: punpcklbw
+punpcklbw mm0, dword ptr [rsp]
+// CHECK: punpcklwd
+punpcklwd mm0, dword ptr [rsp]
+// CHECK: punpckldq
+punpckldq mm0, dword ptr [rsp]
+
diff --git a/test/MC/X86/x86_64-asm-match.s b/test/MC/X86/x86_64-asm-match.s
index 3208e4f4e0f..43888d662c6 100644
--- a/test/MC/X86/x86_64-asm-match.s
+++ b/test/MC/X86/x86_64-asm-match.s
@@ -39,7 +39,7 @@
// CHECK: Matching formal operand class MCK_VR64 against actual operand at index 2 (): Opcode result: multiple operand mismatches, ignoring this opcode
// CHECK:Trying to match opcode MMX_PUNPCKLBWirm
// CHECK: Matching formal operand class MCK_VR64 against actual operand at index 1 (): match success using generic matcher
-// CHECK: Matching formal operand class MCK_Mem64 against actual operand at index 2 (): match success using generic matcher
+// CHECK: Matching formal operand class MCK_Mem32 against actual operand at index 2 (): match success using generic matcher
// CHECK: Matching formal operand class InvalidMatchClass against actual operand at index 3: actual operand index out of range Opcode result: complete match, selecting this opcode
@@ -49,4 +49,4 @@ pinsrw $3, %ecx, %xmm5
crc32l %gs:0xdeadbeef(%rbx,%rcx,8),%ecx
.intel_syntax
-punpcklbw mm0, qword ptr [rsp]
+punpcklbw mm0, dword ptr [rsp]