PowerPC64 TLS ABI

Paul Mackerras paulus@samba.org
Sat Jan 18 01:53:00 GMT 2003


Alan Modra writes:

> Yeah, I suppose.  lbzx, lhzx, lwzx, ldx, lhax, lwax, and the update
> forms too.

And the corresponding stores?  In fact I think the instructions are
regular enough that it won't be a big problem, but I'll take a look at
the details if you like.

> > Oh, another question.  Why variant II data structures?
> > I happen to think they're not as conceptually clean as
> > variant I, and there's no reason to adopt them for a 
> > target not trying to be compatible with Sun.
> 
> My original reason for choosing type II was to make use of "the thread
> pointer points to a Thread Control Block of unspecified size and
> content", and actually offset tp from the TCB base in order to
> maximize the useful range of one-instruction tprel addressing.  I then
> decided not to bother with an offset tp.  I suppose there's really no
> reason we couldn't use an offset tp with variant I, and what's more,
> the offset would be the same as for dtv.  ie. r13 - 0x8000 would point
> at TCB.  I like it!

But the linker still needs to know the size of the TCB in this scheme,
no?  Is that potentially a problem?

Paul.



More information about the Binutils mailing list