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]
Other format: [Raw text]

Re: powerpc64 long double and complex va_arg support


On Fri, Mar 12, 2004 at 03:51:24PM -0500, David Edelsohn wrote:
> 	* config/rs6000/rs6000.h (UNITS_PER_ARG, RS6000_ARG_SIZE): Delete.
> 	(HARD_REGNO_MODE_OK): Disallow TFmode for fp31.
> 	* config/rs6000/rs6000.c (rs6000_arg_size): New function.
> 	Update all users of RS6000_ARG_SIZE.
> 	(function_arg_advance): Count fregno using mode size.
> 	(function_arg): Handle long double split over regs and memory.
> 	(function_arg_partial_nregs): Likewise.
> 	(rs6000_va_arg): Repackage complex args.
> 
> The updated version of this patch is okay, but please wait for GCC 3.4.1
> to backport.  Technically the patch is an ABI change, but it really is a
> bug fix for a corner case.  Most users are not passing a large number of
> long double parameters or using long double in varargs.  I would like more
> testing on mainline before backporting.

Thanks.  Fair enough about 3.4.0.  I committed the patch, then had
to follow up with the following..

	* config/rs6000/rs6000.c (rs6000_va_arg): Replace SPLIT_COMPLEX_ARGS
	with targetm version.

Index: gcc/config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.608
diff -u -p -r1.608 rs6000.c
--- gcc/config/rs6000/rs6000.c	13 Mar 2004 07:14:12 -0000	1.608
+++ gcc/config/rs6000/rs6000.c	13 Mar 2004 07:50:52 -0000
@@ -4839,7 +4839,7 @@ rs6000_va_arg (tree valist, tree type)
 
 	  return expand_expr (t, NULL_RTX, VOIDmode, EXPAND_NORMAL);
 	}
-      if (SPLIT_COMPLEX_ARGS
+      if (targetm.calls.split_complex_arg
 	  && TREE_CODE (type) == COMPLEX_TYPE)
 	{
 	  tree elem_type = TREE_TYPE (type);

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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