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

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

From-SVN: r39629
This commit is contained in:
Richard Kenner 2001-02-13 12:53:46 +00:00 committed by Richard Kenner
parent 446988df3b
commit 8a7199ad7b
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,8 @@
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.
Tue Feb 13 13:31:33 CET 2001 Jan Hubicka <jh@suse.cz>
* i386.c (print_reg): Use ANY_FP_REG instead of FP_REG

View file

@ -4683,9 +4683,11 @@ function_value (type, mode, incoming_p)
return function_arg_record_value (type, mode, 0, 1, regbase);
}
else if (TREE_CODE (type) == UNION_TYPE)
else if (AGGREGATE_TYPE_P (type))
{
int bytes = int_size_in_bytes (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)
abort ();
@ -4697,7 +4699,7 @@ function_value (type, mode, incoming_p)
if (TARGET_ARCH64
&& GET_MODE_CLASS (mode) == MODE_INT
&& GET_MODE_SIZE (mode) < UNITS_PER_WORD
&& type && TREE_CODE (type) != UNION_TYPE)
&& type && ! AGGREGATE_TYPE_P (type))
mode = DImode;
if (incoming_p)