From 8a7199ad7bb1d8bf024a7007317905019b9ee695 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Tue, 13 Feb 2001 12:53:46 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ 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 + + * 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 * 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) -- 2.7.4