IBM Z: Do not run long double tests on old machines
authorIlya Leoshkevich <iii@linux.ibm.com>
Thu, 12 Nov 2020 14:32:04 +0000 (15:32 +0100)
committerIlya Leoshkevich <iii@linux.ibm.com>
Mon, 16 Nov 2020 12:28:26 +0000 (13:28 +0100)
gcc/testsuite/ChangeLog:

2020-11-12  Ilya Leoshkevich  <iii@linux.ibm.com>

* gcc.target/s390/s390.exp (check_effective_target_s390_z14_hw):
New predicate.
* gcc.target/s390/vector/long-double-caller-abi-run.c: Use the
new predicate.
* gcc.target/s390/vector/long-double-copysign.c: Likewise.
* gcc.target/s390/vector/long-double-from-double.c: Likewise.
* gcc.target/s390/vector/long-double-from-float.c: Likewise.
* gcc.target/s390/vector/long-double-from-i16.c: Likewise.
* gcc.target/s390/vector/long-double-from-i32.c: Likewise.
* gcc.target/s390/vector/long-double-from-i64.c: Likewise.
* gcc.target/s390/vector/long-double-from-i8.c: Likewise.
* gcc.target/s390/vector/long-double-from-u16.c: Likewise.
* gcc.target/s390/vector/long-double-from-u32.c: Likewise.
* gcc.target/s390/vector/long-double-from-u64.c: Likewise.
* gcc.target/s390/vector/long-double-from-u8.c: Likewise.
* gcc.target/s390/vector/long-double-to-double.c: Likewise.
* gcc.target/s390/vector/long-double-to-float.c: Likewise.
* gcc.target/s390/vector/long-double-to-i16.c: Likewise.
* gcc.target/s390/vector/long-double-to-i32.c: Likewise.
* gcc.target/s390/vector/long-double-to-i64.c: Likewise.
* gcc.target/s390/vector/long-double-to-i8.c: Likewise.
* gcc.target/s390/vector/long-double-to-u16.c: Likewise.
* gcc.target/s390/vector/long-double-to-u32.c: Likewise.
* gcc.target/s390/vector/long-double-to-u64.c: Likewise.
* gcc.target/s390/vector/long-double-to-u8.c: Likewise.
* gcc.target/s390/vector/long-double-wfaxb.c: Likewise.
* gcc.target/s390/vector/long-double-wfdxb.c: Likewise.
* gcc.target/s390/vector/long-double-wfsxb-1.c: Likewise.

26 files changed:
gcc/testsuite/gcc.target/s390/s390.exp
gcc/testsuite/gcc.target/s390/vector/long-double-caller-abi-run.c
gcc/testsuite/gcc.target/s390/vector/long-double-copysign.c
gcc/testsuite/gcc.target/s390/vector/long-double-from-double.c
gcc/testsuite/gcc.target/s390/vector/long-double-from-float.c
gcc/testsuite/gcc.target/s390/vector/long-double-from-i16.c
gcc/testsuite/gcc.target/s390/vector/long-double-from-i32.c
gcc/testsuite/gcc.target/s390/vector/long-double-from-i64.c
gcc/testsuite/gcc.target/s390/vector/long-double-from-i8.c
gcc/testsuite/gcc.target/s390/vector/long-double-from-u16.c
gcc/testsuite/gcc.target/s390/vector/long-double-from-u32.c
gcc/testsuite/gcc.target/s390/vector/long-double-from-u64.c
gcc/testsuite/gcc.target/s390/vector/long-double-from-u8.c
gcc/testsuite/gcc.target/s390/vector/long-double-to-double.c
gcc/testsuite/gcc.target/s390/vector/long-double-to-float.c
gcc/testsuite/gcc.target/s390/vector/long-double-to-i16.c
gcc/testsuite/gcc.target/s390/vector/long-double-to-i32.c
gcc/testsuite/gcc.target/s390/vector/long-double-to-i64.c
gcc/testsuite/gcc.target/s390/vector/long-double-to-i8.c
gcc/testsuite/gcc.target/s390/vector/long-double-to-u16.c
gcc/testsuite/gcc.target/s390/vector/long-double-to-u32.c
gcc/testsuite/gcc.target/s390/vector/long-double-to-u64.c
gcc/testsuite/gcc.target/s390/vector/long-double-to-u8.c
gcc/testsuite/gcc.target/s390/vector/long-double-wfaxb.c
gcc/testsuite/gcc.target/s390/vector/long-double-wfdxb.c
gcc/testsuite/gcc.target/s390/vector/long-double-wfsxb-1.c

index 387a720..00e0555 100644 (file)
@@ -192,6 +192,16 @@ proc check_effective_target_s390_z13_hw { } {
        }
     }] "-march=z13 -m64 -mzarch" ] } { return 0 } else { return 1 }
 }
+proc check_effective_target_s390_z14_hw { } {
+    if { ![check_runtime s390_check_s390_z14_hw [subst {
+       int main (void)
+       {
+           int x = 0;
+           asm ("msgrkc %%0,%%0,%%0" : "+r" (x) : );
+           return x;
+       }
+    }] "-march=z14 -m64 -mzarch" ] } { return 0 } else { return 1 }
+}
 
 # If a testcase doesn't have special options, use these.
 global DEFAULT_CFLAGS
index f3a41ba..f7315f6 100644 (file)
@@ -1,4 +1,5 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include "long-double-callee-abi-scan.c"
 #include "long-double-caller-abi-scan.c"
index 3115195..5d69e0f 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
index 5eb31f8..d98e44d 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 
 __attribute__ ((noipa)) static long double
index 0449f0c..0ddd47d 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 
 __attribute__ ((noipa)) static long double
index 68b164d..f7d37c9 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
index ad8443b..49d919d 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
index 3d2c424..986a5eb 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
index 44c8c9d..9356af1 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
index f10c298..3aafeb4 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
index 2763fb4..655f5d7 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
index 4686dfd..601ff9c 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
index 3e6eb92..a43b4c8 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
index 88aa053..71ed8b2 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 
 __attribute__ ((noipa)) static double
index 36fd429..a2855e0 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 
 __attribute__ ((noipa)) static float
index ddfc668..1dd0e81 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
index 975a5de..0d5678b 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
index 6bd5079..2dbbb5d 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
index 46e6d6b..9b0b45d 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
index 0690f3d..f9ad0c6 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
index aa0e318..37b0616 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
index e37b65e..051934d 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
index bddbff8..cf3204c 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 #include <stdint.h>
 
index 1b35c1c..5a10bd1 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 
 __attribute__ ((noipa)) static long double
index 16b4893..db517e9 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 
 __attribute__ ((noipa)) static long double
index 20960d0..06750a6 100644 (file)
@@ -1,5 +1,6 @@
-/* { dg-do run } */
+/* { dg-do compile } */
 /* { dg-options "-O3 -march=z14 -mzarch" } */
+/* { dg-do run { target { s390_z14_hw } } } */
 #include <assert.h>
 
 typedef float tf __attribute__ ((mode (TF)));