]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* i386.md (movdi-1, movdi): Rewrite based on SI move patterns.
authorJohn Wehle <john@feith.com>
Fri, 15 May 1998 20:41:47 +0000 (20:41 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 15 May 1998 20:41:47 +0000 (14:41 -0600)
From-SVN: r19786

gcc/ChangeLog
gcc/config/i386/i386.md

index f4066258538bfe64012f49800ae13f72a29ba262..c281bdd8aaa5689e4a499bdd35ec3eef13268111 100644 (file)
@@ -1,3 +1,7 @@
+Fri May 15 21:40:06 1998  John Wehle  (john@feith.com)
+
+       * i386.md (movdi-1, movdi): Rewrite based on SI move patterns.
+
 Fri May 15 18:55:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
 
        * tree.h (BINFO_SIZE, TYPE_BINFO_SIZE): New macros.
index 8baeddc000315561a2875e62b68c78c07f02f844..70687094b2f14f01eccdd054fa854001e17c8b30 100644 (file)
 }")
 
 (define_insn ""
-  [(set (match_operand:DI 0 "push_operand" "=<,<,<,<")
-       (match_operand:DI 1 "general_operand" "riF,o,o,o"))
-   (clobber (match_scratch:SI 2 "=X,&r,&r,X"))
-   (clobber (match_scratch:SI 3 "=X,&r,X,X"))]
+  [(set (match_operand:DI 0 "push_operand" "=<")
+       (match_operand:DI 1 "general_operand" "riF"))]
   ""
-  "*
-{
-  if (GET_CODE (operands[1]) != MEM)
-    return output_move_double (operands);
+  "* return output_move_double (operands);")
 
-  else
-    return output_move_pushmem (operands, insn, GET_MODE_SIZE (DImode), 2, 4);
-}")
+(define_insn ""
+  [(set (match_operand:DI 0 "push_operand" "=<")
+       (match_operand:DI 1 "memory_operand" "o"))]
+  "TARGET_PUSH_MEMORY"
+  "* return output_move_pushmem (operands, insn, GET_MODE_SIZE (DImode),0,0);")
 
-(define_insn "movdi"
-  [(set (match_operand:DI 0 "general_operand" "=o,o,r,rm")
-       (match_operand:DI 1 "general_operand" "o,o,m,riF"))
-   (clobber (match_scratch:SI 2 "=&r,&r,X,X"))
-   (clobber (match_scratch:SI 3 "=&r,X,X,X"))]
+(define_expand "movdi"
+  [(set (match_operand:DI 0 "general_operand" "")
+       (match_operand:DI 1 "general_operand" ""))]
   ""
-  "*
+  "
 {
-  rtx low[2], high[2], xop[6];
-
-  if (GET_CODE (operands[0]) != MEM || GET_CODE (operands[1]) != MEM)
-    return output_move_double (operands);
-  else
-    return output_move_memory (operands, insn, GET_MODE_SIZE (DImode), 2, 4);
+  /* Don't generate memory->memory moves, go through a register */
+  if (TARGET_MOVE
+      && (reload_in_progress | reload_completed) == 0
+      && GET_CODE (operands[0]) == MEM
+      && GET_CODE (operands[1]) == MEM)
+    {
+      operands[1] = force_reg (DImode, operands[1]);
+    }
 }")
 
+(define_insn ""
+  [(set (match_operand:DI 0 "general_operand" "=g,r")
+       (match_operand:DI 1 "general_operand" "riF,m"))]
+  "(!TARGET_MOVE || GET_CODE (operands[0]) != MEM)
+   || (GET_CODE (operands[1]) != MEM)"
+  "* return output_move_double (operands);")
+
 \f
 ;;- conversion instructions
 ;;- NONE