]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Darwin, ppc, backport fixes to exclude Darwin from VSX, power8 & 9.
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 4 Aug 2019 09:49:27 +0000 (09:49 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Sun, 4 Aug 2019 09:49:27 +0000 (09:49 +0000)
This fixes a large number of test fails when we build PPC Darwin
with an LLVM-based assembler (that recognises the insns).

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-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
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: r274057

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/bfp/bfp.exp
gcc/testsuite/gcc.target/powerpc/dfp/dfp.exp
gcc/testsuite/lib/target-supports.exp

index a6b1eb4b5f9930d894055c20bddee48cea0b843d..4f9f3ac1b9a1d102d6decdacd12df8475bd9fd6b 100644 (file)
@@ -1,3 +1,17 @@
+2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>
+
+       Backport from mainline.
+       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-08-04  Iain Sandoe  <iain@sandoe.co.uk>
 
        Backport from mainline.
index 54df989705632a218802d5c3dc816853e8278128..ca6779af71d7e67f6f275f40ab9c0797f218b4a8 100644 (file)
 # 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
 }
 
index 7a344713818df8d22ac6b7c12298465142e5c261..ea0211a8d70a2d490f905a918c93e2d4327af163 100644 (file)
 # 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
 }
 
index 831204dc03c66fc2d692d202bc641c56f939c074..cda0f3d350bf67a52b071da8a305a95394169e62 100644 (file)
@@ -5065,13 +5065,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"]
@@ -5092,6 +5092,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;
@@ -5142,6 +5146,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;
@@ -5168,6 +5176,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;
@@ -5224,13 +5236,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"]