]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Darwin, PPC] Do not use longcall for 64b code.
authorIain Sandoe <iain@sandoe.co.uk>
Wed, 4 Sep 2019 19:24:42 +0000 (19:24 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Wed, 4 Sep 2019 19:24:42 +0000 (19:24 +0000)
Fix wrong codegen; the 'native' tools do no emit the longcall in this
position.

2019-09-04  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: r275384

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

index ba006ac51821a428d75731fc8ffa89266d8a275e..8408f5b82f2d85939c0d278703069551e62bc6e7 100644 (file)
@@ -1,3 +1,11 @@
+2019-09-04  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-09-04  Iain Sandoe  <iain@sandoe.co.uk>
 
        Backport from mainline
index ddf412137bb578e26aacddb03abdd348f5c01a19..7a374cfd58c47c998e74ee1febbe85b26703b261 100644 (file)
@@ -3834,6 +3834,15 @@ darwin_rs6000_override_options (void)
       rs6000_isa_flags |= OPTION_MASK_POWERPC64;
       warning (0, "-m64 requires PowerPC64 architecture, enabling");
     }
+
+  /* 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;