rs6000: New testsuite selectors
authorSegher Boessenkool <segher@kernel.crashing.org>
Mon, 16 Jul 2018 23:04:24 +0000 (01:04 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Mon, 16 Jul 2018 23:04:24 +0000 (01:04 +0200)
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

gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index e6b8362983926eece0f9373c23b3cb65fae26eab..1aa9b490edd8e6c788882c6ee8efe2031701b463 100644 (file)
@@ -1,3 +1,10 @@
+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
index ec4a35dc97c903fb77d9c8c2ea28742181e7932b..c2d814cf8c692e5939ec71c43a50c5bd52554b2b 100644 (file)
@@ -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 { } {