]> git.ipfire.org Git - thirdparty/gcc.git/commit
[RS6000] Emit inline PLT when -mno-tls-markers
authoramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Feb 2019 13:18:14 +0000 (13:18 +0000)
committeramodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Feb 2019 13:18:14 +0000 (13:18 +0000)
commit441c64de031930c1e8f1184cdcf2b28c8b544037
treec3e64f9daf95588a90453191b39ae41840082bea
parent90f52861731615d725b8215d62b40aa232a57825
[RS6000] Emit inline PLT when -mno-tls-markers

I restricted output of inline PLT sequences to when TLS marker relocs
were also available, which is obviously true when just considering
assembler support.  However, there is a -mno-tls-markers option to
disable emitting the marker relocs.  Currently that option also
disables inline PLT sequences, which is a bug (*).  This patch fixes
that problem.

*) To be honest, it was a deliberate bug.  I didn't want to have to
deal with inline PLT __tls_get_addr sequences lacking the marker
relocs in the linker, but it turns out the existing linker support for
old-style __tls_get_addr calls works reasonably well.

* config/rs6000/rs6000.c (rs6000_indirect_call_template_1),
(rs6000_pltseq_template): Guard output of TLS markers with
TARGET_TLS_MARKERS.
(rs6000_longcall_ref, rs6000_call_aix, rs6000_call_sysv),
(rs6000_sibcall_sysv): Ignore TARGET_TLS_MARKERS when deciding
to use inline PLT sequences.
* config/rs6000/rs6000.md (pltseq_tocsave_<mode>),
(pltseq_plt16_ha_<mode>, pltseq_plt16_lo_<mode>),
(pltseq_mtctr_<mode>): Don't test TARGET_TLS_MARKERS in predicate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268519 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.md