PA64 bugfix

Jeffrey A Law law@cygnus.com
Tue Aug 3 13:14:00 GMT 1999


FP registers are still 4 bytes wide, even on PA64 -- ie, they are independent
of UNITS_PER_WORD.

This patch fixes HARD_REGNO_NREGS and CLASS_MAX_NREGS to be aware of that.

	* pa.h (HARD_REGNO_NREGS): FP registers are always 4 bytes wide for
	PA1.1 and above.
	(CLASS_MAX_NREGS): Likewise.

Index: pa.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/config/pa/pa.h,v
retrieving revision 1.168
diff -c -3 -p -r1.168 pa.h
*** pa.h	1999/07/31 11:29:41	1.168
--- pa.h	1999/08/03 20:13:34
*************** int lhs_lshift_cint_operand ();
*** 663,669 ****
     The floating point registers are 64 bits wide. Snake fp regs are 32
     bits wide */
  #define HARD_REGNO_NREGS(REGNO, MODE)					\
!   (!TARGET_PA_11 && FP_REGNO_P (REGNO) ? 1				\
     : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
  
  /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
--- 663,670 ----
     The floating point registers are 64 bits wide. Snake fp regs are 32
     bits wide */
  #define HARD_REGNO_NREGS(REGNO, MODE)					\
!   (FP_REGNO_P (REGNO)							\
!    ? (!TARGET_PA_11 ? 1 : (GET_MODE_SIZE (MODE) + 4 - 1) / 4)		\
     : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
  
  /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
*************** int zdepi_cint_p ();
*** 887,894 ****
  /* Return the maximum number of consecutive registers
     needed to represent mode MODE in a register of class CLASS.  */
  #define CLASS_MAX_NREGS(CLASS, MODE)					\
!   (!TARGET_PA_11 && ((CLASS) == FP_REGS || (CLASS) == FPUPPER_REGS) ? 1 :				
\
!    ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
  
  /* Stack layout; function entry, exit and calling.  */
  
--- 888,897 ----
  /* Return the maximum number of consecutive registers
     needed to represent mode MODE in a register of class CLASS.  */
  #define CLASS_MAX_NREGS(CLASS, MODE)					\
!   ((CLASS) == FP_REGS || (CLASS) == FPUPPER_REGS			\
!    ? (!TARGET_PA_11 ? 1 : (GET_MODE_SIZE (MODE) + 4 - 1) / 4)		\
!    : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
! 
  
  /* Stack layout; function entry, exit and calling.  */
  




More information about the Gcc-patches mailing list