]> gcc.gnu.org Git - gcc.git/commitdiff
i386.c (override_options): Force -maccumulate-outgoing-args on if TARGET_STACK_PROBE.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 4 Mar 2008 12:46:56 +0000 (12:46 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Tue, 4 Mar 2008 12:46:56 +0000 (12:46 +0000)
* 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*.

From-SVN: r132860

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/sse-10.c

index 07adcb8c60b11e18de1fce2dc50d08c6fbaa9bc0..459f39200a1d06cbbde6903a1d2627dc669104eb 100644 (file)
@@ -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
index 5a4456d912bb63b1d39b4c41342f10046aee4753..844bb756d948f65c2e47dce3446cc85ba02f09f2 100644 (file)
@@ -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)
index 6e45f8231df2aade92605bdfe313e42330657794..7aeb04091de7eeb09422a16b2989e3721c1abf40 100644 (file)
@@ -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.
index 1c222df2b2f9a7af10da84151b457899b73aa132..b5bc8f66b44681bcca4c9dc740526f7aebea8ffd 100644 (file)
@@ -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"
 
This page took 0.160919 seconds and 5 git commands to generate.