[LLVMdev] LLC Bug x86 with thread local storage
Eric Christopher
echristo at apple.com
Thu Jul 8 00:37:51 PDT 2010
On Jul 7, 2010, at 11:20 AM, Eric Christopher wrote:
>
> On Jul 7, 2010, at 4:52 AM, Patrick Marlier wrote:
>
>> Which one is correct ?
>> - movl $tm_nest_level at TPOFF, %ecx
>> or
>> - movq $tm_nest_level at TPOFF, %rcx
>> or
>> - movl tm_nest_level at TPOFF, %ecx
>>
>
> I believe this is initial exec and so from:
>
> http://people.redhat.com/drepper/tls.pdf
>
> it would be movl tm_nest_level at TPOFF, %ecx
As a correction, I don't know that any of these is correct.
I need to look into this a bit more. I think that it requires the
relocation to be off of a register, i.e.
movabs $foo at tpoff, %rax
add $foo at tpoff, %rax
mov foo at tpoff(%rbx), %eax
are all legal, while:
mov foo at tpoff(%ebx), %eax
call foo at tpoff
mov $foo at tpoff, %eax
mov $foo at tpoff, %ax
mov $foo at tpoff, %al
are all illegal.
So we appear to be lowering something, and trying to make
an illegal move out of it.
Unfortunately we're really short on testcases here. :) I've made
an attempt that works for the current test and passes our set of tests
in:
Sending lib/Target/X86/X86Instr64bit.td
Sending test/CodeGen/X86/x86-64-tls-1.ll
Transmitting file data ..
Committed revision 107860.
Going to need some more testcases soon though if you run into
any more problems :)
-eric
More information about the llvm-dev
mailing list