aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2018-07-17 01:04:24 +0200
committerSegher Boessenkool <segher@gcc.gnu.org>2018-07-17 01:04:24 +0200
commit1495b68bc9d9c7206c60145b67545c15b185213a (patch)
tree8096f2bf226bf504eb9341eb7b11a616b83404a6
parent831bac26205314490d8a15940f5bd59b030ca503 (diff)
downloadgcc-1495b68bc9d9c7206c60145b67545c15b185213a.zip
gcc-1495b68bc9d9c7206c60145b67545c15b185213a.tar.gz
gcc-1495b68bc9d9c7206c60145b67545c15b185213a.tar.bz2
rs6000: New testsuite selectors
This introduces four new selectors for use with Power testcases: longdouble64, ppc_float128, ppc_float128_insns, powerpc_vsx. gcc/testsuite/ * lib/target-supports.exp (check_effective_target_longdouble64, check_effective_target_ppc_float128, check_effective_target_ppc_float128_insns, check_effective_target_powerpc_vsx): New. From-SVN: r262756
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/lib/target-supports.exp39
2 files changed, 46 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e6b8362..1aa9b49 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,12 @@
2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
+ * lib/target-supports.exp (check_effective_target_longdouble64,
+ check_effective_target_ppc_float128,
+ check_effective_target_ppc_float128_insns,
+ check_effective_target_powerpc_vsx): New.
+
+2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
+
* lib/target-supports.exp (check_ppc_float128_hw_available): Fix
syntax error.
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index ec4a35d..c2d814c 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -2684,6 +2684,15 @@ proc check_effective_target_longdouble128 { } {
}]
}
+# Return 1 if the target supports long double of 64 bits,
+# 0 otherwise.
+
+proc check_effective_target_longdouble64 { } {
+ return [check_no_compiler_messages longdouble64 object {
+ int dummy[sizeof(long double) == 8 ? 1 : -1];
+ }]
+}
+
# Return 1 if the target supports double of 64 bits,
# 0 otherwise.
@@ -5141,6 +5150,36 @@ proc check_effective_target_powerpc_float128_hw_ok { } {
}
}
+# Return 1 if current options define float128, 0 otherwise.
+
+proc check_effective_target_ppc_float128 { } {
+ return [check_no_compiler_messages_nocache ppc_float128 object {
+ #ifndef __FLOAT128__
+ nope no good
+ #endif
+ }]
+}
+
+# Return 1 if current options generate float128 insns, 0 otherwise.
+
+proc check_effective_target_ppc_float128_insns { } {
+ return [check_no_compiler_messages_nocache ppc_float128 object {
+ #ifndef __FLOAT128_HARDWARE__
+ nope no good
+ #endif
+ }]
+}
+
+# Return 1 if current options generate VSX instructions, 0 otherwise.
+
+proc check_effective_target_powerpc_vsx { } {
+ return [check_no_compiler_messages_nocache powerpc_vsx object {
+ #ifndef __VSX__
+ nope no vsx
+ #endif
+ }]
+}
+
# Return 1 if this is a PowerPC target supporting -mvsx
proc check_effective_target_powerpc_vsx_ok { } {