https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121208

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |hjl.tools at gmail dot 
com

--- Comment #10 from H.J. Lu <hjl.tools at gmail dot com> ---
Created attachment 61953
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61953&action=edit
A patch

Here is a patch which uses RBX, instead of RCX:

        movq    80(%rsp), %rbx
        cld
        data16  leaq    bar@tlsgd(%rip), %rdi
        .value  0x6666
        rex64
        call    __tls_get_addr@PLT
        movl    $1, (%rax)
        testq   %rbx, %rbx
        je      .L5

However it isn't a real solution since __tls_get_addr may also clobber XMM
registers.  We should use -mtls-dialect=gnu2 here.

Reply via email to