From 2959168a5487300623286ba69708ba9af01a3b5a Mon Sep 17 00:00:00 2001 From: "Andrew V. Tischenko" Date: Fri, 29 Dec 2017 08:31:01 +0000 Subject: 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 --- test/MC/X86/intel-syntax-error.s | 10 ++++++++++ test/MC/X86/intel-syntax.s | 8 ++++++++ test/MC/X86/x86_64-asm-match.s | 4 ++-- 3 files changed, 20 insertions(+), 2 deletions(-) (limited to 'test/MC') 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] -- cgit v1.2.3