i386.h (PREFERRED_RELOAD_CLASS): Respect an existing class narrower than FLOAT_REGS.
authorRichard Henderson <rth@cygnus.com>
Wed, 16 Sep 1998 15:26:22 +0000 (08:26 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 16 Sep 1998 15:26:22 +0000 (08:26 -0700)
        * i386.h (PREFERRED_RELOAD_CLASS): Respect an existing class
        narrower than FLOAT_REGS.

From-SVN: r22454

gcc/ChangeLog
gcc/config/i386/i386.h

index 8322f543611049bd86cfb5b2b933e131a8e50939..2f699a4352e13674ef32836142c50fc392be74f6 100644 (file)
@@ -1,3 +1,8 @@
+Wed Sep 16 15:24:54 1998  Richard Henderson  <rth@cygnus.com>
+
+       * i386.h (PREFERRED_RELOAD_CLASS): Respect an existing class
+       narrower than FLOAT_REGS.
+
 Wed Sep 16 17:51:00 1998  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
        * cpplib.c: removed OLD_GPLUSPLUS_INCLUDE_DIR
index ec0bf89fa2bac686533e1635917b528822031261..cce3a0bd2ec6adac625a70e96dd3af8b44c60035 100644 (file)
@@ -931,9 +931,11 @@ enum reg_class
    Narrow ALL_REGS to GENERAL_REGS.  This supports allowing movsf and
    movdf to do mem-to-mem moves through integer regs. */
 
-#define PREFERRED_RELOAD_CLASS(X,CLASS)        \
-  (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != VOIDmode \
-   ? (standard_80387_constant_p (X) ? FLOAT_REGS : NO_REGS) \
+#define PREFERRED_RELOAD_CLASS(X,CLASS)                                        \
+  (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != VOIDmode            \
+   ? (standard_80387_constant_p (X)                                    \
+      ? reg_class_subset_p (CLASS, FLOAT_REGS) ? CLASS : FLOAT_REGS    \
+      : NO_REGS)                                                       \
    : GET_MODE (X) == QImode && ! reg_class_subset_p (CLASS, Q_REGS) ? Q_REGS \
    : ((CLASS) == ALL_REGS                                              \
       && GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT) ? GENERAL_REGS   \