This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] PPC64 enable with-tls
- From: Steven Munroe <sjmunroe at vnet dot ibm dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, Richard Henderson <rth at twiddle dot net>, libc-alpha at sources dot redhat dot com
- Date: Tue, 25 Feb 2003 13:20:01 -0600
- Subject: Re: [PATCH] PPC64 enable with-tls
- Reply-to: sjmunroe at us dot ibm dot com
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. ;-)