Bug#328183: #328183: no-tls-direct-seg-refs
> will add a very little extra cost to single thread-specific variable
> accesses, but it shouldn't be noticeable at all.
Well, to be correct, switch -mno-tls-direct-seg-refs
add extra cost to ALL thread-specific variables accesses.
For each thread-specific variable access,
compiler have to reserve scratch register and generate sequence like
movl %gs:0, %ecx
movl %eax, C_SYMBOL_NAME(var@NTPOFF)(%ecx)
instead of one instruction
movl %eax, %gs:C_SYMBOL_NAME(var@NTPOFF)
Petr
Reply to: