darwin.h (PREFERRED_RELOAD_CLASS): Always return a subset of the input class.
authorGeoffrey Keating <geoffk@apple.com>
Sat, 6 Sep 2003 04:07:18 +0000 (04:07 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Sat, 6 Sep 2003 04:07:18 +0000 (04:07 +0000)
* config/rs6000/darwin.h (PREFERRED_RELOAD_CLASS): Always return
a subset of the input class.

From-SVN: r71128

gcc/ChangeLog
gcc/config/rs6000/darwin.h

index a2af1cd5c4c8472afb472efde4cebd0bc021c325..0d57ffd9c961635bd88100a5909cfeed4a7d19ed 100644 (file)
@@ -1,3 +1,8 @@
+2003-09-05  Geoffrey Keating  <geoffk@apple.com>
+
+       * config/rs6000/darwin.h (PREFERRED_RELOAD_CLASS): Always return
+       a subset of the input class.
+
 2003-09-05  Kazu Hirata  <kazu@cs.umass.edu>
 
        * config/i860/i860.c: Follow spelling conventions.
index bee77b9299ead2bc3dcf96176419b2c6256e0052..4722826d691af3560c5e321ca570b5b07b8061a3 100644 (file)
@@ -245,16 +245,17 @@ do {                                                                      \
    a SYMBOL_REF.  */
 
 #undef PREFERRED_RELOAD_CLASS
-#define PREFERRED_RELOAD_CLASS(X,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                                      \
-   : (GET_CODE (X) == SYMBOL_REF || GET_CODE (X) == HIGH)      \
-   ? BASE_REGS                                         \
-   : (CLASS)))
+#define PREFERRED_RELOAD_CLASS(X,CLASS)                                \
+  ((GET_CODE (X) == CONST_DOUBLE                               \
+    && GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT)            \
+   ? NO_REGS                                                   \
+   : ((GET_CODE (X) == SYMBOL_REF || GET_CODE (X) == HIGH)     \
+      && reg_class_subset_p (BASE_REGS, (CLASS)))              \
+   ? BASE_REGS                                                 \
+   : (GET_MODE_CLASS (GET_MODE (X)) == MODE_INT                        \
+      && (CLASS) == NON_SPECIAL_REGS)                          \
+   ? GENERAL_REGS                                              \
+   : (CLASS))
 
 /* Fix for emit_group_load (): force large constants to be pushed via regs.  */
 #define ALWAYS_PUSH_CONSTS_USING_REGS_P                1