diff options
Diffstat (limited to 'contrib/gcc/calls.c')
-rw-r--r-- | contrib/gcc/calls.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/gcc/calls.c b/contrib/gcc/calls.c index d0153a3..36a5d15 100644 --- a/contrib/gcc/calls.c +++ b/contrib/gcc/calls.c @@ -405,7 +405,15 @@ emit_call_1 (funexp, fndecl, funtype, stack_size, rounded_stack_size, #ifndef ACCUMULATE_OUTGOING_ARGS #if defined (HAVE_call_pop) && defined (HAVE_call_value_pop) - if (HAVE_call_pop && HAVE_call_value_pop && n_popped > 0) +/* If the target has "call" or "call_value" insns, then prefer them + if no arguments are actually popped. If the target does not have + "call" or "call_value" insns, then we must use the popping versions + even if the call has no arguments to pop. */ + if (HAVE_call_pop && HAVE_call_value_pop +#if defined (HAVE_call) && defined (HAVE_call_value) + && (n_popped > 0 || ! HAVE_call || ! HAVE_call_value) +#endif + ) { rtx n_pop = GEN_INT (n_popped); rtx pat; |