Fix 64-bit Solaris 2/x86 IE TLS code sequence (PR target/43309)

Uros Bizjak ubizjak@gmail.com
Mon Dec 20 17:25:00 GMT 2010


On Mon, Dec 20, 2010 at 1:02 PM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> I've finally managed to fix PR target/43309, where Sun ld cannot handle
> the 64-bit TLS IE code sequence emitted by gcc.
>
> The issue was discussed within the original patch submission
>
>        PATCH: Fix 64-bit Solaris 2/x86 IE TLS code sequence
>        http://gcc.gnu.org/ml/gcc-patches/2010-02/msg00993.html
>
> and the PR.
>
> While the Solaris linker maintainers have meanwhile agreed that their
> literal interpretation of the AMD64 TLS IE code sequence is too strict
> and intend to relax that to accomodate the code GCC emits, for the time
> being it is still necessary to work around the issue in GCC as below.
>
> Bootstrapped on i386-pc-solaris2.11 with Sun as and ld without
> regressions, fixing all outstanding TLS IE testsuite failures.
>
> Ok for mainline now and 4.4/4.5 backports (slightly modified since they
> lack define_c_enum) later?
>
> Thanks.
>        Rainer
>
>
> 2010-03-06  Uros Bizjak <ubizjak@gmail.com>
>            Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>
>        PR target/43309
>        * config/i386/i386.c (legitimize_tls_address)
>        <TLS_MODEL_INITIAL_EXEC>: Handle TARGET_64BIT && TARGET_SUN_TLS.
>        * config/i386/i386.md (UNSPEC_TLS_IE_SUN): Declare.
>        (*tls_initial_exec_64_sun): New pattern.
>        (tls_initial_exec_64_sun): New expander.

This can be handled without expander, by declaring named pattern only.

Uros.



More information about the Gcc-patches mailing list