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]

execute/20020307-2.c, part 2


        * config/sparc/sparc.c (function_arg_pass_by_reference): Pass
        variable sized objects by reference.
        (sparc_va_arg): Receive them by reference too.

Index: sparc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
retrieving revision 1.185.2.6
diff -c -p -d -r1.185.2.6 sparc.c
*** sparc.c	2002/03/24 02:18:51	1.185.2.6
--- sparc.c	2002/03/26 08:54:07
*************** function_arg_pass_by_reference (cum, mod
*** 4736,4743 ****
        return ((type && TREE_CODE (type) == ARRAY_TYPE)
  	      /* Consider complex values as aggregates, so care for TCmode.  */
  	      || GET_MODE_SIZE (mode) > 16
! 	      || (type && AGGREGATE_TYPE_P (type)
! 		  && int_size_in_bytes (type) > 16));
      }
  }
  
--- 4736,4744 ----
        return ((type && TREE_CODE (type) == ARRAY_TYPE)
  	      /* Consider complex values as aggregates, so care for TCmode.  */
  	      || GET_MODE_SIZE (mode) > 16
! 	      || (type
! 		  && AGGREGATE_TYPE_P (type)
! 		  && (unsigned HOST_WIDE_INT) int_size_in_bytes (type) > 16));
      }
  }
  
*************** sparc_va_arg (valist, type)
*** 4938,4944 ****
  
        if (AGGREGATE_TYPE_P (type))
  	{
! 	  if (size > 16)
  	    {
  	      indirect = 1;
  	      size = rsize = UNITS_PER_WORD;
--- 4939,4945 ----
  
        if (AGGREGATE_TYPE_P (type))
  	{
! 	  if ((unsigned HOST_WIDE_INT) size > 16)
  	    {
  	      indirect = 1;
  	      size = rsize = UNITS_PER_WORD;


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