diff options
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index 3d4540d..9d014f9 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -181,7 +181,8 @@ static int calls_function_1 PARAMS ((tree, int)); static void emit_call_1 PARAMS ((rtx, tree, tree, HOST_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT, rtx, - rtx, int, rtx, int)); + rtx, int, rtx, int, + CUMULATIVE_ARGS *)); static void precompute_register_parameters PARAMS ((int, struct arg_data *, int *)); @@ -444,7 +445,7 @@ prepare_call_address (funexp, fndecl, call_fusage, reg_parm_seen, sibcallp) static void emit_call_1 (funexp, fndecl, funtype, stack_size, rounded_stack_size, struct_value_size, next_arg_reg, valreg, old_inhibit_defer_pop, - call_fusage, ecf_flags) + call_fusage, ecf_flags, args_so_far) rtx funexp; tree fndecl ATTRIBUTE_UNUSED; tree funtype ATTRIBUTE_UNUSED; @@ -456,6 +457,7 @@ emit_call_1 (funexp, fndecl, funtype, stack_size, rounded_stack_size, int old_inhibit_defer_pop; rtx call_fusage; int ecf_flags; + CUMULATIVE_ARGS *args_so_far ATTRIBUTE_UNUSED; { rtx rounded_stack_size_rtx = GEN_INT (rounded_stack_size); rtx call_insn; @@ -466,6 +468,10 @@ emit_call_1 (funexp, fndecl, funtype, stack_size, rounded_stack_size, struct_value_size_rtx = GEN_INT (struct_value_size); #endif +#ifdef CALL_POPS_ARGS + n_popped += CALL_POPS_ARGS (* args_so_far); +#endif + /* Ensure address is valid. SYMBOL_REF is already valid, so no need, and we don't want to load it into a register as an optimization, because prepare_call_address already did it if it should be done. */ @@ -3055,7 +3061,7 @@ expand_call (exp, target, ignore) emit_call_1 (funexp, fndecl, funtype, unadjusted_args_size, adjusted_args_size.constant, struct_value_size, next_arg_reg, valreg, old_inhibit_defer_pop, call_fusage, - flags); + flags, & args_so_far); /* Verify that we've deallocated all the stack we used. */ if (pass @@ -4053,7 +4059,7 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p) struct_value_size, FUNCTION_ARG (args_so_far, VOIDmode, void_type_node, 1), valreg, - old_inhibit_defer_pop + 1, call_fusage, flags); + old_inhibit_defer_pop + 1, call_fusage, flags, & args_so_far); /* For calls to `setjmp', etc., inform flow.c it should complain if nonvolatile values are live. For functions that cannot return, |