search for: _tls_index

Displaying 2 results from an estimated 2 matches for "_tls_index".

2011 Dec 04
3
[LLVMdev] Implement implicit TLS on Windows - need advice
...thread local variable ends up in the .tls section - to access a thread local variable, you have to do (1) load pointer to thread local storage from TEB On x86_64, this is gs:0x58, on x86 it is fs:0x2C. (2) load pointer to thread local state. In general, the index is stored in variable _tls_index. For a .exe, _tls_index is always 0. (3) load offset of variable to start of .tls section. (4) the thread local variable can now accessed with the add of step 2 and 3. For x86_64, something like the following should be generated for the tls1.ll test case: (1) mov rdx, qword [gs:ab...
2011 Dec 06
0
[LLVMdev] Implement implicit TLS on Windows - need advice
...ble ends up in the .tls section > - to access a thread local variable, you have to do >  (1) load pointer to thread local storage from TEB >      On x86_64, this is gs:0x58, on x86 it is fs:0x2C. >  (2) load pointer to thread local state. In general, the index is stored in > variable _tls_index. For a .exe, _tls_index is always 0. >  (3) load offset of variable to start of .tls section. >  (4) the thread local variable can now accessed with the add of step 2 and > 3. > > For x86_64, something like the following should be generated for the tls1.ll > test case: > > (...