aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2016-02-28 14:36:41 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2016-02-28 14:36:41 +0000
commit33505bcf10452fe4bdb96c573805251753f06dc5 (patch)
tree8f0bc9888d13dfe7476a3e4349c83c41aa8c7598 /gcc
parent524bfb1973cc043d0afb4a5e86c16d8309f0801a (diff)
downloadgcc-33505bcf10452fe4bdb96c573805251753f06dc5.zip
gcc-33505bcf10452fe4bdb96c573805251753f06dc5.tar.gz
gcc-33505bcf10452fe4bdb96c573805251753f06dc5.tar.bz2
* config/i386/cygming.h (STACK_REALIGN_DEFAULT): Define.
From-SVN: r233791
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/i386/cygming.h5
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.target/i386/stack-realign-win.c35
4 files changed, 48 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 85c6301..4db03b6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2016-02-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ * config/i386/cygming.h (STACK_REALIGN_DEFAULT): Define.
+
2016-02-27 Jeff Law <law@redhat.com>
Revert
diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h
index 7cd8ac5..9da4733 100644
--- a/gcc/config/i386/cygming.h
+++ b/gcc/config/i386/cygming.h
@@ -39,6 +39,11 @@ along with GCC; see the file COPYING3. If not see
#undef MAX_STACK_ALIGNMENT
#define MAX_STACK_ALIGNMENT (TARGET_SEH ? 128 : MAX_OFILE_ALIGNMENT)
+/* 32-bit Windows aligns the stack on a 4-byte boundary but SSE instructions
+ may require 16-byte alignment. */
+#undef STACK_REALIGN_DEFAULT
+#define STACK_REALIGN_DEFAULT TARGET_SSE
+
/* Support hooks for SEH. */
#undef TARGET_ASM_UNWIND_EMIT
#define TARGET_ASM_UNWIND_EMIT i386_pe_seh_unwind_emit
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8953173..835ee2b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2016-02-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.target/i386/stack-realign-win.c: New test.
+
2016-02-28 Harald Anlauf <anlauf@gmx.de>
PR fortran/60126
diff --git a/gcc/testsuite/gcc.target/i386/stack-realign-win.c b/gcc/testsuite/gcc.target/i386/stack-realign-win.c
new file mode 100644
index 0000000..e27a565
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/stack-realign-win.c
@@ -0,0 +1,35 @@
+/* { dg-do compile { target *-*-mingw* *-*-cygwin* } } */
+/* { dg-require-effective-target ia32 } */
+/* { dg-options "-msse -O" } */
+
+extern void abort (void);
+
+typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__));
+
+static __m128
+load_m128 (float *e)
+{
+ return * (__m128 *) e;
+}
+
+typedef union
+{
+ __m128 x;
+ float a[4];
+} union128;
+
+void test (void)
+{
+ union128 u;
+ float e[4] __attribute__ ((aligned (16)))
+ = {2134.3343, 1234.635654, 1.2234, 876.8976};
+ int i;
+
+ u.x = load_m128 (e);
+
+ for (i = 0; i < 4; i++)
+ if (u.a[i] != e[i])
+ abort ();
+}
+
+/* { dg-final { scan-assembler "andl\\t\\$-16, %esp" } } */