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]

Problem with zero-length parameters on PA


If you have a zero-length parameter on the PA, DECL_RTL doesn't get set.
This is because FUNCTION_ARG_BOUNDARY will return 0 in such a case and the
code in assign_parms ends up not setting DECL_RTL because of this.  That
code is suspect, but I'm not sure precisely what it's trying to do and it's
clearly wrong for FUNCTION_ARG_BOUNDARY to ever return 0, so I fixed it
this way:

Tue Dec 21 07:06:36 1999  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* pa.h (FUNCTION_ARG_BOUNDARY): Never return 0.

*** config/pa/pa.h	1999/11/11 03:32:40	1.79
--- config/pa/pa.h	1999/12/21 12:09:45
***************
*** 1059,1069 ****
     not defined,  `PARM_BOUNDARY' is used for all arguments.  */
  
! #define FUNCTION_ARG_BOUNDARY(MODE, TYPE)				\
!   (((TYPE) != 0)							\
! 	? (((int_size_in_bytes (TYPE)) + UNITS_PER_WORD - 1)		\
! 	   / UNITS_PER_WORD) * BITS_PER_WORD				\
! 	: ((GET_MODE_ALIGNMENT(MODE) <= PARM_BOUNDARY)			\
! 		? PARM_BOUNDARY						\
! 		: GET_MODE_ALIGNMENT(MODE)))
  
  /* Arguments larger than eight bytes are passed by invisible reference */
--- 1059,1071 ----
     not defined,  `PARM_BOUNDARY' is used for all arguments.  */
  
! #define FUNCTION_ARG_BOUNDARY(MODE, TYPE)			\
!   (((TYPE) != 0)						\
!    ? ((integer_zerop (TYPE_SIZE (TYPE))				\
!        || ! TREE_CONSTANT (TYPE_SIZE (TYPE)))			\
!       ? BITS_PER_UNIT						\
!       : (((int_size_in_bytes (TYPE)) + UNITS_PER_WORD - 1)	\
! 	 / UNITS_PER_WORD) * BITS_PER_WORD)			\
!    : ((GET_MODE_ALIGNMENT(MODE) <= PARM_BOUNDARY)		\
!       ? PARM_BOUNDARY : GET_MODE_ALIGNMENT(MODE)))
  
  /* Arguments larger than eight bytes are passed by invisible reference */


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