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]

IA-64 XFmode register allocation bug fix


This fixes a bug report I got from somone working on the java compiler.
The recently added movxf_internal pattern caused a build failure when
register allocation tried to put an XFmode value in the integer registers.

2000-06-29  James E. Wilson  <wilson@cygnus.com>

	* config/ia64/ia64.h (MODES_TIEABLE_P): Only tie if mode class is the
	same.  Only tie XFmode with XFmode.

Index: ia64.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/ia64/ia64.h,v
retrieving revision 1.22
diff -p -r1.22 ia64.h
*** ia64.h	2000/06/27 02:26:21	1.22
--- ia64.h	2000/06/29 18:40:48
*************** while (0)
*** 810,816 ****
  /* A C expression that is nonzero if it is permissible to store a value of mode
     MODE in hard register number REGNO (or in several registers starting with
     that one).  */
! 
  #define HARD_REGNO_MODE_OK(REGNO, MODE) \
    (PR_REGNO_P (REGNO) ? (MODE) == CCmode : 1)
  
--- 810,816 ----
  /* A C expression that is nonzero if it is permissible to store a value of mode
     MODE in hard register number REGNO (or in several registers starting with
     that one).  */
! /* ??? movxf_internal does not support XFmode values in integer registers.  */
  #define HARD_REGNO_MODE_OK(REGNO, MODE) \
    (PR_REGNO_P (REGNO) ? (MODE) == CCmode : 1)
  
*************** while (0)
*** 824,830 ****
  /* ??? If the comments are true, then this must be zero if one mode is CCmode,
     INTEGRAL_MODE_P or FLOAT_MODE_P and the other is not.  Otherwise, it is
     true.  */
! #define MODES_TIEABLE_P(MODE1, MODE2) 1
  
  /* Define this macro if the compiler should avoid copies to/from CCmode
     registers.  You should only define this macro if support fo copying to/from
--- 824,835 ----
  /* ??? If the comments are true, then this must be zero if one mode is CCmode,
     INTEGRAL_MODE_P or FLOAT_MODE_P and the other is not.  Otherwise, it is
     true.  */
! /* Don't tie integer and FP modes, as that causes us to get integer registers
!    allocated for FP instructions.  XFmode only supported in FP registers at
!    the moment, so we can't tie it with any other modes.  */
! #define MODES_TIEABLE_P(MODE1, MODE2) \
!   ((GET_MODE_CLASS (MODE1) == GET_MODE_CLASS (MODE2)) \
!    && (((MODE1) == XFmode) == ((MODE2) == XFmode)))
  
  /* Define this macro if the compiler should avoid copies to/from CCmode
     registers.  You should only define this macro if support fo copying to/from

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