aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2009-11-10 20:45:25 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2009-11-10 20:45:25 +0000
commitc35af30f163df37759db9355695028678e6570f6 (patch)
treec3c5f7e26211053f186e7a889a1713c799a96f25 /gcc/function.c
parent35230a7895e65ec3a2fdb48600ef39983b1605b4 (diff)
downloadgcc-c35af30f163df37759db9355695028678e6570f6.zip
gcc-c35af30f163df37759db9355695028678e6570f6.tar.gz
gcc-c35af30f163df37759db9355695028678e6570f6.tar.bz2
re PR target/10127 (-fstack-check let's program crash)
PR target/10127 PR ada/20548 * expr.h (anti_adjust_stack_and_probe): Declare. * explow.c (anti_adjust_stack_and_probe): Make global, add ADJUST_BACK parameter and rewrite head comment. (allocate_dynamic_stack_space): Adjust call to above function. * function.c (expand_function_end): Handle STACK_CHECK_MOVING_SP. * tree.h (dwarf2out_args_size): Delete. * dwarf2out.c (dwarf2out_args_size): Make static and move around. (dwarf2out_args_size_adjust): Delete prototype and move around. (dwarf2out_frame_debug_expr): Do not record arg size adjustments for ACCUMULATE_OUTGOING_ARGS targets. From-SVN: r154079
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/function.c b/gcc/function.c
index d596343..ca57889 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -4642,9 +4642,12 @@ expand_function_end (void)
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
if (CALL_P (insn))
{
+ rtx max_frame_size = GEN_INT (STACK_CHECK_MAX_FRAME_SIZE);
start_sequence ();
- probe_stack_range (STACK_OLD_CHECK_PROTECT,
- GEN_INT (STACK_CHECK_MAX_FRAME_SIZE));
+ if (STACK_CHECK_MOVING_SP)
+ anti_adjust_stack_and_probe (max_frame_size, true);
+ else
+ probe_stack_range (STACK_OLD_CHECK_PROTECT, max_frame_size);
seq = get_insns ();
end_sequence ();
emit_insn_before (seq, stack_check_probe_note);