X86: Fix encoding of 'movd %xmm0, %rax'
authorJim Grosbach <grosbach@apple.com>
Fri, 31 Aug 2012 00:30:30 +0000 (00:30 +0000)
committerJim Grosbach <grosbach@apple.com>
Fri, 31 Aug 2012 00:30:30 +0000 (00:30 +0000)
The assembly string for the VMOVPQIto64rr instruction incorrectly lacked the 'v'
prefix, resulting in mis-assembly of the vanilla movd instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162963 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrSSE.td
test/MC/X86/x86-64.s

index b46da95bbee6cdcc5701869f711ade4d096504b7..adbcb653b951dfdc8d5e586d9c23bac8575e7681 100644 (file)
@@ -4538,7 +4538,7 @@ def MOVPDI2DImr  : PDI<0x7E, MRMDestMem, (outs), (ins i32mem:$dst, VR128:$src),
 // Move Packed Doubleword Int first element to Doubleword Int
 //
 def VMOVPQIto64rr : I<0x7E, MRMDestReg, (outs GR64:$dst), (ins VR128:$src),
-                          "mov{d|q}\t{$src, $dst|$dst, $src}",
+                          "vmov{d|q}\t{$src, $dst|$dst, $src}",
                           [(set GR64:$dst, (vector_extract (v2i64 VR128:$src),
                                                            (iPTR 0)))],
                                                            IIC_SSE_MOVD_ToGP>,
index 6a2d5bba6b70445fde0c7f391f73e9086b237ffb..03cb62e7cba3ef2496356b511f7a1624b88b2c67 100644 (file)
@@ -1164,6 +1164,10 @@ xsetbv // CHECK: xsetbv # encoding: [0x0f,0x01,0xd1]
 // CHECK: encoding: [0x66,0x48,0x0f,0x6e,0xc7]
        movd %rdi,%xmm0
 
+// CHECK: movd  %xmm0, %rax
+// CHECK: encoding: [0x66,0x48,0x0f,0x7e,0xc0]
+        movd  %xmm0, %rax
+
 // CHECK: movntil %eax, (%rdi)
 // CHECK: encoding: [0x0f,0xc3,0x07]
 // CHECK: movntil