[LLVMdev] Handling of thread_local globals by llc -march=cpp

o.j.sivart at gmail.com o.j.sivart at gmail.com
Thu May 13 07:35:35 PDT 2010


I note also that this is not a currently unsupported target case where an error should/could/would be produced on attempting to emit code with thread local references. I say this because clang is able to compile both c source with __thread on a global and bc containing a @variable = thread_local global ... and a function that references the thread local global variable to both assembly and machine code that has segment register offset addressing.

On 13/05/2010, at 9:26 PM, o.j.sivart at gmail.com wrote:

> target triple = "i386-pc-linux-gnu"
> 
> On 13/05/2010, at 9:25 PM, Anton Korobeynikov wrote:
> 
>>> int (*FP)() = (int (*)())FPtr;
>>> int res = FP();
>>> 
>>> when the function executes correctly in the case of instead having created a standard global variable.
>> What is the platform you're running the code on?
>> 
>> -- 
>> With best regards, Anton Korobeynikov
>> Faculty of Mathematics and Mechanics, Saint Petersburg State University
> 





More information about the llvm-dev mailing list