aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/i386-protos.h1
-rw-r--r--gcc/config/i386/i386.c20
-rw-r--r--gcc/config/i386/i386.md18
4 files changed, 44 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 77bbb56..477361c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
index dafbcd1..7468ce8 100644
--- a/gcc/config/i386/i386-protos.h
+++ b/gcc/config/i386/i386-protos.h
@@ -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*));
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 0a8b1f6..0901960 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -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);
+ }
+}
/* 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]
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 73a9e98..91745f1 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -1980,8 +1980,8 @@
}")
(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"))]
""
"*
{
@@ -2013,11 +2013,25 @@
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"))