summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rwxr-xr-xgcc/expr.c19
-rwxr-xr-xgcc/expr.h4
-rwxr-xr-xgcc/flow.c35
-rwxr-xr-xgcc/function.c9
-rwxr-xr-xgcc/resource.c18
-rwxr-xr-xgcc/stmt.c2
6 files changed, 11 insertions, 76 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 08abc0d..c3fdb4e 100755
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -10316,25 +10316,6 @@ init_pending_stack_adjust ()
pending_stack_adjust = 0;
}
-/* When exiting from function, if safe, clear out any pending stack adjust
- so the adjustment won't get done.
-
- Note, if the current function calls alloca, then it must have a
- frame pointer regardless of the value of flag_omit_frame_pointer. */
-
-void
-clear_pending_stack_adjust ()
-{
-#ifdef EXIT_IGNORE_STACK
- if (optimize > 0
- && (! flag_omit_frame_pointer || current_function_calls_alloca)
- && EXIT_IGNORE_STACK
- && ! (DECL_INLINE (current_function_decl) && ! flag_no_inline)
- && ! flag_inline_functions)
- pending_stack_adjust = 0;
-#endif
-}
-
/* Pop any previously-pushed arguments that have not been popped yet. */
void
diff --git a/gcc/expr.h b/gcc/expr.h
index 83f7edc..7e6c15c 100755
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -830,10 +830,6 @@ extern rtx expand_expr PROTO((tree, rtx, enum machine_mode,
arguments waiting to be popped. */
extern void init_pending_stack_adjust PROTO((void));
-/* When exiting from function, if safe, clear out any pending stack adjust
- so the adjustment won't get done. */
-extern void clear_pending_stack_adjust PROTO((void));
-
/* Pop any previously-pushed arguments that have not been popped yet. */
extern void do_pending_stack_adjust PROTO((void));
diff --git a/gcc/flow.c b/gcc/flow.c
index eb20a9f..1c0726b 100755
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -1336,15 +1336,7 @@ mark_regs_live_at_end (set)
{
int i;
-#ifdef EXIT_IGNORE_STACK
- if (! EXIT_IGNORE_STACK
- || (! FRAME_POINTER_REQUIRED
- && ! current_function_calls_alloca
- && flag_omit_frame_pointer)
- || current_function_sp_is_unchanging)
-#endif
- /* If exiting needs the right stack value,
- consider the stack pointer live at the end of the function. */
+ /* Consider the stack pointer live at the end of the function. */
SET_REGNO_REG_SET (set, STACK_POINTER_REGNUM);
/* Mark the frame pointer is needed at the end of the function. If
@@ -1358,11 +1350,7 @@ mark_regs_live_at_end (set)
as being live at the end of the function since they may be
referenced by our caller. */
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
- if (global_regs[i]
-#ifdef EPILOGUE_USES
- || EPILOGUE_USES (i)
-#endif
- )
+ if (global_regs[i])
SET_REGNO_REG_SET (set, i);
}
@@ -3031,25 +3019,12 @@ mark_used_regs (needed, live, x, final, insn)
break;
case RETURN:
- /* If exiting needs the right stack value, consider this insn as
- using the stack pointer. In any event, consider it as using
- all global registers and all registers used by return. */
-
-#ifdef EXIT_IGNORE_STACK
- if (! EXIT_IGNORE_STACK
- || (! FRAME_POINTER_REQUIRED
- && ! current_function_calls_alloca
- && flag_omit_frame_pointer)
- || current_function_sp_is_unchanging)
-#endif
+ /* Consider this insn as using the stack pointer, all global registers
+ and all registers used by return. */
SET_REGNO_REG_SET (live, STACK_POINTER_REGNUM);
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
- if (global_regs[i]
-#ifdef EPILOGUE_USES
- || EPILOGUE_USES (i)
-#endif
- )
+ if (global_regs[i])
SET_REGNO_REG_SET (live, i);
break;
diff --git a/gcc/function.c b/gcc/function.c
index 4da2f41..bb08b18 100755
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -6162,7 +6162,6 @@ expand_function_end (filename, line, end_bindings)
use_variable (current_function_internal_arg_pointer);
}
- clear_pending_stack_adjust ();
do_pending_stack_adjust ();
/* Mark the end of the function body.
@@ -6220,12 +6219,8 @@ expand_function_end (filename, line, end_bindings)
Pmode);
}
- /* If we had calls to alloca, and this machine needs
- an accurate stack pointer to exit the function,
- insert some code to save and restore the stack pointer. */
-#ifdef EXIT_IGNORE_STACK
- if (! EXIT_IGNORE_STACK)
-#endif
+ /* If we had calls to alloca, insert some code to save and restore the
+ stack pointer. */
if (current_function_calls_alloca)
{
rtx tem = 0;
diff --git a/gcc/resource.c b/gcc/resource.c
index 56ca933..d874d52 100755
--- a/gcc/resource.c
+++ b/gcc/resource.c
@@ -1071,9 +1071,8 @@ init_resource_info (epilogue_insn)
/* Indicate what resources are required to be valid at the end of the current
function. The condition code never is and memory always is. If the
- frame pointer is needed, it is and so is the stack pointer unless
- EXIT_IGNORE_STACK is non-zero. If the frame pointer is not needed, the
- stack pointer is. Registers used to return the function value are
+ frame pointer is needed, it is. The stack pointer is needed.
+ Registers used to return the function value are
needed. Registers holding global variables are needed. */
end_of_function_needs.cc = 0;
@@ -1084,13 +1083,8 @@ init_resource_info (epilogue_insn)
if (frame_pointer_needed)
{
SET_HARD_REG_BIT (end_of_function_needs.regs, FRAME_POINTER_REGNUM);
-#ifdef EXIT_IGNORE_STACK
- if (! EXIT_IGNORE_STACK
- || current_function_sp_is_unchanging)
-#endif
- SET_HARD_REG_BIT (end_of_function_needs.regs, STACK_POINTER_REGNUM);
}
- else
+
SET_HARD_REG_BIT (end_of_function_needs.regs, STACK_POINTER_REGNUM);
if (current_function_return_rtx != 0)
@@ -1098,11 +1092,7 @@ init_resource_info (epilogue_insn)
&end_of_function_needs, 1);
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
- if (global_regs[i]
-#ifdef EPILOGUE_USES
- || EPILOGUE_USES (i)
-#endif
- )
+ if (global_regs[i])
SET_HARD_REG_BIT (end_of_function_needs.regs, i);
/* The registers required to be live at the end of the function are
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 5d9e266..22f9a5e 100755
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -777,7 +777,6 @@ expand_goto_internal (body, label, last_insn)
/* Ensure stack adjust isn't done by emit_jump, as this
would clobber the stack pointer. This one should be
deleted as dead by flow. */
- clear_pending_stack_adjust ();
do_pending_stack_adjust ();
emit_stack_restore (SAVE_BLOCK, stack_level, NULL_RTX);
}
@@ -2459,7 +2458,6 @@ expand_null_return_1 (last_insn, use_goto)
{
rtx end_label = cleanup_label ? cleanup_label : return_label;
- clear_pending_stack_adjust ();
do_pending_stack_adjust ();
last_expr_type = 0;