summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386')
-rw-r--r--gcc/testsuite/gcc.target/i386/incoming-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/incoming-2.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/incoming-3.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/incoming-4.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/incoming-5.c16
5 files changed, 93 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/incoming-1.c b/gcc/testsuite/gcc.target/i386/incoming-1.c
new file mode 100644
index 00000000000..fcc80f1ec2a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/incoming-1.c
@@ -0,0 +1,19 @@
+/* PR middle-end/37009 */
+/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-options "-w -msse2 -mpreferred-stack-boundary=2" } */
+
+#include <emmintrin.h>
+
+extern void bar (int *);
+
+int
+foo(__m128 x, __m128 y, __m128 z, int size)
+{
+ int __attribute((aligned(16))) xxx;
+
+ xxx = 2;
+ bar (&xxx);
+ return size;
+}
+
+/* { dg-final { scan-assembler "andl\[\\t \]*\\$-16,\[\\t \]*%esp" } } */
diff --git a/gcc/testsuite/gcc.target/i386/incoming-2.c b/gcc/testsuite/gcc.target/i386/incoming-2.c
new file mode 100644
index 00000000000..cc6c3934253
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/incoming-2.c
@@ -0,0 +1,19 @@
+/* PR middle-end/37009 */
+/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-options "-w -msse2 -mpreferred-stack-boundary=2" } */
+
+#include <emmintrin.h>
+
+extern void bar (int *);
+
+int
+foo(__m128 x, __m128 y, __m128 z, __m128 a, int size)
+{
+ int __attribute((aligned(16))) xxx;
+
+ xxx = 2;
+ bar (&xxx);
+ return size;
+}
+
+/* { dg-final { scan-assembler-not "and\[l\]\[ \t\]" } } */
diff --git a/gcc/testsuite/gcc.target/i386/incoming-3.c b/gcc/testsuite/gcc.target/i386/incoming-3.c
new file mode 100644
index 00000000000..aad38b53ab4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/incoming-3.c
@@ -0,0 +1,19 @@
+/* PR middle-end/37009 */
+/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-options "-w -msse2 -mpreferred-stack-boundary=2" } */
+
+#include <emmintrin.h>
+
+extern void bar (int *);
+
+int
+foo(__m128 y, int size, ...)
+{
+ int __attribute((aligned(16))) xxx;
+
+ xxx = 2;
+ bar (&xxx);
+ return size;
+}
+
+/* { dg-final { scan-assembler-not "and\[l\]\[ \t\]" } } */
diff --git a/gcc/testsuite/gcc.target/i386/incoming-4.c b/gcc/testsuite/gcc.target/i386/incoming-4.c
new file mode 100644
index 00000000000..270024bc15c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/incoming-4.c
@@ -0,0 +1,20 @@
+/* PR middle-end/37009 */
+/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-options "-w -msse2 -mpreferred-stack-boundary=2" } */
+
+#include <stdarg.h>
+#include <emmintrin.h>
+
+extern void bar (int *);
+
+__m128
+foo(va_list arg)
+{
+ int __attribute((aligned(16))) xxx;
+
+ xxx = 2;
+ bar (&xxx);
+ return va_arg (arg, __m128);
+}
+
+/* { dg-final { scan-assembler "andl\[\\t \]*\\$-16,\[\\t \]*%esp" } } */
diff --git a/gcc/testsuite/gcc.target/i386/incoming-5.c b/gcc/testsuite/gcc.target/i386/incoming-5.c
new file mode 100644
index 00000000000..38620bfc938
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/incoming-5.c
@@ -0,0 +1,16 @@
+/* PR middle-end/37009 */
+/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-options "-m32 -mincoming-stack-boundary=2 -mpreferred-stack-boundary=2" } */
+
+extern void bar (double *);
+
+double
+foo(double x)
+{
+ double xxx = x + 13.0;
+
+ bar (&xxx);
+ return xxx;
+}
+
+/* { dg-final { scan-assembler "andl\[\\t \]*\\$-8,\[\\t \]*%esp" } } */