This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Small fix for i386.h


For standard 387 constants, PREFERRED_RELOAD_CLASS currently returns
FP_TOP_REG.  That's correct from a reg-stack perspective, but for reload
purposes, any float reg will do.  This patch avoids compiler aborts for
some asm statements that occur in the glibc-2.0.95 sources.  These aborts
happen when there is an asm statement that has two inputs, one for the top
reg and one for the second reg, where the input value for the second
operand is such a constant.  Reload will abort because it can't reload
both operands into the top register.

Bernd

	* i386.h (PREFERRED_RELOAD_CLASS): For standard 387 constants,
	return FLOAT_REGS.


Index: gcc/config/i386/i386.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/i386.h,v
retrieving revision 1.34
diff -u -p -r1.34 i386.h
--- i386.h	1998/09/08 22:48:00	1.34
+++ i386.h	1998/09/15 11:56:16
@@ -933,7 +933,7 @@ enum reg_class
 
 #define PREFERRED_RELOAD_CLASS(X,CLASS)	\
   (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != VOIDmode \
-   ? (standard_80387_constant_p (X) ? FP_TOP_REG : NO_REGS) \
+   ? (standard_80387_constant_p (X) ? 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	\



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]