mirror of
https://github.com/pret/agbcc.git
synced 2026-04-19 00:17:27 -05:00
remove exit_ignore_stack ifdefs
This commit is contained in:
parent
dae4baf0b7
commit
526fd830c2
19
gcc/expr.c
19
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
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
35
gcc/flow.c
35
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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user