diff options
author | ktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-01-02 10:46:17 +0000 |
---|---|---|
committer | ktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-01-02 10:46:17 +0000 |
commit | 02be515c2b183a3981a4146e5a0b4c0ec1c9ceb3 (patch) | |
tree | b5e34cbcfd93edfa16e2b8c24d33694e4cc72928 /gcc/config/i386/i386.c | |
parent | 799bdf64de6dce47a56ba4144484a1b670bfb0dc (diff) | |
download | gcc-02be515c2b183a3981a4146e5a0b4c0ec1c9ceb3.tar.gz |
(ix86_expand_prologue): Save red-zone while stack probing.
PR 34013.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131255 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/i386/i386.c')
-rw-r--r-- | gcc/config/i386/i386.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 232d6fe6b60..31931015fc5 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -6318,8 +6318,12 @@ ix86_expand_prologue (void) allocate += frame.nregs * UNITS_PER_WORD; /* When using red zone we may start register saving before allocating - the stack frame saving one cycle of the prologue. */ - if (TARGET_RED_ZONE && frame.save_regs_using_mov) + the stack frame saving one cycle of the prologue. However I will + avoid doing this if I am going to have to probe the stack since + at least on x86_64 the stack probe can turn into a call that clobbers + a red zone location */ + if (TARGET_RED_ZONE && frame.save_regs_using_mov + && (! TARGET_STACK_PROBE || allocate < CHECK_STACK_LIMIT)) ix86_emit_save_regs_using_mov (frame_pointer_needed ? hard_frame_pointer_rtx : stack_pointer_rtx, -frame.nregs * UNITS_PER_WORD); @@ -6375,7 +6379,9 @@ ix86_expand_prologue (void) } } - if (frame.save_regs_using_mov && !TARGET_RED_ZONE) + if (frame.save_regs_using_mov + && !(TARGET_RED_ZONE + && (! TARGET_STACK_PROBE || allocate < CHECK_STACK_LIMIT))) { if (!frame_pointer_needed || !frame.to_allocate) ix86_emit_save_regs_using_mov (stack_pointer_rtx, frame.to_allocate); |