]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/13685 (Building simple test application with -march=pentium3 -Os gives...
authorH.J. Lu <hongjiu.lu@intel.com>
Mon, 11 Sep 2006 21:34:06 +0000 (21:34 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Mon, 11 Sep 2006 21:34:06 +0000 (14:34 -0700)
gcc/

2006-09-11  H.J. Lu  <hongjiu.lu@intel.com>

PR target/13685
PR target/27537
PR target/28621
* config/i386/i386.c (override_options): Always default to 16
byte stack boundary.

gcc/testsuite/

2006-09-11  H.J. Lu  <hongjiu.lu@intel.com>

PR target/13685
* gcc.target/i386/pr13685.c: New test.

From-SVN: r116860

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr13685.c [new file with mode: 0644]

index b1a92ec5edce985e4e7cbfa0149301eaef78576b..d2b3658fef7d7ed6d1c5dbfbfd641efe9f01c4e9 100644 (file)
@@ -1,3 +1,11 @@
+2006-09-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR target/13685
+       PR target/27537
+       PR target/28621
+       * config/i386/i386.c (override_options): Always default to 16
+       byte stack boundary.
+
 2006-09-11  Alexandre Oliva  <aoliva@redhat.com>
 
        PR target/28672
index be17c02a24616006e8b33d7c7ae536611bf958f9..daba68d2d2de329943f5ab2eb25afb8371e7fa14 100644 (file)
@@ -1899,12 +1899,10 @@ override_options (void)
     }
 
   /* Validate -mpreferred-stack-boundary= value, or provide default.
-     The default of 128 bits is for Pentium III's SSE __m128, but we
-     don't want additional code to keep the stack aligned when
-     optimizing for code size.  */
-  ix86_preferred_stack_boundary
-    = (TARGET_64BIT || TARGET_MACHO || TARGET_SSE || !optimize_size) 
-       ? 128 : 32;
+     The default of 128 bits is for Pentium III's SSE __m128.  We can't
+     change it because of optimize_size.  Otherwise, we can't mix object
+     files compiled with -Os and -On.  */
+  ix86_preferred_stack_boundary = 128;
   if (ix86_preferred_stack_boundary_string)
     {
       i = atoi (ix86_preferred_stack_boundary_string);
index 3be624e205d128cd1f898c5bfcaf0e8bb67a3d37..72711d67f34914f17031d83ce0efe98297b88401 100644 (file)
@@ -1,3 +1,8 @@
+2006-09-11  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR target/13685
+       * gcc.target/i386/pr13685.c: New test.
+
 2006-09-11  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * gcc.dg/pr28726.c: New test.
diff --git a/gcc/testsuite/gcc.target/i386/pr13685.c b/gcc/testsuite/gcc.target/i386/pr13685.c
new file mode 100644 (file)
index 0000000..7c4446a
--- /dev/null
@@ -0,0 +1,39 @@
+/* PR target/13685 */
+/* { dg-do run } */
+/* { dg-options "-Os -msse" } */
+#include <stdlib.h>
+#include <stdio.h>
+#include <xmmintrin.h>
+#include "../../gcc.dg/i386-cpuid.h"
+
+void foo (__m128 *, __m64 *, int);
+
+__m128 xmm0 = { 0 };
+__m64 mm0 = { 0 };
+
+int
+main ()
+{
+  unsigned long cpu_facilities = i386_cpuid ();
+  
+  if ((cpu_facilities & (bit_MMX | bit_SSE | bit_CMOV))
+      != (bit_MMX | bit_SSE | bit_CMOV))
+    /* If host has no SSE support, pass.  */
+    return 0;
+
+  foo (&xmm0, &mm0, 4);
+  return 0;
+}
+
+void
+foo (__m128 *dst, __m64 *src, int n)
+{
+  __m128 xmm0 = { 0 };
+  while (n > 64)
+    {
+      puts ("");
+      xmm0 = _mm_cvtpi32_ps (xmm0, *src);
+      *dst = xmm0;
+      n--;
+    }
+}