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