summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-23 15:25:16 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2007-05-23 15:25:16 +0000
commitae6aae3a36e7a97d71177a75e6e0a3cf963c73ab (patch)
tree6512453f41de340ecba2fbdb722034a7a4ae4735
parenta657045415d9085c361ab57ed0def43c69d1782f (diff)
downloadgcc-ae6aae3a36e7a97d71177a75e6e0a3cf963c73ab.tar.gz
2007-05-23 H.J. Lu <hongjiu.lu@intel.com>
* gcc.target/i386/sse3-addsubpd.c: Don't include stdlib.h nor i386-cpuid.h. Include sse3-check.h. Remove main (). * gcc.target/i386/sse3-addsubps.c: Likewise. * gcc.target/i386/sse3-haddpd.c: Likewise. * gcc.target/i386/sse3-haddps.c: Likewise. * gcc.target/i386/sse3-hsubpd.c: Likewise. * gcc.target/i386/sse3-hsubps.c: Likewise. * gcc.target/i386/sse3-lddqu.c: Likewise. * gcc.target/i386/sse3-movddup.c: Likewise. * gcc.target/i386/sse3-movshdup.c: Likewise. * gcc.target/i386/sse3-movsldup.c: Likewise. * gcc.target/i386/ssse3-pabsb.c: Don't include stdlib.h nor i386-cpuid.h. Include ssse3-check.h. Remove main (). * gcc.target/i386/ssse3-pabsd.c: Likewise. * gcc.target/i386/ssse3-pabsw.c: Likewise. * gcc.target/i386/ssse3-palignr.c: Likewise. * gcc.target/i386/ssse3-phaddd.c: Likewise. * gcc.target/i386/ssse3-phaddsw.c: Likewise. * gcc.target/i386/ssse3-phaddw.c: Likewise. * gcc.target/i386/ssse3-phsubd.c: Likewise. * gcc.target/i386/ssse3-phsubsw.c: Likewise. * gcc.target/i386/ssse3-phsubw.c: Likewise. * gcc.target/i386/ssse3-pmaddubsw.c: Likewise. * gcc.target/i386/ssse3-pmulhrsw.c: Likewise. * gcc.target/i386/ssse3-pshufb.c: Likewise. * gcc.target/i386/ssse3-psignb.c: Likewise. * gcc.target/i386/ssse3-psignd.c: Likewise. * gcc.target/i386/ssse3-psignw.c: Likewise. * gcc.target/i386/ssse3-vals.h: Likewise. * gcc.target/i386/sse3-check.h: New file. * gcc.target/i386/ssse3-check.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124994 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog36
-rw-r--r--gcc/testsuite/gcc.target/i386/sse3-addsubpd.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/sse3-addsubps.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/sse3-check.h19
-rw-r--r--gcc/testsuite/gcc.target/i386/sse3-haddpd.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/sse3-haddps.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/sse3-hsubpd.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/sse3-hsubps.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/sse3-lddqu.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/sse3-movddup.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/sse3-movshdup.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/sse3-movsldup.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-check.h19
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-pabsb.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-pabsd.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-pabsw.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-palignr.c23
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-phaddd.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-phaddsw.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-phaddw.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-phsubd.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-phsubsw.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-phsubw.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-pmaddubsw.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-pmulhrsw.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-pshufb.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-psignb.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-psignd.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-psignw.c21
29 files changed, 143 insertions, 459 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index bf555817b5b..d8be89def1d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,39 @@
+2007-05-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/sse3-addsubpd.c: Don't include stdlib.h
+ nor i386-cpuid.h. Include sse3-check.h. Remove main ().
+ * gcc.target/i386/sse3-addsubps.c: Likewise.
+ * gcc.target/i386/sse3-haddpd.c: Likewise.
+ * gcc.target/i386/sse3-haddps.c: Likewise.
+ * gcc.target/i386/sse3-hsubpd.c: Likewise.
+ * gcc.target/i386/sse3-hsubps.c: Likewise.
+ * gcc.target/i386/sse3-lddqu.c: Likewise.
+ * gcc.target/i386/sse3-movddup.c: Likewise.
+ * gcc.target/i386/sse3-movshdup.c: Likewise.
+ * gcc.target/i386/sse3-movsldup.c: Likewise.
+
+ * gcc.target/i386/ssse3-pabsb.c: Don't include stdlib.h
+ nor i386-cpuid.h. Include ssse3-check.h. Remove main ().
+ * gcc.target/i386/ssse3-pabsd.c: Likewise.
+ * gcc.target/i386/ssse3-pabsw.c: Likewise.
+ * gcc.target/i386/ssse3-palignr.c: Likewise.
+ * gcc.target/i386/ssse3-phaddd.c: Likewise.
+ * gcc.target/i386/ssse3-phaddsw.c: Likewise.
+ * gcc.target/i386/ssse3-phaddw.c: Likewise.
+ * gcc.target/i386/ssse3-phsubd.c: Likewise.
+ * gcc.target/i386/ssse3-phsubsw.c: Likewise.
+ * gcc.target/i386/ssse3-phsubw.c: Likewise.
+ * gcc.target/i386/ssse3-pmaddubsw.c: Likewise.
+ * gcc.target/i386/ssse3-pmulhrsw.c: Likewise.
+ * gcc.target/i386/ssse3-pshufb.c: Likewise.
+ * gcc.target/i386/ssse3-psignb.c: Likewise.
+ * gcc.target/i386/ssse3-psignd.c: Likewise.
+ * gcc.target/i386/ssse3-psignw.c: Likewise.
+ * gcc.target/i386/ssse3-vals.h: Likewise.
+
+ * gcc.target/i386/sse3-check.h: New file.
+ * gcc.target/i386/ssse3-check.h: Likewise.
+
2007-05-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/31095
diff --git a/gcc/testsuite/gcc.target/i386/sse3-addsubpd.c b/gcc/testsuite/gcc.target/i386/sse3-addsubpd.c
index 9906239fdab..40cc6e8aa32 100644
--- a/gcc/testsuite/gcc.target/i386/sse3-addsubpd.c
+++ b/gcc/testsuite/gcc.target/i386/sse3-addsubpd.c
@@ -1,24 +1,9 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_addsubpd (double *i1, double *i2, double *r)
diff --git a/gcc/testsuite/gcc.target/i386/sse3-addsubps.c b/gcc/testsuite/gcc.target/i386/sse3-addsubps.c
index 6c45af1ac5d..b5d3f72e977 100644
--- a/gcc/testsuite/gcc.target/i386/sse3-addsubps.c
+++ b/gcc/testsuite/gcc.target/i386/sse3-addsubps.c
@@ -1,24 +1,9 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_addsubps (float *i1, float *i2, float *r)
diff --git a/gcc/testsuite/gcc.target/i386/sse3-check.h b/gcc/testsuite/gcc.target/i386/sse3-check.h
new file mode 100644
index 00000000000..120c3e6e375
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sse3-check.h
@@ -0,0 +1,19 @@
+#include <stdlib.h>
+
+#include "../../gcc.dg/i386-cpuid.h"
+
+static void sse3_test (void);
+
+int
+main ()
+{
+ unsigned long cpu_facilities;
+
+ cpu_facilities = i386_cpuid_ecx ();
+
+ /* Run SSE3 test only if host has SSE3 support. */
+ if ((cpu_facilities & bit_SSE3))
+ sse3_test ();
+
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/sse3-haddpd.c b/gcc/testsuite/gcc.target/i386/sse3-haddpd.c
index a85f3b37f6c..d8fe5b1cd55 100644
--- a/gcc/testsuite/gcc.target/i386/sse3-haddpd.c
+++ b/gcc/testsuite/gcc.target/i386/sse3-haddpd.c
@@ -1,24 +1,9 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_haddpd (double *i1, double *i2, double *r)
diff --git a/gcc/testsuite/gcc.target/i386/sse3-haddps.c b/gcc/testsuite/gcc.target/i386/sse3-haddps.c
index 2914b3863f0..feab14ae484 100644
--- a/gcc/testsuite/gcc.target/i386/sse3-haddps.c
+++ b/gcc/testsuite/gcc.target/i386/sse3-haddps.c
@@ -1,24 +1,9 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_haddps (float *i1, float *i2, float *r)
diff --git a/gcc/testsuite/gcc.target/i386/sse3-hsubpd.c b/gcc/testsuite/gcc.target/i386/sse3-hsubpd.c
index fcb1e9aef1a..841950aff98 100644
--- a/gcc/testsuite/gcc.target/i386/sse3-hsubpd.c
+++ b/gcc/testsuite/gcc.target/i386/sse3-hsubpd.c
@@ -1,24 +1,9 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_hsubpd (double *i1, double *i2, double *r)
diff --git a/gcc/testsuite/gcc.target/i386/sse3-hsubps.c b/gcc/testsuite/gcc.target/i386/sse3-hsubps.c
index e3b63272ea3..f4a673704d9 100644
--- a/gcc/testsuite/gcc.target/i386/sse3-hsubps.c
+++ b/gcc/testsuite/gcc.target/i386/sse3-hsubps.c
@@ -1,24 +1,9 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_hsubps (float *i1, float *i2, float *r)
diff --git a/gcc/testsuite/gcc.target/i386/sse3-lddqu.c b/gcc/testsuite/gcc.target/i386/sse3-lddqu.c
index 45c63e436bb..294ff0eac32 100644
--- a/gcc/testsuite/gcc.target/i386/sse3-lddqu.c
+++ b/gcc/testsuite/gcc.target/i386/sse3-lddqu.c
@@ -1,24 +1,9 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_lddqu (double *i1, double *r)
diff --git a/gcc/testsuite/gcc.target/i386/sse3-movddup.c b/gcc/testsuite/gcc.target/i386/sse3-movddup.c
index 96641c60d2d..0ceb3f52cf3 100644
--- a/gcc/testsuite/gcc.target/i386/sse3-movddup.c
+++ b/gcc/testsuite/gcc.target/i386/sse3-movddup.c
@@ -1,24 +1,9 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_movddup_mem (double *i1, double *r)
diff --git a/gcc/testsuite/gcc.target/i386/sse3-movshdup.c b/gcc/testsuite/gcc.target/i386/sse3-movshdup.c
index 88d4125e377..62bd9ebe217 100644
--- a/gcc/testsuite/gcc.target/i386/sse3-movshdup.c
+++ b/gcc/testsuite/gcc.target/i386/sse3-movshdup.c
@@ -1,24 +1,9 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_movshdup_reg (float *i1, float *r)
diff --git a/gcc/testsuite/gcc.target/i386/sse3-movsldup.c b/gcc/testsuite/gcc.target/i386/sse3-movsldup.c
index a3128ad20fb..42d4786f7e7 100644
--- a/gcc/testsuite/gcc.target/i386/sse3-movsldup.c
+++ b/gcc/testsuite/gcc.target/i386/sse3-movsldup.c
@@ -1,24 +1,9 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -msse3" } */
-#include <pmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-
-static void sse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
- cpu_facilities = i386_cpuid_ecx ();
+#include "sse3-check.h"
- /* Run SSE3 test only if host has SSE3 support. */
- if ((cpu_facilities & bit_SSE3))
- sse3_test ();
-
- exit (0);
-}
+#include <pmmintrin.h>
static void
sse3_test_movsldup_reg (float *i1, float *r)
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-check.h b/gcc/testsuite/gcc.target/i386/ssse3-check.h
new file mode 100644
index 00000000000..41f46f94ce9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/ssse3-check.h
@@ -0,0 +1,19 @@
+#include <stdlib.h>
+
+#include "../../gcc.dg/i386-cpuid.h"
+
+static void ssse3_test (void);
+
+int
+main ()
+{
+ unsigned long cpu_facilities;
+
+ cpu_facilities = i386_cpuid_ecx ();
+
+ /* Run SSSE3 test only if host has SSSE3 support. */
+ if ((cpu_facilities & bit_SSSE3))
+ ssse3_test ();
+
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pabsb.c b/gcc/testsuite/gcc.target/i386/ssse3-pabsb.c
index c5b67f10ccf..87dd6fa4edf 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-pabsb.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-pabsb.c
@@ -1,26 +1,11 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pabsd.c b/gcc/testsuite/gcc.target/i386/ssse3-pabsd.c
index 75a06568ba5..09880b70b6c 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-pabsd.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-pabsd.c
@@ -1,26 +1,11 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pabsw.c b/gcc/testsuite/gcc.target/i386/ssse3-pabsw.c
index bc06904484d..53df7ce58fe 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-pabsw.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-pabsw.c
@@ -1,26 +1,11 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-palignr.c b/gcc/testsuite/gcc.target/i386/ssse3-palignr.c
index 7ec58f11a44..eb4bb94e4f9 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-palignr.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-palignr.c
@@ -1,27 +1,12 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <string.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
+#include <string.h>
/* Test the 64-bit form */
static void
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phaddd.c b/gcc/testsuite/gcc.target/i386/ssse3-phaddd.c
index 575ff118040..00b45c854ab 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-phaddd.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-phaddd.c
@@ -1,26 +1,11 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phaddsw.c b/gcc/testsuite/gcc.target/i386/ssse3-phaddsw.c
index 10d3e4708c9..8efcf3a853c 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-phaddsw.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-phaddsw.c
@@ -1,26 +1,11 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phaddw.c b/gcc/testsuite/gcc.target/i386/ssse3-phaddw.c
index c7197c45212..9437c6cc60f 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-phaddw.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-phaddw.c
@@ -1,26 +1,11 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phsubd.c b/gcc/testsuite/gcc.target/i386/ssse3-phsubd.c
index f640b40bee9..dd24a3e82f7 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-phsubd.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-phsubd.c
@@ -1,26 +1,11 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phsubsw.c b/gcc/testsuite/gcc.target/i386/ssse3-phsubsw.c
index 80dc959b151..bf4ad26d1bb 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-phsubsw.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-phsubsw.c
@@ -1,26 +1,11 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phsubw.c b/gcc/testsuite/gcc.target/i386/ssse3-phsubw.c
index 67a01c0dd53..dd7ccd92b49 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-phsubw.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-phsubw.c
@@ -1,26 +1,11 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pmaddubsw.c b/gcc/testsuite/gcc.target/i386/ssse3-pmaddubsw.c
index d3408483faa..6f1e2a39240 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-pmaddubsw.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-pmaddubsw.c
@@ -1,26 +1,11 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pmulhrsw.c b/gcc/testsuite/gcc.target/i386/ssse3-pmulhrsw.c
index 7aa5775f634..d7bbaf9718a 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-pmulhrsw.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-pmulhrsw.c
@@ -1,26 +1,11 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pshufb.c b/gcc/testsuite/gcc.target/i386/ssse3-pshufb.c
index 96cd90bacf3..c38b1460eb3 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-pshufb.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-pshufb.c
@@ -1,26 +1,11 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-psignb.c b/gcc/testsuite/gcc.target/i386/ssse3-psignb.c
index 193070f12c9..727b2129c03 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-psignb.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-psignb.c
@@ -1,26 +1,11 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-psignd.c b/gcc/testsuite/gcc.target/i386/ssse3-psignd.c
index 706be9799d4..0a63c4d590f 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-psignd.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-psignd.c
@@ -1,26 +1,11 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-psignw.c b/gcc/testsuite/gcc.target/i386/ssse3-psignw.c
index a36be771ae9..efe88776bee 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-psignw.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-psignw.c
@@ -1,26 +1,11 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
-#include <tmmintrin.h>
-#include <stdlib.h>
-#include "../../gcc.dg/i386-cpuid.h"
-#include "ssse3-vals.h"
-
-static void ssse3_test (void);
-
-int
-main ()
-{
- unsigned long cpu_facilities;
-
- cpu_facilities = i386_cpuid_ecx ();
- /* Run SSSE3 test only if host has SSSE3 support. */
- if ((cpu_facilities & bit_SSSE3))
- ssse3_test ();
+#include "ssse3-check.h"
+#include "ssse3-vals.h"
- exit (0);
-}
+#include <tmmintrin.h>
/* Test the 64-bit form */
static void