diff options
Diffstat (limited to 'gcc/config/s390/s390.c')
-rw-r--r-- | gcc/config/s390/s390.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 51f10ab3d8a..a91f4c1107c 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -8511,7 +8511,7 @@ s390_function_arg_integer (enum machine_mode mode, const_tree type) reference. */ static bool -s390_pass_by_reference (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED, +s390_pass_by_reference (cumulative_args_t ca ATTRIBUTE_UNUSED, enum machine_mode mode, const_tree type, bool named ATTRIBUTE_UNUSED) { @@ -8539,9 +8539,11 @@ s390_pass_by_reference (CUMULATIVE_ARGS *ca ATTRIBUTE_UNUSED, matching an ellipsis). */ static void -s390_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, +s390_function_arg_advance (cumulative_args_t cum_v, enum machine_mode mode, const_tree type, bool named ATTRIBUTE_UNUSED) { + CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v); + if (s390_function_arg_float (mode, type)) { cum->fprs += 1; @@ -8575,9 +8577,11 @@ s390_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, are pushed to the stack. */ static rtx -s390_function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, +s390_function_arg (cumulative_args_t cum_v, enum machine_mode mode, const_tree type, bool named ATTRIBUTE_UNUSED) { + CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v); + if (s390_function_arg_float (mode, type)) { if (cum->fprs + 1 > FP_ARG_NUM_REG) @@ -9622,14 +9626,16 @@ s390_valid_pointer_mode (enum machine_mode mode) static bool s390_call_saved_register_used (tree call_expr) { - CUMULATIVE_ARGS cum; + CUMULATIVE_ARGS cum_v; + cumulative_args_t cum; tree parameter; enum machine_mode mode; tree type; rtx parm_rtx; int reg, i; - INIT_CUMULATIVE_ARGS (cum, NULL, NULL, 0, 0); + INIT_CUMULATIVE_ARGS (cum_v, NULL, NULL, 0, 0); + cum = pack_cumulative_args (&cum_v); for (i = 0; i < call_expr_nargs (call_expr); i++) { @@ -9647,15 +9653,15 @@ s390_call_saved_register_used (tree call_expr) mode = TYPE_MODE (type); gcc_assert (mode); - if (pass_by_reference (&cum, mode, type, true)) + if (pass_by_reference (&cum_v, mode, type, true)) { mode = Pmode; type = build_pointer_type (type); } - parm_rtx = s390_function_arg (&cum, mode, type, 0); + parm_rtx = s390_function_arg (cum, mode, type, 0); - s390_function_arg_advance (&cum, mode, type, 0); + s390_function_arg_advance (cum, mode, type, 0); if (!parm_rtx) continue; |