diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/sh/sh.c | 13 |
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 |