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]

Re: Small fix for i386.h


On Tue, Sep 15, 1998 at 01:50:39PM +0200, Bernd Schmidt wrote:
> 	* i386.h (PREFERRED_RELOAD_CLASS): For standard 387 constants,
> 	return FLOAT_REGS.

Actually, this is not quite correct, as can be seen when bootstrapping
the compiler under glibc 2.0.95 -- PREFERRED_RELOAD_CLASS must respect
an existing class narrower than FLOAT_REGS.  To do otherwise discards
asm constraints like "t".

I'll commit the following correction.


r~


	* i386.h (PREFERRED_RELOAD_CLASS): Respect an existing class
	narrower than FLOAT_REGS.

Index: config/i386/i386.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/i386/i386.h,v
retrieving revision 1.35
diff -c -p -d -r1.35 i386.h
*** i386.h	1998/09/15 19:23:31	1.35
--- i386.h	1998/09/16 22:14:13
*************** enum reg_class
*** 931,939 ****
     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) \
     : 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	\
--- 931,941 ----
     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)					\
!       ? 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	\


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