aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2007-05-22 10:15:13 +0200
committerUros Bizjak <uros@gcc.gnu.org>2007-05-22 10:15:13 +0200
commit0f869709401ddaf2fac3bb2fcd58f998a69fc8f4 (patch)
treef85408826a0643c353ea78ab2e962415b094397a /gcc/testsuite
parentdbc30a96988c3dfa9f2587c4691de6f679daf9fd (diff)
downloadgcc-0f869709401ddaf2fac3bb2fcd58f998a69fc8f4.zip
gcc-0f869709401ddaf2fac3bb2fcd58f998a69fc8f4.tar.gz
gcc-0f869709401ddaf2fac3bb2fcd58f998a69fc8f4.tar.bz2
i386.exp (check_effective_target_ssse3): New.
* gcc.target/i386/i386.exp (check_effective_target_ssse3): New. (check_effective_target_sse4a): Ditto. * gcc.target/i386/ssse3-phsubw.c: Require effective target ssse3. * gcc.target/i386/ssse3-phaddd.c: Require effective target ssse3. * gcc.target/i386/ssse3-pabsb.c: Require effective target ssse3. * gcc.target/i386/ssse3-psignb.c: Require effective target ssse3. * gcc.target/i386/ssse3-phaddsw.c: Require effective target ssse3. * gcc.target/i386/ssse3-pabsd.c: Require effective target ssse3. * gcc.target/i386/ssse3-psignd.c: Require effective target ssse3. * gcc.target/i386/ssse3-pmaddubsw.c: Require effective target ssse3. * gcc.target/i386/ssse3-pmulhrsw.c: Require effective target ssse3. * gcc.target/i386/ssse3-phaddw.c: Require effective target ssse3. * gcc.target/i386/ssse3-phsubd.c: Require effective target ssse3. * gcc.target/i386/ssse3-pabsw.c: Require effective target ssse3. * gcc.target/i386/ssse3-psignw.c: Require effective target ssse3. * gcc.target/i386/ssse3-pshufb.c: Require effective target ssse3. * gcc.target/i386/ssse3-phsubsw.c: Require effective target ssse3. * gcc.target/i386/ssse3-palignr.c: Require effective target ssse3. * gcc.target/i386/sse4a-insert.c: Require effective target sse4a. * gcc.target/i386/sse4a-extract.c: Require effective target sse4a. * gcc.target/i386/sse4a-montss.c: Require effective target sse4a. * gcc.target/i386/sse4a-montsd.c: Require effective target sse4a. From-SVN: r124939
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog26
-rw-r--r--gcc/testsuite/gcc.target/i386/i386.exp26
-rw-r--r--gcc/testsuite/gcc.target/i386/sse4a-extract.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/sse4a-insert.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/sse4a-montsd.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/sse4a-montss.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-pabsb.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-pabsd.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-pabsw.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-palignr.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-phaddd.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-phaddsw.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-phaddw.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-phsubd.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-phsubsw.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-phsubw.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-pmaddubsw.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-pmulhrsw.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-pshufb.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-psignb.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-psignd.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssse3-psignw.c1
22 files changed, 72 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c37b343..13cc9a5 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,29 @@
+2007-05-22 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/i386.exp (check_effective_target_ssse3): New.
+ (check_effective_target_sse4a): Ditto.
+
+ * gcc.target/i386/ssse3-phsubw.c: Require effective target ssse3.
+ * gcc.target/i386/ssse3-phaddd.c: Require effective target ssse3.
+ * gcc.target/i386/ssse3-pabsb.c: Require effective target ssse3.
+ * gcc.target/i386/ssse3-psignb.c: Require effective target ssse3.
+ * gcc.target/i386/ssse3-phaddsw.c: Require effective target ssse3.
+ * gcc.target/i386/ssse3-pabsd.c: Require effective target ssse3.
+ * gcc.target/i386/ssse3-psignd.c: Require effective target ssse3.
+ * gcc.target/i386/ssse3-pmaddubsw.c: Require effective target ssse3.
+ * gcc.target/i386/ssse3-pmulhrsw.c: Require effective target ssse3.
+ * gcc.target/i386/ssse3-phaddw.c: Require effective target ssse3.
+ * gcc.target/i386/ssse3-phsubd.c: Require effective target ssse3.
+ * gcc.target/i386/ssse3-pabsw.c: Require effective target ssse3.
+ * gcc.target/i386/ssse3-psignw.c: Require effective target ssse3.
+ * gcc.target/i386/ssse3-pshufb.c: Require effective target ssse3.
+ * gcc.target/i386/ssse3-phsubsw.c: Require effective target ssse3.
+ * gcc.target/i386/ssse3-palignr.c: Require effective target ssse3.
+ * gcc.target/i386/sse4a-insert.c: Require effective target sse4a.
+ * gcc.target/i386/sse4a-extract.c: Require effective target sse4a.
+ * gcc.target/i386/sse4a-montss.c: Require effective target sse4a.
+ * gcc.target/i386/sse4a-montsd.c: Require effective target sse4a.
+
2007-05-21 Mark Mitchell <mark@codesourcery.com>
* g++.dg/ext/cleanup-1.C: New test.
diff --git a/gcc/testsuite/gcc.target/i386/i386.exp b/gcc/testsuite/gcc.target/i386/i386.exp
index f6c6210..c2e1336 100644
--- a/gcc/testsuite/gcc.target/i386/i386.exp
+++ b/gcc/testsuite/gcc.target/i386/i386.exp
@@ -24,6 +24,32 @@ if { ![istarget i?86*-*-*] && ![istarget x86_64-*-*] } then {
# Load support procs.
load_lib gcc-dg.exp
+# Return 1 if ssse3 instructions can be compiled.
+proc check_effective_target_ssse3 { } {
+ return [check_no_compiler_messages ssse3 object {
+ typedef long long __m128i __attribute__ ((__vector_size__ (16)));
+ typedef int __v4si __attribute__ ((__vector_size__ (16)));
+
+ __m128i _mm_abs_epi32 (__m128i __X)
+ {
+ return (__m128i) __builtin_ia32_pabsd128 ((__v4si)__X);
+ }
+ } "-O2 -mssse3" ]
+}
+
+# Return 1 if sse4a instructions can be compiled.
+proc check_effective_target_sse4a { } {
+ return [check_no_compiler_messages sse4a object {
+ typedef long long __m128i __attribute__ ((__vector_size__ (16)));
+ typedef long long __v2di __attribute__ ((__vector_size__ (16)));
+
+ __m128i _mm_insert_si64 (__m128i __X,__m128i __Y)
+ {
+ return (__m128i) __builtin_ia32_insertq ((__v2di)__X, (__v2di)__Y);
+ }
+ } "-O2 -msse4a" ]
+}
+
# If a testcase doesn't have special options, use these.
global DEFAULT_CFLAGS
if ![info exists DEFAULT_CFLAGS] then {
diff --git a/gcc/testsuite/gcc.target/i386/sse4a-extract.c b/gcc/testsuite/gcc.target/i386/sse4a-extract.c
index 20817a9..2c8d253 100644
--- a/gcc/testsuite/gcc.target/i386/sse4a-extract.c
+++ b/gcc/testsuite/gcc.target/i386/sse4a-extract.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target sse4a } */
/* { dg-options "-O2 -msse4a" } */
#include <ammintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/sse4a-insert.c b/gcc/testsuite/gcc.target/i386/sse4a-insert.c
index 3e44bba..8e014d6 100644
--- a/gcc/testsuite/gcc.target/i386/sse4a-insert.c
+++ b/gcc/testsuite/gcc.target/i386/sse4a-insert.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target sse4a } */
/* { dg-options "-O2 -msse4a" } */
#include <ammintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/sse4a-montsd.c b/gcc/testsuite/gcc.target/i386/sse4a-montsd.c
index e9be98e..26fa6b3 100644
--- a/gcc/testsuite/gcc.target/i386/sse4a-montsd.c
+++ b/gcc/testsuite/gcc.target/i386/sse4a-montsd.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target sse4a } */
/* { dg-options "-O2 -msse4a" } */
#include <ammintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/sse4a-montss.c b/gcc/testsuite/gcc.target/i386/sse4a-montss.c
index 28ecb1c..782c76a 100644
--- a/gcc/testsuite/gcc.target/i386/sse4a-montss.c
+++ b/gcc/testsuite/gcc.target/i386/sse4a-montss.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target sse4a } */
/* { dg-options "-O2 -msse4a" } */
#include <ammintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pabsb.c b/gcc/testsuite/gcc.target/i386/ssse3-pabsb.c
index 343cc15..c5b67f1 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-pabsb.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-pabsb.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
#include <tmmintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pabsd.c b/gcc/testsuite/gcc.target/i386/ssse3-pabsd.c
index 0b0d1f7..75a0656 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-pabsd.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-pabsd.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
#include <tmmintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pabsw.c b/gcc/testsuite/gcc.target/i386/ssse3-pabsw.c
index e7aed4a..bc06904 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-pabsw.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-pabsw.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
#include <tmmintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-palignr.c b/gcc/testsuite/gcc.target/i386/ssse3-palignr.c
index 683d24f..7ec58f1 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-palignr.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-palignr.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
#include <tmmintrin.h>
#include <string.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phaddd.c b/gcc/testsuite/gcc.target/i386/ssse3-phaddd.c
index f408c7a..575ff11 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-phaddd.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-phaddd.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
#include <tmmintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phaddsw.c b/gcc/testsuite/gcc.target/i386/ssse3-phaddsw.c
index d64d708..10d3e47 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-phaddsw.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-phaddsw.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
#include <tmmintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phaddw.c b/gcc/testsuite/gcc.target/i386/ssse3-phaddw.c
index 9595a36..c7197c4 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-phaddw.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-phaddw.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
#include <tmmintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phsubd.c b/gcc/testsuite/gcc.target/i386/ssse3-phsubd.c
index 1fe524b..f640b40 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-phsubd.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-phsubd.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
#include <tmmintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phsubsw.c b/gcc/testsuite/gcc.target/i386/ssse3-phsubsw.c
index 92a7c1e..80dc959 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-phsubsw.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-phsubsw.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
#include <tmmintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-phsubw.c b/gcc/testsuite/gcc.target/i386/ssse3-phsubw.c
index a793c8c..67a01c0 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-phsubw.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-phsubw.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
#include <tmmintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pmaddubsw.c b/gcc/testsuite/gcc.target/i386/ssse3-pmaddubsw.c
index 4ecee10..d340848 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-pmaddubsw.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-pmaddubsw.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
#include <tmmintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pmulhrsw.c b/gcc/testsuite/gcc.target/i386/ssse3-pmulhrsw.c
index 1bd4c2f..7aa5775 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-pmulhrsw.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-pmulhrsw.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
#include <tmmintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-pshufb.c b/gcc/testsuite/gcc.target/i386/ssse3-pshufb.c
index a06301f6..96cd90b 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-pshufb.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-pshufb.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
#include <tmmintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-psignb.c b/gcc/testsuite/gcc.target/i386/ssse3-psignb.c
index 17a7d36..193070f 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-psignb.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-psignb.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
#include <tmmintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-psignd.c b/gcc/testsuite/gcc.target/i386/ssse3-psignd.c
index 156c665..706be97 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-psignd.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-psignd.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
#include <tmmintrin.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/ssse3-psignw.c b/gcc/testsuite/gcc.target/i386/ssse3-psignw.c
index aca3612..a36be77 100644
--- a/gcc/testsuite/gcc.target/i386/ssse3-psignw.c
+++ b/gcc/testsuite/gcc.target/i386/ssse3-psignw.c
@@ -1,4 +1,5 @@
/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-effective-target ssse3 } */
/* { dg-options "-O2 -mssse3" } */
#include <tmmintrin.h>
#include <stdlib.h>