diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2001-02-13 12:53:46 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2001-02-13 07:53:46 -0500 |
commit | 8a7199ad7bb1d8bf024a7007317905019b9ee695 (patch) | |
tree | b66c09af633f791613c56ca8c3a3887d8e875d94 | |
parent | 446988df3be95483e698fcb76814f7c80a81a196 (diff) | |
download | gcc-8a7199ad7bb1d8bf024a7007317905019b9ee695.zip gcc-8a7199ad7bb1d8bf024a7007317905019b9ee695.tar.gz gcc-8a7199ad7bb1d8bf024a7007317905019b9ee695.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d75143e..776b995 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 0d194f1..a84b095 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -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) |