aboutsummaryrefslogtreecommitdiff
path: root/gcc/calls.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2008-04-07 09:37:51 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2008-04-07 09:37:51 +0000
commit9dd9bf80a87fdd119261f5efb8a9ceceffb12963 (patch)
tree347d5e4db385dd943a52f0d226ebaf0dc3200e8a /gcc/calls.c
parentf9985df51b32cb265f429d024e955e71fd23a4f1 (diff)
downloadgcc-9dd9bf80a87fdd119261f5efb8a9ceceffb12963.zip
gcc-9dd9bf80a87fdd119261f5efb8a9ceceffb12963.tar.gz
gcc-9dd9bf80a87fdd119261f5efb8a9ceceffb12963.tar.bz2
Removal of Return with Depressed Stack Pointer support
Removal of Return with Depressed Stack Pointer support * tree.h (TYPE_RETURNS_STACK_DEPRESSED): Delete. (ECF_SP_DEPRESSED): Likewise. (ECF_LIBCALL_BLOCK, ECF_NOVOPS): Adjust. * calls.c (emit_call_1): Do not test ECF_SP_DEPRESSED. (flags_from_decl_or_type): Do not test TYPE_RETURNS_STACK_DEPRESSED. (expand_call): Do not test ECF_SP_DEPRESSED. * dse.c (dse_step0): Do not test TYPE_RETURNS_STACK_DEPRESSED. * function.c (keep_stack_depressed): Delete. (handle_epilogue_set): Likewise. (update_epilogue_consts): Likewise. (emit_equiv_load): Likewise. (thread_prologue_and_epilogue_insns): Remove support for Return with Depressed Stack Pointer. * print-tree.c (print_node): Do not test TYPE_RETURNS_STACK_DEPRESSED. ada/ * gigi.h (create_subprog_type): Remove returns_with_dsp parameter. * decl.c (gnat_to_gnu_entity): Adjust for above new prototype. * utils.c (create_subprog_type): Remove returns_with_dsp parameter. * trans.c (gnat_to_gnu) <N_Return_Statement>: Remove code dealing with Return by Depressed Stack Pointer. From-SVN: r133976
Diffstat (limited to 'gcc/calls.c')
-rw-r--r--gcc/calls.c29
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);