From c91dead9bea812cbca3f8bce8b2e119813303328 Mon Sep 17 00:00:00 2001
From: Richard Henderson <rth@gcc.gnu.org>
Date: Sun, 26 Dec 2004 19:50:51 -0800
Subject: [PATCH] i386.md (mov<MMXMODEI>_internal_rex64): New.

        * config/i386/i386.md (mov<MMXMODEI>_internal_rex64): New.
        (movv2sf_internal_rex64): New.
        (mov<MMXMODEI>_internal): Use no register preferences at all.
        (movv2sf_internal): Likewise.

From-SVN: r92634
---
 gcc/config/i386/i386.md | 54 ++++++++++++++++++++++++++++++++++++++---
 1 file changed, 50 insertions(+), 4 deletions(-)

diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index c03622665d77..ad3275043be4 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -19853,11 +19853,34 @@
   DONE;
 })
 
+(define_insn "*mov<mode>_internal_rex64"
+  [(set (match_operand:MMXMODEI 0 "nonimmediate_operand"
+				"=rm,r,*y,*y ,m ,*y,Y ,x,x ,m,r,x")
+	(match_operand:MMXMODEI 1 "vector_move_operand"
+				"Cr ,m,C ,*ym,*y,Y ,*y,C,xm,x,x,r"))]
+  "TARGET_64BIT && TARGET_MMX
+   && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)"
+  "@
+    movq\t{%1, %0|%0, %1}
+    movq\t{%1, %0|%0, %1}
+    pxor\t%0, %0
+    movq\t{%1, %0|%0, %1}
+    movq\t{%1, %0|%0, %1}
+    movdq2q\t{%1, %0|%0, %1}
+    movq2dq\t{%1, %0|%0, %1}
+    pxor\t%0, %0
+    movq\t{%1, %0|%0, %1}
+    movq\t{%1, %0|%0, %1}
+    movd\t{%1, %0|%0, %1}
+    movd\t{%1, %0|%0, %1}"
+  [(set_attr "type" "imov,imov,mmxmov,mmxmov,mmxmov,ssecvt,ssecvt,ssemov,ssemov,ssemov,ssemov,ssemov")
+   (set_attr "mode" "DI")])
+
 (define_insn "*mov<mode>_internal"
   [(set (match_operand:MMXMODEI 0 "nonimmediate_operand"
-					"=y,y ,m,!y,!*Y,*x,?*x,?m")
+					"=*y,*y ,m ,*y,*Y,*x,*x ,m")
 	(match_operand:MMXMODEI 1 "vector_move_operand"
-					"C ,ym,y,*Y,y  ,C ,*xm,*x"))]
+					"C  ,*ym,*y,*Y,*y,C ,*xm,*x"))]
   "TARGET_MMX
    && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)"
   "@
@@ -19881,11 +19904,34 @@
   DONE;
 })
 
+(define_insn "*movv2sf_internal_rex64"
+  [(set (match_operand:V2SF 0 "nonimmediate_operand"
+				"=rm,r,*y ,*y ,m ,*y,Y ,x,x ,m,r,x")
+        (match_operand:V2SF 1 "vector_move_operand"
+				"Cr ,m ,C ,*ym,*y,Y ,*y,C,xm,x,x,r"))]
+  "TARGET_64BIT && TARGET_MMX
+   && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)"
+  "@
+    movq\t{%1, %0|%0, %1}
+    movq\t{%1, %0|%0, %1}
+    pxor\t%0, %0
+    movq\t{%1, %0|%0, %1}
+    movq\t{%1, %0|%0, %1}
+    movdq2q\t{%1, %0|%0, %1}
+    movq2dq\t{%1, %0|%0, %1}
+    xorps\t%0, %0
+    movlps\t{%1, %0|%0, %1}
+    movlps\t{%1, %0|%0, %1}
+    movd\t{%1, %0|%0, %1}
+    movd\t{%1, %0|%0, %1}"
+  [(set_attr "type" "imov,imov,mmxmov,mmxmov,mmxmov,ssecvt,ssecvt,ssemov,ssemov,ssemov,ssemov,ssemov")
+   (set_attr "mode" "DI,DI,DI,DI,DI,DI,DI,V4SF,V2SF,V2SF,DI,DI")])
+
 (define_insn "*movv2sf_internal"
   [(set (match_operand:V2SF 0 "nonimmediate_operand"
-					"=y,y ,m,!y,!*Y,*x,?*x,?m")
+					"=*y,*y ,m,*y,*Y,*x,*x ,m")
         (match_operand:V2SF 1 "vector_move_operand"
-					"C ,ym,y,*Y,y  ,C ,*xm,*x"))]
+					"C ,*ym,*y,*Y,*y,C ,*xm,*x"))]
   "TARGET_MMX
    && (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)"
   "@
-- 
GitLab