Commit 76c30596 by Richard Stallman

(INIT_CUMULATIVE_ARGS): Pass just the return value type to aggregate_value_p.

From-SVN: r5385
parent 3d0a83e8
......@@ -462,7 +462,7 @@ enum reg_class
For a library call, FNTYPE is 0.
On the ARM, the offset starts at 0. */
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME) \
((CUM) = (((FNTYPE) && aggregate_value_p (FNTYPE)) ? 4 : 0))
((CUM) = (((FNTYPE) && aggregate_value_p (TREE_TYPE ((FNTYPE))) ? 4 : 0))
/* Update the data in CUM to advance over an argument
of mode MODE and data type TYPE.
......
......@@ -468,7 +468,7 @@ struct _clipper_cum_args { int num; int size; };
clipper passes the address of a struct in r0, set num = 1 in this case */
#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME) \
((CUM).num = ((FNTYPE) != 0 && aggregate_value_p (FNTYPE)), \
((CUM).num = ((FNTYPE) != 0 && aggregate_value_p (TREE_TYPE (FNTYPE))), \
(CUM).size = 0)
/* internal helper : size of an argument */
......
......@@ -612,7 +612,7 @@ extern enum reg_class regclass_map[FIRST_PSEUDO_REGISTER];
&& (TYPE_ARG_TYPES (FUNTYPE) == 0 \
|| (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE))) \
== void_type_node))) ? (SIZE) \
: (aggregate_value_p (FUNTYPE)) ? GET_MODE_SIZE (Pmode) : 0)
: (aggregate_value_p (TREE_TYPE (FUNTYPE))) ? GET_MODE_SIZE (Pmode) : 0)
/* Define how to find the value returned by a function.
VALTYPE is the data type of the value (as a tree).
......
......@@ -39,7 +39,7 @@
== void_type_node))) ? (SIZE) \
: 0)
/* On other 386 systems, the last line looks like this:
: (aggregate_value_p (FUNTYPE)) ? GET_MODE_SIZE (Pmode) : 0) */
: (aggregate_value_p (TREE_TYPE (FUNTYPE))) ? GET_MODE_SIZE (Pmode) : 0) */
#endif
/* Handle #pragma pack and #pragma weak. */
......
......@@ -474,7 +474,7 @@ struct cumulative_args { int ints, floats; };
invisible first argument. */
#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME) \
((CUM).ints = ((FNTYPE) != 0 && aggregate_value_p ((FNTYPE)) \
((CUM).ints = ((FNTYPE) != 0 && aggregate_value_p (TREE_TYPE ((FNTYPE))) \
? 4 : 0), \
(CUM).floats = 0)
......
......@@ -628,7 +628,8 @@ extern int inner_param_safe_helper();
For a library call, FNTYPE is 0. */
#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME) \
((CUM) = (FNTYPE && !flag_pcc_struct_return && aggregate_value_p (FNTYPE)))
((CUM) = (FNTYPE && !flag_pcc_struct_return \
&& aggregate_value_p (TREE_TYPE (FNTYPE))))
/* Determine where to put an argument to a function.
Value is zero to push the argument on the stack,
......
......@@ -414,7 +414,7 @@ enum reg_class { NO_REGS, GENERAL_REGS, FP_REGS, ALL_REGS, LIM_REG_CLASSES };
invisible first argument. */
#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME) \
((CUM) = ((FNTYPE) != 0 && aggregate_value_p ((FNTYPE))))
((CUM) = ((FNTYPE) != 0 && aggregate_value_p (TREE_TYPE ((FNTYPE)))))
/* Update the data in CUM to advance over an argument
of mode MODE and data type TYPE.
......
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