aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2014-01-06 13:56:53 +0000
committerRainer Orth <ro@gcc.gnu.org>2014-01-06 13:56:53 +0000
commit4dc69bc674719454083318fd280bf061087940f4 (patch)
treeb4d0579772abfee47d4f22cf9d58e9bd020d387c /gcc
parent58ee277e2768fdbaf80ac136c45fb8fd8080c6df (diff)
downloadgcc-4dc69bc674719454083318fd280bf061087940f4.zip
gcc-4dc69bc674719454083318fd280bf061087940f4.tar.gz
gcc-4dc69bc674719454083318fd280bf061087940f4.tar.bz2
Clear hardware capabilities for gcc.dg/vect/vect-simd-clone-*.c
* gcc.dg/vect/vect.exp: Add clearcap_ldflags to DEFAULT_VECTCFLAGS if supported. From-SVN: r206360
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect.exp22
2 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 592a822..ab3f2b0 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2014-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+ * gcc.dg/vect/vect.exp: Add clearcap_ldflags to DEFAULT_VECTCFLAGS
+ if supported.
+
+2014-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
* gcc.target/i386/avx512f-vcmppd-2.c: Add -std=c99.
Require c99_runtime.
* gcc.target/i386/avx512f-vcmpps-2.c: Likewise.
diff --git a/gcc/testsuite/gcc.dg/vect/vect.exp b/gcc/testsuite/gcc.dg/vect/vect.exp
index b0b7e22..fa11e7e 100644
--- a/gcc/testsuite/gcc.dg/vect/vect.exp
+++ b/gcc/testsuite/gcc.dg/vect/vect.exp
@@ -41,6 +41,28 @@ if ![check_vect_support_and_set_flags] {
# These flags are used for all targets.
lappend DEFAULT_VECTCFLAGS "-ftree-vectorize" "-fno-vect-cost-model" "-fno-common"
+# If the linker used understands -M <mapfile>, pass it to clear hardware
+# capabilities set by the Sun assembler.
+# Try mapfile syntax v2 first which is the only way to clear hwcap_2 flags.
+set clearcap_ldflags "-Wl,-M,$srcdir/gcc.target/i386/clearcapv2.map"
+
+if ![check_no_compiler_messages mapfilev2 executable {
+ int main (void) { return 0; }
+} $clearcap_ldflags ] {
+ # If this doesn't work, fall back to the less capable v1 syntax.
+ set clearcap_ldflags "-Wl,-M,$srcdir/gcc.target/i386/clearcap.map"
+
+ if ![check_no_compiler_messages mapfile executable {
+ int main (void) { return 0; }
+ } $clearcap_ldflags ] {
+ unset clearcap_ldflags
+ }
+}
+
+if [info exists clearcap_ldflags] {
+ lappend DEFAULT_VECTCFLAGS $clearcap_ldflags
+}
+
# Initialize `dg'.
dg-init