aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJ"orn Rennecke <joern.rennecke@superh.com>2002-04-12 10:55:32 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2002-04-12 11:55:32 +0100
commit18778292a06fff84ba30d2df3ea070c30b0a8f62 (patch)
treee9565315a8044232d6943b6463bdd9de18df2352 /gcc
parent4782bd5bee37845e7489a877239c59a569547e96 (diff)
downloadgcc-18778292a06fff84ba30d2df3ea070c30b0a8f62.zip
gcc-18778292a06fff84ba30d2df3ea070c30b0a8f62.tar.gz
gcc-18778292a06fff84ba30d2df3ea070c30b0a8f62.tar.bz2
sh.c (broken_move): Constant 0.
* sh.c (broken_move): Constant 0. / 1. load is OK if there is no r0 clobber. From-SVN: r52214
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/sh/sh.c13
2 files changed, 15 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1957b43..b62485a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Fri Apr 12 10:51:38 2002 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * sh.c (broken_move): Constant 0. / 1. load is OK if there is
+ no r0 clobber.
+
2002-04-12 Andreas Schwab <schwab@suse.de>
* config/ia64/ia64.h (EXTRA_SPECS): Fix missing backslash.
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index ff3c089..815d8dc 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -2507,9 +2507,16 @@ broken_move (insn)
&& GET_CODE (SET_SRC (pat)) == CONST_DOUBLE
&& (fp_zero_operand (SET_SRC (pat))
|| fp_one_operand (SET_SRC (pat)))
- /* ??? If this is a -m4 or -m4-single compilation, we don't
- know the current setting of fpscr, so disable fldi. */
- && (! TARGET_SH4 || TARGET_FMOVD)
+ /* ??? If this is a -m4 or -m4-single compilation, in general
+ we don't know the current setting of fpscr, so disable fldi.
+ There is an exception if this was a register-register move
+ before reload - and hence it was ascertained that we have
+ single precision setting - and in a post-reload optimization
+ we changed this to do a constant load. In that case
+ we don't have an r0 clobber, hence we must use fldi. */
+ && (! TARGET_SH4 || TARGET_FMOVD
+ || (GET_CODE (XEXP (XVECEXP (PATTERN (insn), 0, 2), 0))
+ == SCRATCH))
&& GET_CODE (SET_DEST (pat)) == REG
&& FP_REGISTER_P (REGNO (SET_DEST (pat))))
&& (GET_CODE (SET_SRC (pat)) != CONST_INT