diff options
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index 2d68f75..3eb8b5f 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -297,7 +297,7 @@ emit_call_1 (rtx funexp, tree fntree, tree fndecl ATTRIBUTE_UNUSED, even if the call has no arguments to pop. */ #if defined (HAVE_call) && defined (HAVE_call_value) if (HAVE_call && HAVE_call_value && HAVE_call_pop && HAVE_call_value_pop - && n_popped > 0 && ! (ecf_flags & ECF_SP_DEPRESSED)) + && n_popped > 0) #else if (HAVE_call_pop && HAVE_call_value_pop) #endif @@ -432,7 +432,7 @@ emit_call_1 (rtx funexp, tree fntree, tree fndecl ATTRIBUTE_UNUSED, if (rounded_stack_size != 0) { - if (ecf_flags & (ECF_SP_DEPRESSED | ECF_NORETURN)) + if (ecf_flags & ECF_NORETURN) /* Just pretend we did the pop. */ stack_pointer_delta -= rounded_stack_size; else if (flag_defer_pop && inhibit_defer_pop == 0 @@ -602,14 +602,6 @@ flags_from_decl_or_type (const_tree exp) if (TREE_THIS_VOLATILE (exp)) flags |= ECF_NORETURN; - /* Mark if the function returns with the stack pointer depressed. We - cannot consider it pure or constant in that case. */ - if (TREE_CODE (type) == FUNCTION_TYPE && TYPE_RETURNS_STACK_DEPRESSED (type)) - { - flags |= ECF_SP_DEPRESSED; - flags &= ~(ECF_PURE | ECF_CONST); - } - return flags; } @@ -2354,13 +2346,12 @@ expand_call (tree exp, rtx target, int ignore) /* Don't let pending stack adjusts add up to too much. Also, do all pending adjustments now if there is any chance this might be a call to alloca or if we are expanding a sibling - call sequence or if we are calling a function that is to return - with stack pointer depressed. + call sequence. Also do the adjustments before a throwing call, otherwise exception handling can fail; PR 19225. */ if (pending_stack_adjust >= 32 || (pending_stack_adjust > 0 - && (flags & (ECF_MAY_BE_ALLOCA | ECF_SP_DEPRESSED))) + && (flags & ECF_MAY_BE_ALLOCA)) || (pending_stack_adjust > 0 && flag_exceptions && !(flags & ECF_NOTHROW)) || pass == 0) @@ -3071,7 +3062,7 @@ expand_call (tree exp, rtx target, int ignore) /* If size of args is variable or this was a constructor call for a stack argument, restore saved stack-pointer value. */ - if (old_stack_level && ! (flags & ECF_SP_DEPRESSED)) + if (old_stack_level) { emit_stack_restore (SAVE_BLOCK, old_stack_level, NULL_RTX); stack_pointer_delta = old_stack_pointer_delta; @@ -3177,16 +3168,6 @@ expand_call (tree exp, rtx target, int ignore) currently_expanding_call--; - /* If this function returns with the stack pointer depressed, ensure - this block saves and restores the stack pointer, show it was - changed, and adjust for any outgoing arg space. */ - if (flags & ECF_SP_DEPRESSED) - { - clear_pending_stack_adjust (); - emit_insn (gen_rtx_CLOBBER (VOIDmode, stack_pointer_rtx)); - emit_move_insn (virtual_stack_dynamic_rtx, stack_pointer_rtx); - } - if (stack_usage_map_buf) free (stack_usage_map_buf); |