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 patch for structure parameter passing problem


This fixes PR 2520.

Last year, when the IA-64 ABI changed the rules for structure arguments,
I fixed 4 places affected by the change, and missed a fifth place that also
needed to change.  This patch propogates the same change from my 2000-08-01
patch to one more place.

This was tested with a bootstrap and testsuite run.  libstdc++ fails to
build, and many g++ testcases fail, but that is a C++ front end/dwarf2out.c
problem unrelated to the IA-64 backend.

I added the patch to both the trunk and the gcc3 release branch.

2001-04-11  Jim Wilson  <wilson@redhat.com>

	* config/ia64/ia64.h (FUNCTION_ARG_BOUNDARY): Return 128 if argument
	requires more than 64 bits of alignment.

Index: ia64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.h,v
retrieving revision 1.62
diff -p -r1.62 ia64.h
*** ia64.h	2001/04/04 21:24:20	1.62
--- ia64.h	2001/04/11 00:32:53
*************** do {									\
*** 1382,1392 ****
  /* If defined, a C expression that gives the alignment boundary, in bits, of an
     argument with the specified mode and type.  */
  
! /* Arguments larger than 64 bits require 128 bit alignment.  */
  
  #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \
!   (((((MODE) == BLKmode ? int_size_in_bytes (TYPE) : GET_MODE_SIZE (MODE)) \
!      + UNITS_PER_WORD - 1) / UNITS_PER_WORD) > 1 ? 128 : PARM_BOUNDARY)
  
  /* A C expression that is nonzero if REGNO is the number of a hard register in
     which function arguments are sometimes passed.  This does *not* include
--- 1382,1396 ----
  /* If defined, a C expression that gives the alignment boundary, in bits, of an
     argument with the specified mode and type.  */
  
! /* Arguments with alignment larger than 8 bytes start at the next even
!    boundary.  See ia64_function_arg.  */
  
  #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \
!   (((TYPE) ? (TYPE_ALIGN (TYPE) > 8 * BITS_PER_UNIT)		\
!     : (((((MODE) == BLKmode					\
! 	  ? int_size_in_bytes (TYPE) : GET_MODE_SIZE (MODE))	\
! 	 + UNITS_PER_WORD - 1) / UNITS_PER_WORD) > 1))		\
!     ? 128 : PARM_BOUNDARY)
  
  /* A C expression that is nonzero if REGNO is the number of a hard register in
     which function arguments are sometimes passed.  This does *not* include


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