+2017-03-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ * gcc.target/s390/s390.exp (check_effective_target_vector):
+ Include target-supports.exp and move target_vector check routine
+ ...
+ * lib/target-supports.exp (check_effective_target_s390_vx): ... to
+ here and rename it.
+ * gcc.target/s390/htm-builtins-z13-1.c: Rename effective target
+ check from vector to s390_vx.
+ * gcc.target/s390/target-attribute/tpragma-struct-vx-1.c: Likewise.
+ * gcc.target/s390/target-attribute/tpragma-struct-vx-2.c: Likewise.
+ * gcc.target/s390/vector/stpcpy-1.c: Likewise.
+ * gcc.target/s390/vector/vec-abi-vararg-1.c: Likewise.
+ * gcc.target/s390/vector/vec-clobber-1.c: Likewise.
+ * gcc.target/s390/vector/vec-genbytemask-1.c: Likewise.
+ * gcc.target/s390/vector/vec-genmask-1.c: Likewise.
+ * gcc.target/s390/vector/vec-nopeel-1.c: Likewise.
+ * gcc.target/s390/vector/vec-vrepi-1.c: Likewise.
+
2017-03-24 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* gcc.target/s390/vector/vec-init-2.c: New test.
/* Verify if VRs are saved and restored. */
/* { dg-do run } */
-/* { dg-require-effective-target vector } */
+/* { dg-require-effective-target s390_vx } */
/* { dg-options "-O3 -march=z13 -mzarch" } */
typedef int __attribute__((vector_size(16))) v4si;
# Load support procs.
load_lib gcc-dg.exp
+load_lib target-supports.exp
# Return 1 if the the assembler understands .machine and .machinemode. The
# target attribute needs that feature to work.
}] "-march=zEC12 -mzarch" ] } { return 0 } else { return 1 }
}
-# Return 1 if vector (va - vector add) instructions are understood by
-# the assembler and can be executed. This also covers checking for
-# the VX kernel feature. A kernel without that feature does not
-# enable the vector facility and the following check will die with a
-# signal.
-proc check_effective_target_vector { } {
- if { ![check_runtime s390_check_vector [subst {
- int main (void)
- {
- asm ("va %%v24, %%v26, %%v28, 3" : : : "v24", "v26", "v28");
- return 0;
- }
- }] "-march=z13 -mzarch" ] } { return 0 } else { return 1 }
-}
-
global s390_cached_flags
set s390_cached_flags ""
global s390_cached_value
/* { dg-do run } */
/* { dg-require-effective-target target_attribute } */
-/* { dg-require-effective-target vector } */
+/* { dg-require-effective-target s390_vx } */
/* { dg-options "-march=z900 -mno-vx -mzarch" } */
#define V16 __attribute__ ((vector_size(16)))
/* { dg-do run } */
/* { dg-require-effective-target target_attribute } */
-/* { dg-require-effective-target vector } */
+/* { dg-require-effective-target s390_vx } */
/* { dg-options "-march=z13 -mvx -mzarch" } */
#define V16 __attribute__ ((vector_size(16)))
strings. */
/* { dg-do run } */
-/* { dg-require-effective-target vector } */
+/* { dg-require-effective-target s390_vx } */
/* { dg-options "-O3 -mzarch -march=z13" } */
#include <stdio.h>
ABI. */
/* { dg-do run { target { s390*-*-* } } } */
-/* { dg-require-effective-target vector } */
+/* { dg-require-effective-target s390_vx } */
/* { dg-options "-O3 -mzarch -march=z13 --save-temps" } */
/* Make sure arguments are fetched from the argument overflow area. */
/* { dg-do run { target { s390*-*-* } } } */
-/* { dg-require-effective-target vector } */
+/* { dg-require-effective-target s390_vx } */
/* { dg-options "-O3 -mzarch -march=z13" } */
/* For FP zero checks we use the ltdbr instruction. Since this is an
/* { dg-do run } */
/* { dg-options "-O3 -mzarch -march=z13 --save-temps" } */
-/* { dg-require-effective-target vector } */
+/* { dg-require-effective-target s390_vx } */
/* { dg-require-effective-target int128 } */
typedef unsigned char uv16qi __attribute__((vector_size(16)));
/* { dg-do run } */
/* { dg-options "-O3 -mzarch -march=z13 --save-temps" } */
-/* { dg-require-effective-target vector } */
+/* { dg-require-effective-target s390_vx } */
typedef unsigned char uv16qi __attribute__((vector_size(16)));
typedef unsigned short uv8hi __attribute__((vector_size(16)));
/* { dg-do compile } */
/* { dg-options "-O3 -mzarch -march=z13" } */
-/* { dg-require-effective-target vector } */
+/* { dg-require-effective-target s390_vx } */
int
foo (int * restrict a, int n)
/* { dg-do run } */
/* { dg-options "-O3 -mzarch -march=z13 --save-temps" } */
-/* { dg-require-effective-target vector } */
+/* { dg-require-effective-target s390_vx } */
typedef unsigned char uv16qi __attribute__((vector_size(16)));
typedef unsigned short uv8hi __attribute__((vector_size(16)));
} "-fprofile-update=atomic -fprofile-generate"]
}
+# Return 1 if vector (va - vector add) instructions are understood by
+# the assembler and can be executed. This also covers checking for
+# the VX kernel feature. A kernel without that feature does not
+# enable the vector facility and the following check will die with a
+# signal.
+proc check_effective_target_s390_vx { } {
+ if ![istarget s390*-*-*] then {
+ return 0;
+ }
+
+ return [check_runtime s390_check_vx {
+ int main (void)
+ {
+ asm ("va %%v24, %%v26, %%v28, 3" : : : "v24", "v26", "v28");
+ return 0;
+ }
+ } "-march=z13 -mzarch" ]
+}
#For versions of ARM architectures that have hardware div insn,
#disable the divmod transform