[RS6000] PC-relative TLS support
Supporting TLS for -mpcrel turns out to be relatively simple. The existing TLSGD and TLSLD unspecs happily can have their GOT pointer reg element replaced with zero, refelecting the fact that optimisation of calls to __tls_get_addr when pc-rel won't use the GOT pointer. Some other insns also can be reused, and just a few added. * config/rs6000/predicates.md (unspec_tls): Allow const0_rtx for got element of unspec vec. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Support PC-relative TLS. * config/rs6000/rs6000.md (UNSPEC_TLSTLS_PCREL): New unspec. (tls_gd_pcrel, tls_ld_pcrel): New insns. (tls_dtprel, tls_tprel): Set attr prefixed when tls_size is not 16. (tls_got_tprel_pcrel, tls_tls_pcrel): New insns. From-SVN: r278076
Showing
Please
register
or
sign in
to comment