i386.c (split_xf): New.
authorRichard Henderson <rth@cygnus.com>
Fri, 5 Nov 1999 18:19:55 +0000 (10:19 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 5 Nov 1999 18:19:55 +0000 (10:19 -0800)
        * i386.c (split_xf): New.
        * i386-protos.h: Declare it.
        * i386.md (movxf_1): Add general regs alternatives.
        (movxf_1+1): New splitter for same.

From-SVN: r30419

gcc/ChangeLog
gcc/config/i386/i386-protos.h
gcc/config/i386/i386.c
gcc/config/i386/i386.md

index 77bbb5675357fbcda84fb725d51c5c65d53441b5..477361cad65cbc37e7ead7ed03a34f95967f4b66 100644 (file)
@@ -1,3 +1,10 @@
+Fri Nov  5 10:18:11 1999  Richard Henderson  <rth@cygnus.com>
+
+       * i386.c (split_xf): New.
+       * i386-protos.h: Declare it.
+       * i386.md (movxf_1): Add general regs alternatives.
+       (movxf_1+1): New splitter for same.
+
 Fri Nov  5 12:05:52 1999  Nick Clifton  <nickc@cygnus.com>
 
        * function.c (purge_addressof_1): Add missing return values.
index dafbcd15af99ff9eee7117aca8c302e5ebac36b8..7468ce80c2aa278be42b2a88e26ff62de2ed6a3f 100644 (file)
@@ -73,6 +73,7 @@ extern void print_operand PROTO((FILE*, rtx, int));
 extern void print_operand_address PROTO((FILE*, rtx));
 
 extern void split_di PROTO((rtx[], int, rtx[], rtx[]));
+extern void split_xf PROTO((rtx, rtx[3]));
 
 extern char *output_387_binary_op PROTO((rtx, rtx*));
 extern char *output_fix_trunc PROTO((rtx, rtx*));
index 0a8b1f6f3108b850fe0f4dac8f3c06089e72eabd..090196002432af82c52eafe0b940ba09504ea045 100644 (file)
@@ -2995,6 +2995,26 @@ split_di (operands, num, lo_half, hi_half)
        abort();
     }
 }
+
+void
+split_xf (orig, out)
+     rtx orig;
+     rtx out[3];
+{
+  if (REG_P (orig))
+    {
+      int regno = REGNO (orig);
+      out[0] = gen_rtx_REG (SImode, regno);
+      out[1] = gen_rtx_REG (SImode, regno + 1);
+      out[2] = gen_rtx_REG (SImode, regno + 2);
+    }
+  else
+    {
+      out[0] = change_address (orig, SImode, NULL_RTX);
+      out[1] = adj_offsettable_operand (out[0], 4);
+      out[2] = adj_offsettable_operand (out[0], 8);
+    }
+}
 \f
 /* Output code to perform a 387 binary operation in INSN, one of PLUS,
    MINUS, MULT or DIV.  OPERANDS are the insn operands, where operands[3]
index 73a9e98ee5acd74ceebb34fcf85c9bea6742f5d8..91745f197617de624a79a43e82f34f4fa7e69a93 100644 (file)
 }")
 
 (define_insn "*movxf_1"
-  [(set (match_operand:XF 0 "nonimmediate_operand" "=f,m,f")
-       (match_operand:XF 1 "general_operand" "fm,f,G"))]
+  [(set (match_operand:XF 0 "nonimmediate_operand" "=f,m,f,*r,o")
+       (match_operand:XF 1 "general_operand" "fm,f,G,*ro,*r"))]
   ""
   "*
 {
          return \"fld1\";
        }
       break;
+
+    case 3: case 4:
+      return \"#\";
     }
   abort();
 }"
   [(set_attr "type" "fmov")])
 
+(define_split
+  [(set (match_operand:XF 0 "nonimmediate_operand" "")
+       (match_operand:XF 1 "nonimmediate_operand" ""))]
+  "(REG_P (operands[0]) && ! FP_REGNO_P (REGNO (operands[0])))
+   || (REG_P (operands[1]) && ! FP_REGNO_P (REGNO (operands[1])))"
+  [(set (match_dup 0) (match_dup 3))
+   (set (match_dup 1) (match_dup 4))
+   (set (match_dup 2) (match_dup 5))]
+  "split_xf (operands[1], &operands[3]);
+   split_xf (operands[0], &operands[0]);")
+
 (define_insn "swapxf"
   [(set (match_operand:XF 0 "register_operand" "+f")
        (match_operand:XF 1 "register_operand" "+f"))