Add support for movntil/movntiq mnemonics. Reported on llvmdev.
authorEli Friedman <eli.friedman@gmail.com>
Thu, 23 Jun 2011 21:07:47 +0000 (21:07 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Thu, 23 Jun 2011 21:07:47 +0000 (21:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133759 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 8377c3a0e60a5aace0c9a8b34d506f33c279bda3..0bfc5e7fdbb8baecf93315a1fd8b409d15aaaf63 100644 (file)
@@ -1991,11 +1991,11 @@ def : Pat<(alignednontemporalstore (v2i64 VR128:$src), addr:$dst),
 
 // There is no AVX form for instructions below this point
 def MOVNTImr : I<0xC3, MRMDestMem, (outs), (ins i32mem:$dst, GR32:$src),
-                 "movnti\t{$src, $dst|$dst, $src}",
+                 "movnti{l}\t{$src, $dst|$dst, $src}",
                  [(nontemporalstore (i32 GR32:$src), addr:$dst)]>,
                TB, Requires<[HasSSE2]>;
 def MOVNTI_64mr : RI<0xC3, MRMDestMem, (outs), (ins i64mem:$dst, GR64:$src),
-                     "movnti\t{$src, $dst|$dst, $src}",
+                     "movnti{q}\t{$src, $dst|$dst, $src}",
                      [(nontemporalstore (i64 GR64:$src), addr:$dst)]>,
                   TB, Requires<[HasSSE2]>;
 }
index d2dd78d642098f7bcb364e59743eef3809ab5b0f..bdc54a60e37b8374f93a0f66118fd60497b7913e 100644 (file)
 // CHECK:      ud2
                ud2
 
-// CHECK:      movnti  %ecx, 3735928559(%ebx,%ecx,8)
+// CHECK:      movntil %ecx, 3735928559(%ebx,%ecx,8)
                movnti  %ecx,0xdeadbeef(%ebx,%ecx,8)
 
 // CHECK:      clflush 3735928559(%ebx,%ecx,8)
 // CHECK:  encoding: [0xdf,0xea]
                fucomip %st(2),%st
 
-// CHECK: movnti       %ecx, 3735928559(%ebx,%ecx,8)
+// CHECK: movntil      %ecx, 3735928559(%ebx,%ecx,8)
 // CHECK:  encoding: [0x0f,0xc3,0x8c,0xcb,0xef,0xbe,0xad,0xde]
                movnti  %ecx,0xdeadbeef(%ebx,%ecx,8)
 
-// CHECK: movnti       %ecx, 69
+// CHECK: movntil      %ecx, 69
 // CHECK:  encoding: [0x0f,0xc3,0x0d,0x45,0x00,0x00,0x00]
                movnti  %ecx,0x45
 
-// CHECK: movnti       %ecx, 32493
+// CHECK: movntil      %ecx, 32493
 // CHECK:  encoding: [0x0f,0xc3,0x0d,0xed,0x7e,0x00,0x00]
                movnti  %ecx,0x7eed
 
-// CHECK: movnti       %ecx, 3133065982
+// CHECK: movntil      %ecx, 3133065982
 // CHECK:  encoding: [0x0f,0xc3,0x0d,0xfe,0xca,0xbe,0xba]
                movnti  %ecx,0xbabecafe
 
-// CHECK: movnti       %ecx, 305419896
+// CHECK: movntil      %ecx, 305419896
 // CHECK:  encoding: [0x0f,0xc3,0x0d,0x78,0x56,0x34,0x12]
                movnti  %ecx,0x12345678
 
 // CHECK:      fucompi %st(2)
                fucomip %st(2),%st
 
-// CHECK:      movnti  %ecx, 3735928559(%ebx,%ecx,8)
+// CHECK:      movntil %ecx, 3735928559(%ebx,%ecx,8)
                movnti  %ecx,0xdeadbeef(%ebx,%ecx,8)
 
-// CHECK:      movnti  %ecx, 69
-               movnti  %ecx,0x45
+// CHECK:      movntil %ecx, 69
+               movntil %ecx,0x45
 
-// CHECK:      movnti  %ecx, 32493
+// CHECK:      movntil %ecx, 32493
                movnti  %ecx,0x7eed
 
-// CHECK:      movnti  %ecx, 3133065982
+// CHECK:      movntil %ecx, 3133065982
                movnti  %ecx,0xbabecafe
 
-// CHECK:      movnti  %ecx, 305419896
+// CHECK:      movntil %ecx, 305419896
                movnti  %ecx,0x12345678
 
 // CHECK:      clflush 3735928559(%ebx,%ecx,8)
index 472748f3b8266d9597e98e99d8648bd1ae96d57b..5074a1dd6f2dec18e41889c413d72dad8d84d968 100644 (file)
@@ -1136,3 +1136,15 @@ xsetbv // CHECK: xsetbv # encoding: [0x0f,0x01,0xd1]
 // CHECK: movd %rdi, %xmm0
 // CHECK: encoding: [0x66,0x48,0x0f,0x6e,0xc7]
        movd %rdi,%xmm0
+
+// CHECK: movntil %eax, (%rdi)
+// CHECK: encoding: [0x0f,0xc3,0x07]
+// CHECK: movntil
+movntil %eax, (%rdi)
+movnti %eax, (%rdi)
+
+// CHECK: movntiq %rax, (%rdi)
+// CHECK: encoding: [0x48,0x0f,0xc3,0x07]
+// CHECK: movntiq
+movntiq %rax, (%rdi)
+movnti %rax, (%rdi)