diff options
author | Geoff Keating <geoffk@cygnus.com> | 2000-07-21 00:44:14 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2000-07-21 00:44:14 +0000 |
commit | 1e66d5559115b2cc657846ed95c9548dee14f235 (patch) | |
tree | 1987ae609d40fbb933dc6aa9d030cbdb48ecc017 | |
parent | 21f096b3a94f07afe91cd16bba48aa7c143eb785 (diff) | |
download | gcc-1e66d5559115b2cc657846ed95c9548dee14f235.zip gcc-1e66d5559115b2cc657846ed95c9548dee14f235.tar.gz gcc-1e66d5559115b2cc657846ed95c9548dee14f235.tar.bz2 |
rs6000.h (PREFERRED_RELOAD_CLASS): If we have a choice, don't put integer values in FP regs.
* config/rs6000/rs6000.h (PREFERRED_RELOAD_CLASS): If we have a
choice, don't put integer values in FP regs.
From-SVN: r35162
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.h | 22 |
2 files changed, 23 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1a6b8bd..985e5c9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-07-20 Geoff Keating <geoffk@cygnus.com> + + * config/rs6000/rs6000.h (PREFERRED_RELOAD_CLASS): If we have a + choice, don't put integer values in FP regs. + Thu Jul 20 18:13:52 2000 Jeffrey A Law (law@cygnus.com) * flow.c (verify_flow_info): Revamp code to verify that the diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 375d379..1247397 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -1105,12 +1105,26 @@ enum reg_class in some cases it is preferable to use a more restrictive class. On the RS/6000, we have to return NO_REGS when we want to reload a - floating-point CONST_DOUBLE to force it to be copied to memory. */ + floating-point CONST_DOUBLE to force it to be copied to memory. + + We also don't want to reload integer values into floating-point + registers if we can at all help it. In fact, this can + cause reload to abort, if it tries to generate a reload of CTR + into a FP register and discovers it doesn't have the memory location + required. + + ??? Would it be a good idea to have reload do the converse, that is + try to reload floating modes into FP registers if possible? + */ #define PREFERRED_RELOAD_CLASS(X,CLASS) \ - ((GET_CODE (X) == CONST_DOUBLE \ - && GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT) \ - ? NO_REGS : (CLASS)) + (((GET_CODE (X) == CONST_DOUBLE \ + && GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT) \ + ? NO_REGS \ + : (GET_MODE_CLASS (GET_MODE (X)) == MODE_INT \ + && (CLASS) == NON_SPECIAL_REGS) \ + ? GENERAL_REGS \ + : (CLASS))) /* Return the register class of a scratch register needed to copy IN into or out of a register in CLASS in MODE. If it can be done directly, |