aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2019-06-27 18:56:53 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-06-27 18:56:53 +0000
commit085efec58f7088152576e386cc8ddeb9f5ff5068 (patch)
tree132890d90f323a0a5df1e20ccd4d1bc4c46125ab
parentc2fe65930a4b48017042e49516eb338c9e241e53 (diff)
downloadgcc-085efec58f7088152576e386cc8ddeb9f5ff5068.zip
gcc-085efec58f7088152576e386cc8ddeb9f5ff5068.tar.gz
gcc-085efec58f7088152576e386cc8ddeb9f5ff5068.tar.bz2
[Darwin, PPC] Do not use longcall for 64b code.
The linker [ld64] that supports 64Bit does 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). So switch the longcall option off. ld64 will generate branch islands as needed. 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: r272758
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/rs6000/rs6000.c9
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b548ac3..7e6396c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+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-06-27 Aaron Sawdey <acsawdey@linux.ibm.com>
* builtins.c (get_memory_rtx): Fix comment.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 3b59db5..fbff6bd 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -3418,6 +3418,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;