summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-04 12:46:56 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-04 12:46:56 +0000
commitcfb924646e436fb8f69de41289b898a64cd1c6b0 (patch)
treeee7c895f824b72239993d2a510287b8dc4ed4640
parent1e629d69f519364f7f199ef0f1f7e195b5eb8f5d (diff)
downloadgcc-cfb924646e436fb8f69de41289b898a64cd1c6b0.tar.gz
* config/i386/i386.c (override_options): Force
-maccumulate-outgoing-args on if TARGET_STACK_PROBE. testsuite: * gcc.target/i386/sse-10.c: Don't use -mno-accumulate-outgoing-args on *-*-mingw* *-*-cygwin*. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132860 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/i386.c12
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-10.c1
4 files changed, 23 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 07adcb8c60b..459f39200a1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-04 Joseph Myers <joseph@codesourcery.com>
+
+ * config/i386/i386.c (override_options): Force
+ -maccumulate-outgoing-args on if TARGET_STACK_PROBE.
+
2008-03-04 Jan Hubicka <jh@suse.cz>
PR c++/35262
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 5a4456d912b..844bb756d94 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -2700,6 +2700,18 @@ override_options (void)
target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS;
}
+ /* If stack probes are required, the space used for large function
+ arguments on the stack must also be probed, so enable
+ -maccumulate-outgoing-args so this happens in the prologue. */
+ if (TARGET_STACK_PROBE
+ && !(target_flags & MASK_ACCUMULATE_OUTGOING_ARGS))
+ {
+ if (target_flags_explicit & MASK_ACCUMULATE_OUTGOING_ARGS)
+ warning (0, "stack probing requires -maccumulate-outgoing-args "
+ "for correctness");
+ target_flags |= MASK_ACCUMULATE_OUTGOING_ARGS;
+ }
+
/* For sane SSE instruction set generation we need fcomi instruction.
It is safe to enable all CMOVE instructions. */
if (TARGET_SSE)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6e45f8231df..7aeb04091de 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-04 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.target/i386/sse-10.c: Don't use
+ -mno-accumulate-outgoing-args on *-*-mingw* *-*-cygwin*.
+
2008-03-04 Uros Bizjak <ubizjak@gmail.com>
* gfortran.dg/reassoc_1.f90: Cleanup dump files.
diff --git a/gcc/testsuite/gcc.target/i386/sse-10.c b/gcc/testsuite/gcc.target/i386/sse-10.c
index 1c222df2b2f..b5bc8f66b44 100644
--- a/gcc/testsuite/gcc.target/i386/sse-10.c
+++ b/gcc/testsuite/gcc.target/i386/sse-10.c
@@ -1,6 +1,7 @@
/* PR 17930 */
/* { dg-do run } */
/* { dg-options "-O1 -msse2 -mfpmath=sse -mno-accumulate-outgoing-args -fno-omit-frame-pointer" } */
+/* { dg-options "-O1 -msse2 -mfpmath=sse -fno-omit-frame-pointer" { target *-*-mingw* *-*-cygwin* } } */
#include "sse2-check.h"