This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PPC64 enable with-tls


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. ;-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]