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]

Fix aggregate type handling in Sparc V9 (64-bit)


All non-record aggregate types need to be handle specially, not just
UNION_TYPE.

Since this is just for the 64-bit Sparc port and it was a port that
didn't work well previous, I committed this to the 3.0 branch as well.

Tue Feb 13 07:52:04 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* config/sparc/sparc.c (function_value): Treat all non-record
	aggregate types like used to treat UNION_TYPE.

*** config/sparc/sparc.c	2001/02/08 18:46:46	1.135
--- config/sparc/sparc.c	2001/02/13 12:45:52
*************** function_value (type, mode, incoming_p)
*** 4684,4690 ****
  	  return function_arg_record_value (type, mode, 0, 1, regbase);
  	}
!       else if (TREE_CODE (type) == UNION_TYPE)
  	{
! 	  int bytes = int_size_in_bytes (type);
  
  	  if (bytes > 32)
--- 4684,4692 ----
  	  return function_arg_record_value (type, mode, 0, 1, regbase);
  	}
!       else if (AGGREGATE_TYPE_P (type))
  	{
! 	  /* All other aggregate types are passed in an integer register
! 	     in a mode corresponding to the size of the type.  */
! 	  HOST_WIDE_INT bytes = int_size_in_bytes (type);
  
  	  if (bytes > 32)
*************** function_value (type, mode, incoming_p)
*** 4698,4702 ****
        && GET_MODE_CLASS (mode) == MODE_INT 
        && GET_MODE_SIZE (mode) < UNITS_PER_WORD
!       && type && TREE_CODE (type) != UNION_TYPE)
      mode = DImode;
  
--- 4700,4704 ----
        && GET_MODE_CLASS (mode) == MODE_INT 
        && GET_MODE_SIZE (mode) < UNITS_PER_WORD
!       && type && ! AGGREGATE_TYPE_P (type))
      mode = DImode;
  


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