Commit 3c0f5ae6 by Per Bothner

sparc.h (FUNCTION_ARG_PASS_BY_REFERENCE): Use AGGREGATE_TYPE_P so…

sparc.h (FUNCTION_ARG_PASS_BY_REFERENCE): Use AGGREGATE_TYPE_P so QUAL_UNION_TYPE and SET_TYPE are also passed by...

* sparc.h (FUNCTION_ARG_PASS_BY_REFERENCE):  Use AGGREGATE_TYPE_P so
QUAL_UNION_TYPE and SET_TYPE are also passed by invisible reference.
* sparc.h (INIT_CUMULATIVE_ARGS for SPARCV9):  Return types of
QUAL_UNION_TYPE and SET_TYPE also make invisible 1st argument.

From-SVN: r10967
parent a6cc0d48
......@@ -1345,6 +1345,8 @@ extern int sparc_arg_count,sparc_n_named_args;
((FNTYPE) && TYPE_ARG_TYPES (FNTYPE) \
? (list_length (TYPE_ARG_TYPES (FNTYPE)) \
+ (TREE_CODE (TREE_TYPE (FNTYPE)) == RECORD_TYPE \
|| TREE_CODE (TREE_TYPE (FNTYPE)) == QUAL_UNION_TYPE)\
|| TREE_CODE (TREE_TYPE (FNTYPE)) == SET_TYPE) \
|| TREE_CODE (TREE_TYPE (FNTYPE)) == UNION_TYPE)) \
/* Can't tell, treat 'em all as named. */ \
: 10000); \
......@@ -1448,10 +1450,8 @@ extern int sparc_arg_count,sparc_n_named_args;
/* The SPARC ABI stipulates passing struct arguments (of any size) and
(!v9) quad-precision floats by invisible reference.
For Pascal, also pass arrays by reference. */
#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
((TYPE && (TREE_CODE (TYPE) == RECORD_TYPE \
|| TREE_CODE (TYPE) == UNION_TYPE \
|| TREE_CODE (TYPE) == ARRAY_TYPE)) \
#define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
((TYPE && AGGREGATE_TYPE_P (TYPE)) \
|| (!TARGET_V9 && MODE == TFmode))
/* A C expression that indicates when it is the called function's
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment