summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2019-05-15 11:47:04 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-05-15 11:47:04 +0000
commitc221c627cb03585892bbcae2334c013b8fdf4b41 (patch)
treec25ab3d9b8fbc0ae303a3ce3bccfbd90c17d1048
parent595ffc073bf5b1753e3a18dfa704391ad5fad626 (diff)
downloadgcc-c221c627cb03585892bbcae2334c013b8fdf4b41.tar.gz
darwin, testsuite, powerpc - handle tests for new processors.
If we build Darwin with a modern assembler, then it might well recognise insns that cannot be used on current Darwin systems. The patch augments the tests for feature support for VSX, power8 and power9 to exclude Darwin even if the assembler can handle the instructions. 2019-05-15 Iain Sandoe <iain@sandoe.co.uk> * lib/target-supports.exp (check_effective_target_powerpc_p8vector_ok): No support for Darwin. (check_effective_target_powerpc_p9vector_ok): Likewise. (check_effective_target_powerpc_float128_sw_ok): Likewise. (check_effective_target_powerpc_float128_hw_ok): Likewise. (check_effective_target_powerpc_vsx_ok): Likewise. * gcc.target/powerpc/bfp/bfp.exp: Don't try to run this for Darwin. * gcc.target/powerpc/dfp/dfp.exp: Likewise. From-SVN: r271205
-rw-r--r--gcc/testsuite/ChangeLog11
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bfp/bfp.exp6
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp7
-rw-r--r--gcc/testsuite/lib/target-supports.exp29
4 files changed, 41 insertions, 12 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 262dce85c1d..e569939c654 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,16 @@
2019-05-15 Iain Sandoe <iain@sandoe.co.uk>
+ * lib/target-supports.exp
+ (check_effective_target_powerpc_p8vector_ok): No support for Darwin.
+ (check_effective_target_powerpc_p9vector_ok): Likewise.
+ (check_effective_target_powerpc_float128_sw_ok): Likewise.
+ (check_effective_target_powerpc_float128_hw_ok): Likewise.
+ (check_effective_target_powerpc_vsx_ok): Likewise.
+ * gcc.target/powerpc/bfp/bfp.exp: Don't try to run this for Darwin.
+ * gcc.target/powerpc/dfp/dfp.exp: Likewise.
+
+2019-05-15 Iain Sandoe <iain@sandoe.co.uk>
+
* gcc.dg/pr87600.h: Add __POWERPC__ as an alternate test
for PowerPC platforms.
diff --git a/gcc/testsuite/gcc.target/powerpc/bfp/bfp.exp b/gcc/testsuite/gcc.target/powerpc/bfp/bfp.exp
index 54df9897056..ca6779af71d 100644
--- a/gcc/testsuite/gcc.target/powerpc/bfp/bfp.exp
+++ b/gcc/testsuite/gcc.target/powerpc/bfp/bfp.exp
@@ -16,9 +16,11 @@
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
-# Exit immediately if this isn't a PowerPC target or if the target is aix.
+# Exit immediately if this isn't a PowerPC target or if the target is
+# aix or Darwin.
if { (![istarget powerpc*-*-*] && ![istarget rs6000-*-*])
- || [istarget "powerpc*-*-aix*"] } then {
+ || [istarget "powerpc*-*-aix*"]
+ || [istarget "powerpc*-*-darwin*"] } then {
return
}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp b/gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp
index 7a344713818..ea0211a8d70 100644
--- a/gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp
+++ b/gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp
@@ -16,8 +16,11 @@
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
-# Exit immediately if this isn't a PowerPC target.
-if { ![istarget powerpc*-*-*] && ![istarget rs6000-*-*] } then {
+# Exit immediately if this isn't a PowerPC target, also exit if we
+# are on Darwin which doesn't support decimal float.
+if { (![istarget powerpc*-*-*] && ![istarget rs6000-*-*])
+ || [istarget "powerpc*-*-darwin*"]
+} then {
return
}
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index da132369a4b..324a9fef96a 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -5055,13 +5055,13 @@ proc check_effective_target_powerpc_p8vector_ok { } {
|| [istarget powerpc*-*-aix5.2*] } {
return 0
}
+ # Darwin doesn't run on power8, so far.
+ if { [istarget *-*-darwin*] } {
+ return 0
+ }
return [check_no_compiler_messages powerpc_p8vector_ok object {
int main (void) {
-#ifdef __MACH__
- asm volatile ("xxlorc vs0,vs0,vs0");
-#else
asm volatile ("xxlorc 0,0,0");
-#endif
return 0;
}
} "-mpower8-vector"]
@@ -5082,6 +5082,10 @@ proc check_effective_target_powerpc_p9vector_ok { } {
|| [istarget powerpc*-*-aix5.2*] } {
return 0
}
+ # Darwin doesn't run on power9, so far.
+ if { [istarget *-*-darwin*] } {
+ return 0
+ }
return [check_no_compiler_messages powerpc_p9vector_ok object {
int main (void) {
long e = -1;
@@ -5132,6 +5136,10 @@ proc check_effective_target_powerpc_float128_sw_ok { } {
|| [istarget powerpc*-*-aix5.2*] } {
return 0
}
+ # Darwin doesn't have VSX, so no soft support for float128.
+ if { [istarget *-*-darwin*] } {
+ return 0
+ }
return [check_no_compiler_messages powerpc_float128_sw_ok object {
volatile __float128 x = 1.0q;
volatile __float128 y = 2.0q;
@@ -5158,6 +5166,10 @@ proc check_effective_target_powerpc_float128_hw_ok { } {
|| [istarget powerpc*-*-aix5.2*] } {
return 0
}
+ # Darwin doesn't run on any machine with float128 h/w so far.
+ if { [istarget *-*-darwin*] } {
+ return 0
+ }
return [check_no_compiler_messages powerpc_float128_hw_ok object {
volatile __float128 x = 1.0q;
volatile __float128 y = 2.0q;
@@ -5214,13 +5226,14 @@ proc check_effective_target_powerpc_vsx_ok { } {
|| [istarget powerpc*-*-aix6*] } {
return 0
}
+ # Darwin doesn't have VSX, even if it's used with an assembler
+ # which recognises the insns.
+ if { [istarget *-*-darwin*] } {
+ return 0
+ }
return [check_no_compiler_messages powerpc_vsx_ok object {
int main (void) {
-#ifdef __MACH__
- asm volatile ("xxlor vs0,vs0,vs0");
-#else
asm volatile ("xxlor 0,0,0");
-#endif
return 0;
}
} "-mvsx"]