This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: I give up.
ok, that tells me where the code is.
But that still doesnt tell me what any of the 1000s of different functions
that relate to RTL actually DO.
What I need to output is something like this:
mov rega, dword ptr ds:__tls_index
mov regb, dword ptr fs:__tls_array
mov regc, [rega+regb*4]
then to get the address itself (ready to insert into the instruction), you do:
dword ptr ds:var[regc]
rega,regb,regc are registers
var is the address of the thread-local variable relative to the start of
the segment that it resides in (and of course will be modified by the
linker when all the segments are combined)
BTW, pre-calculating the value for regc isnt possible (because __tls_index
can be changed at any time)
I have looked in all the code, all the manuals, all the documentation and
all the resources that turn up on google but I still cant figure out how to
do what I need :(.
I suspect that, since its target specific, someone that knows the i?86
backend is going to need to help me.