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

jyong at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-11-30
     Ever confirmed|0                           |1

--- Comment #14 from jyong at gcc dot gnu.org ---
Doing some simple testcases, looks like generates:

    movl %gs:0, %eax
    movl _a@ntpoff(%eax), %eax

While MSVC does (Intel syntax):
    mov ecx, DWORD PTR __tls_index
    mov eax, DWORD PTR fs:__tls_array
    mov eax, DWORD PTR [eax+ecx*4]
    mov eax, DWORD PTR _a[eax]

For a statement "return a;" where a is a thread local integer.
I'm not sure how to modify the machine definition to emit this.

Reply via email to