This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] PPC64 enable with-tls
On Tue, Feb 25, 2003 at 08:02:02PM +0100, Jakub Jelinek wrote:
> On Tue, Feb 25, 2003 at 09:34:11AM -0800, Richard Henderson wrote:
> > On Mon, Feb 24, 2003 at 10:54:00AM -0600, Steven Munroe wrote:
> > > "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. "
> >
> > Eh? I thought we agreed on 0x7000, so that the thread library itself
> > got 4k worth of quick access.
>
> 0x8000 is what it uses to offset dtv[] pointers as I understand, and
> %r13 + 0x7000 is the TCB.
Yes, dtv pointers have an offset of 0x8000 (*), tp is offset by 0x7000
from the end of the TCB. So r13 - 0x7000 - 16 is the start of the TCB.
(*) Actually, the value stored in dtv has a zero offset because that
disturbs current glibc code the least (eg. freeing the block) and
the offset is added by __tls_get_addr.
--
Alan Modra
IBM OzLabs - Linux Technology Centre