From c221c627cb03585892bbcae2334c013b8fdf4b41 Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Wed, 15 May 2019 11:47:04 +0000 Subject: [PATCH] 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 * 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 --- gcc/testsuite/ChangeLog | 11 ++++++++ gcc/testsuite/gcc.target/powerpc/bfp/bfp.exp | 6 ++-- gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp | 7 +++-- gcc/testsuite/lib/target-supports.exp | 29 ++++++++++++++------ 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,3 +1,14 @@ +2019-05-15 Iain Sandoe + + * 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 * gcc.dg/pr87600.h: Add __POWERPC__ as an alternate test 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 # . -# 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 # . -# 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"] -- 2.30.2