]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Darwin, ppc, backport wrong code fix.
authorIain Sandoe <iain@sandoe.co.uk>
Sat, 3 Aug 2019 19:44:13 +0000 (19:44 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Sat, 3 Aug 2019 19:44:13 +0000 (19:44 +0000)
We should never have been using longcalls by default in
64b code.

2019-08-03  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-06-27  Iain Sandoe  <iain@sandoe.co.uk>

* config/rs6000/rs6000.c (darwin_rs6000_override_options): Do not
use longcall for 64b code.

From-SVN: r274044

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index c82acd9b666ae5359967940e652ee5bb82f2b42c..6bf6118c514c93d6c40e987c41fb62f46bfde0b4 100644 (file)
@@ -1,3 +1,11 @@
+2019-08-03  Iain Sandoe  <iain@sandoe.co.uk>
+
+       Backport from mainline
+       2019-06-27  Iain Sandoe  <iain@sandoe.co.uk>
+
+       * config/rs6000/rs6000.c (darwin_rs6000_override_options): Do not
+       use longcall for 64b code.
+
 2019-08-03  Iain Sandoe  <iain@sandoe.co.uk>
 
        Backport from mainline
index 085b80fa6531f1809667f7a7fa9a43dbabe02aca..68322bb2216cdf6e6683ab2a3636cb46499e8336 100644 (file)
@@ -3639,6 +3639,15 @@ darwin_rs6000_override_options (void)
       rs6000_isa_flags |= OPTION_MASK_POWERPC64;
       warning (0, "%qs requires PowerPC64 architecture, enabling", "-m64");
     }
+
+  /* The linkers [ld64] that support 64Bit do not need the JBSR longcall
+     optimisation, and will not work with the most generic case (where the
+     symbol is undefined external, but there is no symbl stub).  */
+  if (TARGET_64BIT)
+    rs6000_default_long_calls = 0;
+
+  /* ld_classic is (so far) still used for kernel (static) code, and supports
+     the JBSR longcall / branch islands.  */
   if (flag_mkernel)
     {
       rs6000_default_long_calls = 1;