summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1997-12-05 01:10:51 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1997-12-05 01:10:51 +0000
commit4d14e18755680e50f217bb0da6ef18198a3efe08 (patch)
tree37399725b7ef195a6d8331fdab268fff48c07a1b
parent0b2d5a8332f0c860245a2b6bff17940ac8c8c56e (diff)
downloadgcc-4d14e18755680e50f217bb0da6ef18198a3efe08.tar.gz
Add patch from release branch accidentally left off the mainline.
* mips.md (fix_truncdfsi2, fix_truncsfsi2, fix_truncdfdi2, fix_truncsfdi2): Change *X to ?*X. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16954 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/mips/mips.md14
2 files changed, 15 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4394e75bf15..bccce410e2a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -118,6 +118,11 @@ Tue Nov 25 23:33:29 1997 scott snyder <snyder@d0sgif.fnal.gov>
* libgcc2.c (__throw): Initialize HANDLER.
+Tue Nov 25 14:08:12 1997 Jim Wilson <wilson@cygnus.com>
+
+ * mips.md (fix_truncdfsi2, fix_truncsfsi2, fix_truncdfdi2,
+ fix_truncsfdi2): Change *X to ?*X.
+
Tue Nov 25 10:00:42 1997 Richard Henderson (rth@cygnus.com)
* alpha.h (CONST_OK_FOR_LETTER): Fix 'L' handling.
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index dcd82fde571..27958ca0efc 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -2773,11 +2773,17 @@ move\\t%0,%z4\\n\\
;; operand zero, because then the address in the move instruction will be
;; clobbered. We mark the scratch register as early clobbered to prevent this.
+;; We need the ?X in alternative 1 so that it will be choosen only if the
+;; destination is a floating point register. Otherwise, alternative 1 can
+;; have lower cost than alternative 0 (because there is one less loser), and
+;; can be choosen when it won't work (because integral reloads into FP
+;; registers are not supported).
+
(define_insn "fix_truncdfsi2"
[(set (match_operand:SI 0 "general_operand" "=d,*f,R,o")
(fix:SI (match_operand:DF 1 "register_operand" "f,*f,f,f")))
(clobber (match_scratch:SI 2 "=d,*d,&d,&d"))
- (clobber (match_scratch:DF 3 "=f,*X,f,f"))]
+ (clobber (match_scratch:DF 3 "=f,?*X,f,f"))]
"TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT"
"*
{
@@ -2802,7 +2808,7 @@ move\\t%0,%z4\\n\\
[(set (match_operand:SI 0 "general_operand" "=d,*f,R,o")
(fix:SI (match_operand:SF 1 "register_operand" "f,*f,f,f")))
(clobber (match_scratch:SI 2 "=d,*d,&d,&d"))
- (clobber (match_scratch:SF 3 "=f,*X,f,f"))]
+ (clobber (match_scratch:SF 3 "=f,?*X,f,f"))]
"TARGET_HARD_FLOAT"
"*
{
@@ -2835,7 +2841,7 @@ move\\t%0,%z4\\n\\
(define_insn "fix_truncdfdi2"
[(set (match_operand:DI 0 "general_operand" "=d,*f,R,o")
(fix:DI (match_operand:DF 1 "register_operand" "f,*f,f,f")))
- (clobber (match_scratch:DF 2 "=f,*X,f,f"))]
+ (clobber (match_scratch:DF 2 "=f,?*X,f,f"))]
"TARGET_HARD_FLOAT && TARGET_64BIT && TARGET_DOUBLE_FLOAT"
"*
{
@@ -2862,7 +2868,7 @@ move\\t%0,%z4\\n\\
(define_insn "fix_truncsfdi2"
[(set (match_operand:DI 0 "general_operand" "=d,*f,R,o")
(fix:DI (match_operand:SF 1 "register_operand" "f,*f,f,f")))
- (clobber (match_scratch:DF 2 "=f,*X,f,f"))]
+ (clobber (match_scratch:DF 2 "=f,?*X,f,f"))]
"TARGET_HARD_FLOAT && TARGET_64BIT && TARGET_DOUBLE_FLOAT"
"*
{