]> gcc.gnu.org Git - gcc.git/commitdiff
i386.md (floatsisf2, [...]): Rewrite using a splitter.
authorJohn Wehle <john@feith.com>
Fri, 2 Apr 1999 21:58:42 +0000 (21:58 +0000)
committerJohn Wehle <wehle@gcc.gnu.org>
Fri, 2 Apr 1999 21:58:42 +0000 (21:58 +0000)
* i386.md (floatsisf2, floatdisf2, floatsidf2, floatdidf2,
floatsixf2, floatdixf2): Rewrite using a splitter.

From-SVN: r26145

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

index 21afe87981f7365c3d47571577e9fbd26d9c5a53..27384c1fad045e135e417fdb15a8c35754260203 100644 (file)
@@ -1,3 +1,8 @@
+Sat Apr  3 00:53:29 EST 1999  John Wehle  (john@feith.com)
+
+       * i386.md (floatsisf2, floatdisf2, floatsidf2, floatdidf2,
+       floatsixf2, floatdixf2): Rewrite using a splitter.
+
 Fri Apr  2 17:36:10 1999  Nick Clifton  <nickc@cygnus.com>
 
        * config/arm/arm.c (arm_print_operand): Print large constants in
index e5faf1d140eb537bffd28f07fdc860976789e6e3..d434366d3204ddcbc3931f23639f5dd53d81762a 100644 (file)
   "* return output_fix_trunc (insn, operands);")
 \f
 ;; Conversion between fixed point and floating point.
-;; The actual pattern that matches these is at the end of this file.
 
 ;; ??? Possibly represent floatunssidf2 here in gcc2.
 
 (define_expand "floatsisf2"
-  [(set (match_operand:SF 0 "register_operand" "")
-       (float:SF (match_operand:SI 1 "nonimmediate_operand" "")))]
+  [(parallel [(set (match_operand:SF 0 "register_operand" "")
+                  (float:SF (match_operand:SI 1 "nonimmediate_operand" "")))
+             (clobber (match_dup 2))])]
+  "TARGET_80387"
+  "operands[2] = assign_386_stack_local (SImode, 0);")
+
+(define_insn ""
+  [(set (match_operand:SF 0 "register_operand" "=f,f")
+       (float:SF (match_operand:SI 1 "nonimmediate_operand" "m,!r")))
+   (clobber (match_operand:SI 2 "memory_operand" "m,m"))]
   "TARGET_80387"
+  "#")
+
+(define_split
+  [(set (match_operand:SF 0 "register_operand" "=f")
+       (float:SF (match_operand:SI 1 "memory_operand" "m")))
+   (clobber (match_operand:SI 2 "memory_operand" "m"))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 0)
+       (float:SF (match_dup 1)))]
+  "")
+
+(define_split
+  [(set (match_operand:SF 0 "register_operand" "=f")
+       (float:SF (match_operand:SI 1 "register_operand" "r")))
+   (clobber (match_operand:SI 2 "memory_operand" "m"))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 2)
+       (match_dup 1))
+   (set (match_dup 0)
+       (float:SF (match_dup 2)))]
   "")
 
+(define_insn ""
+  [(set (match_operand:SF 0 "register_operand" "=f")
+       (float:SF (match_operand:SI 1 "memory_operand" "m")))]
+  "TARGET_80387"
+  "* return AS1 (fild%z1,%1);"
+  [(set_attr "type" "fpop")])
+
 (define_expand "floatdisf2"
-  [(set (match_operand:SF 0 "register_operand" "")
-       (float:SF (match_operand:DI 1 "nonimmediate_operand" "")))]
+  [(parallel [(set (match_operand:SF 0 "register_operand" "")
+                  (float:SF (match_operand:DI 1 "nonimmediate_operand" "")))
+             (clobber (match_dup 2))])]
   "TARGET_80387"
-  "")
+  "operands[2] = assign_386_stack_local (DImode, 0);")
 
-(define_expand "floatsidf2"
-  [(set (match_operand:DF 0 "register_operand" "")
-       (float:DF (match_operand:SI 1 "nonimmediate_operand" "")))]
+(define_insn ""
+  [(set (match_operand:SF 0 "register_operand" "=f,f")
+       (float:SF (match_operand:DI 1 "nonimmediate_operand" "m,!r")))
+      (clobber (match_operand:DI 2 "memory_operand" "m,o"))]
   "TARGET_80387"
+  "#")
+
+(define_split
+  [(set (match_operand:SF 0 "register_operand" "=f")
+       (float:SF (match_operand:DI 1 "memory_operand" "m")))
+   (clobber (match_operand:DI 2 "memory_operand" "m"))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 0)
+       (float:SF (match_dup 1)))]
   "")
 
-(define_expand "floatdidf2"
-  [(set (match_operand:DF 0 "register_operand" "")
-       (float:DF (match_operand:DI 1 "nonimmediate_operand" "")))]
-  "TARGET_80387"
+(define_split
+  [(set (match_operand:SF 0 "register_operand" "=f")
+       (float:SF (match_operand:DI 1 "register_operand" "r")))
+   (clobber (match_operand:DI 2 "memory_operand" "o"))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 2)
+       (match_dup 1))
+   (set (match_dup 0)
+       (float:SF (match_dup 2)))]
   "")
 
-(define_expand "floatsixf2"
-  [(set (match_operand:XF 0 "register_operand" "")
-       (float:XF (match_operand:SI 1 "nonimmediate_operand" "")))]
+(define_insn ""
+  [(set (match_operand:SF 0 "register_operand" "=f")
+       (float:SF (match_operand:DI 1 "memory_operand" "m")))]
+  "TARGET_80387"
+  "* return AS1 (fild%z1,%1);"
+  [(set_attr "type" "fpop")])
+
+(define_expand "floatsidf2"
+  [(parallel [(set (match_operand:DF 0 "register_operand" "")
+                  (float:DF (match_operand:SI 1 "nonimmediate_operand" "")))
+             (clobber (match_dup 2))])]
   "TARGET_80387"
+  "operands[2] = assign_386_stack_local (SImode, 0);")
+
+(define_insn ""
+  [(set (match_operand:DF 0 "register_operand" "=f,f")
+       (float:DF (match_operand:SI 1 "nonimmediate_operand" "m,!r")))
+   (clobber (match_operand:SI 2 "memory_operand" "m,m"))]
+  "TARGET_80387"
+  "#")
+
+(define_split
+  [(set (match_operand:DF 0 "register_operand" "=f")
+       (float:DF (match_operand:SI 1 "memory_operand" "m")))
+   (clobber (match_operand:SI 2 "memory_operand" "m"))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 0)
+       (float:DF (match_dup 1)))]
   "")
 
-(define_expand "floatdixf2"
-  [(set (match_operand:XF 0 "register_operand" "")
-       (float:XF (match_operand:DI 1 "nonimmediate_operand" "")))]
-  "TARGET_80387 && LONG_DOUBLE_TYPE_SIZE == 96"
+(define_split
+  [(set (match_operand:DF 0 "register_operand" "=f")
+       (float:DF (match_operand:SI 1 "register_operand" "r")))
+   (clobber (match_operand:SI 2 "memory_operand" "m"))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 2)
+       (match_dup 1))
+   (set (match_dup 0)
+       (float:DF (match_dup 2)))]
   "")
 
-;; This will convert from SImode or DImode to MODE_FLOAT.
+(define_insn ""
+  [(set (match_operand:DF 0 "register_operand" "=f")
+       (float:DF (match_operand:SI 1 "memory_operand" "m")))]
+  "TARGET_80387"
+  "* return AS1 (fild%z1,%1);"
+  [(set_attr "type" "fpop")])
+
+(define_expand "floatdidf2"
+  [(parallel [(set (match_operand:DF 0 "register_operand" "")
+                  (float:DF (match_operand:DI 1 "nonimmediate_operand" "")))
+             (clobber (match_dup 2))])]
+  "TARGET_80387"
+  "operands[2] = assign_386_stack_local (DImode, 0);")
 
 (define_insn ""
-  [(set (match_operand:XF 0 "register_operand" "=f")
-       (float:XF (match_operand:DI 1 "nonimmediate_operand" "rm")))]
+  [(set (match_operand:DF 0 "register_operand" "=f,f")
+       (float:DF (match_operand:DI 1 "nonimmediate_operand" "m,!r")))
+   (clobber (match_operand:DI 2 "memory_operand" "m,o"))]
   "TARGET_80387"
-  "*
-{
-  if (NON_STACK_REG_P (operands[1]))
-    {
-      output_op_from_reg (operands[1], AS1 (fild%z0,%1));
-      RET;
-    }
-  else if (GET_CODE (operands[1]) == MEM)
-    return AS1 (fild%z1,%1);
-  else
-    abort ();
-}")
+  "#")
+
+(define_split
+  [(set (match_operand:DF 0 "register_operand" "=f")
+       (float:DF (match_operand:DI 1 "memory_operand" "m")))
+   (clobber (match_operand:DI 2 "memory_operand" "m"))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 0)
+       (float:DF (match_dup 1)))]
+  "")
+
+(define_split
+  [(set (match_operand:DF 0 "register_operand" "=f")
+       (float:DF (match_operand:DI 1 "register_operand" "r")))
+   (clobber (match_operand:DI 2 "memory_operand" "o"))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 2)
+       (match_dup 1))
+   (set (match_dup 0)
+       (float:DF (match_dup 2)))]
+  "")
 
 (define_insn ""
   [(set (match_operand:DF 0 "register_operand" "=f")
-       (float:DF (match_operand:DI 1 "nonimmediate_operand" "rm")))]
+       (float:DF (match_operand:DI 1 "memory_operand" "m")))]
   "TARGET_80387"
-  "*
-{
-  if (NON_STACK_REG_P (operands[1]))
-    {
-      output_op_from_reg (operands[1], AS1 (fild%z0,%1));
-      RET;
-    }
-  else if (GET_CODE (operands[1]) == MEM)
-    return AS1 (fild%z1,%1);
-  else
-    abort ();
-}")
+  "* return AS1 (fild%z1,%1);"
+  [(set_attr "type" "fpop")])
+
+(define_expand "floatsixf2"
+  [(parallel [(set (match_operand:XF 0 "register_operand" "")
+                  (float:XF (match_operand:SI 1 "nonimmediate_operand" "")))
+             (clobber (match_dup 2))])]
+  "TARGET_80387"
+  "operands[2] = assign_386_stack_local (SImode, 0);")
 
 (define_insn ""
-  [(set (match_operand:SF 0 "register_operand" "=f")
-       (float:SF (match_operand:DI 1 "nonimmediate_operand" "rm")))]
+  [(set (match_operand:XF 0 "register_operand" "=f,f")
+       (float:XF (match_operand:SI 1 "nonimmediate_operand" "m,!r")))
+   (clobber (match_operand:SI 2 "memory_operand" "m,m"))]
   "TARGET_80387"
-  "*
-{
-  if (NON_STACK_REG_P (operands[1]))
-    {
-      output_op_from_reg (operands[1], AS1 (fild%z0,%1));
-      RET;
-    }
-  else if (GET_CODE (operands[1]) == MEM)
-    return AS1 (fild%z1,%1);
-  else
-    abort ();
-}")
+  "#")
+
+(define_split
+  [(set (match_operand:XF 0 "register_operand" "=f")
+       (float:XF (match_operand:SI 1 "memory_operand" "m")))
+   (clobber (match_operand:SI 2 "memory_operand" "m"))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 0)
+       (float:XF (match_dup 1)))]
+  "")
+
+(define_split
+  [(set (match_operand:XF 0 "register_operand" "=f")
+       (float:XF (match_operand:SI 1 "register_operand" "r")))
+   (clobber (match_operand:SI 2 "memory_operand" "m"))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 2)
+       (match_dup 1))
+   (set (match_dup 0)
+       (float:XF (match_dup 2)))]
+  "")
 
 (define_insn ""
-  [(set (match_operand:DF 0 "register_operand" "=f")
-       (float:DF (match_operand:SI 1 "nonimmediate_operand" "rm")))]
+  [(set (match_operand:XF 0 "register_operand" "=f")
+       (float:XF (match_operand:SI 1 "memory_operand" "m")))]
   "TARGET_80387"
-  "*
-{
-  if (NON_STACK_REG_P (operands[1]))
-    {
-      output_op_from_reg (operands[1], AS1 (fild%z0,%1));
-      RET;
-    }
-  else if (GET_CODE (operands[1]) == MEM)
-    return AS1 (fild%z1,%1);
-  else
-    abort ();
-}")
+  "* return AS1 (fild%z1,%1);"
+  [(set_attr "type" "fpop")])
+
+(define_expand "floatdixf2"
+  [(parallel [(set (match_operand:XF 0 "register_operand" "")
+                  (float:XF (match_operand:DI 1 "nonimmediate_operand" "")))
+             (clobber (match_dup 2))])]
+  "TARGET_80387"
+  "operands[2] = assign_386_stack_local (DImode, 0);")
 
 (define_insn ""
   [(set (match_operand:XF 0 "register_operand" "=f,f")
-       (float:XF (match_operand:SI 1 "nonimmediate_operand" "m,!*r")))]
+       (float:XF (match_operand:DI 1 "nonimmediate_operand" "m,!r")))
+   (clobber (match_operand:DI 2 "memory_operand" "m,o"))]
   "TARGET_80387"
-  "*
-{
-  if (NON_STACK_REG_P (operands[1]))
-    {
-      output_op_from_reg (operands[1], AS1 (fild%z0,%1));
-      RET;
-    }
-  else if (GET_CODE (operands[1]) == MEM)
-    return AS1 (fild%z1,%1);
-  else
-    abort ();
-}")
+  "#")
+
+(define_split
+  [(set (match_operand:XF 0 "register_operand" "=f")
+       (float:XF (match_operand:DI 1 "memory_operand" "m")))
+   (clobber (match_operand:DI 2 "memory_operand" "m"))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 0)
+       (float:XF (match_dup 1)))]
+  "")
+
+(define_split
+  [(set (match_operand:XF 0 "register_operand" "=f")
+       (float:XF (match_operand:DI 1 "register_operand" "r")))
+   (clobber (match_operand:DI 2 "memory_operand" "o"))]
+  "TARGET_80387 && reload_completed"
+  [(set (match_dup 2)
+       (match_dup 1))
+   (set (match_dup 0)
+       (float:XF (match_dup 2)))]
+  "")
 
 (define_insn ""
-  [(set (match_operand:SF 0 "register_operand" "=f")
-       (float:SF (match_operand:SI 1 "nonimmediate_operand" "rm")))]
+  [(set (match_operand:XF 0 "register_operand" "=f")
+       (float:XF (match_operand:DI 1 "memory_operand" "m")))]
   "TARGET_80387"
-  "*
-{
-  if (NON_STACK_REG_P (operands[1]))
-    {
-      output_op_from_reg (operands[1], AS1 (fild%z0,%1));
-      RET;
-    }
-  else if (GET_CODE (operands[1]) == MEM)
-    return AS1 (fild%z1,%1);
-  else
-    abort ();
-}")
+  "* return AS1 (fild%z1,%1);"
+  [(set_attr "type" "fpop")])
 \f
 ;;- add instructions
 
This page took 0.098556 seconds and 5 git commands to generate.