[LLVMdev] [PATCH] Add support for accessing the FS segment register on X86

Dan Gohman gohman at apple.com
Mon May 4 15:16:11 PDT 2009


Hello,

The preferred way to do TLS is to use the thread_local keyword.
There is x86-64 support for thread_local on ELF; if you need
it for other targets, I recommend looking at adapting it.

Dan

On May 4, 2009, at 2:59 PM, Zoltan Varga wrote:

> Hi,
>
>   Here is an updated version of the patch using address space 257.
>
>                 Zoltan
>
> On Mon, May 4, 2009 at 11:36 PM, Shantonu Sen <ssen at apple.com> wrote:
> Maybe 257 would be better (or other unused), because of r70197,  
> which gives special behavior for <256
>
> Shantonu Sen
> ssen at apple.com
>
> Sent from my Mac Pro
>
>
> On May 4, 2009, at 2:28 PM, Zoltan Varga wrote:
>
> Hi,
>
>  The attached patch adds support for accessing the FS segment  
> register using address space 255, similarly to the way the GS  
> segment register can be accessed. This is useful for generating TLS  
> access code on amd64 for example.
>
>              Zoltan
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
> <fs.diff>_______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list