[PATCH] PPC64 enable with-tls
Steven Munroe
sjmunroe@vnet.ibm.com
Tue Feb 25 19:20:00 GMT 2003
Jakub Jelinek writes:
> 0x8000 is what it uses to offset dtv[] pointers as I understand, and
> %r13 + 0x7000 is the TCB.
Actually: TCB_ptr = %r13 - 0x7000 - sizeof (tcbhead_t)
and: %r13 = TCB_ptr + sizeof (tcbhead_t) + 0x7000
"The PowerPC64 TLS ABI is similar to the Alpha model. The thread-local
storage data structures follow variant I. The TCB, tlsoffset
calculations and definition of __tls_get_addr are identical to Alpha.
R13 is the thread pointer, and points 0x7000 past the end of the thread
control block. Dynamic thread vector pointers point 0x8000 past the
start of each TLS block. This allows the first 64K of each block to be
addressed from a dtv pointer using fewer machine instructions. The tp
offset allows for efficient addressing of the TCB and up to 4K-16 of\
other thread library information."
I guess the "identical to Alpha" is some what exaggerated. ;-)
More information about the Libc-alpha
mailing list