PowerPC64 TLS ABI

Richard Henderson rth@twiddle.net
Fri Jan 17 22:11:00 GMT 2003


On Fri, Jan 17, 2003 at 08:03:51PM +1030, Alan Modra wrote:
> I've put a copy of my current PowerPC64 specific TLS ABI at
> ftp://ftp.linuxppc64.org/pub/people/amodra/ppc64tls.txt.gz

I notice that your relaxation is predicated on the instructions
appearing in sequence.  For GD and LD this is no big deal, since
there's a call involved.  But for IE it's probably more important
to allow the ld/add pair to be scheduled independently.

There are several ways you can address this.

  (1) Only relax the GOT_TPREL16_DS to TPREL16 (i.e. don't
      relax if the tprel is outside 64K).

      This is what I do on Alpha, incidentally.

  (2) Special-case checks for the instructions "happening"
      to wind up adjacent (or within some window, but that
      requires you to simulate the intervening insns to 
      make sure you know what's going on).

      I don't like this option because it's dangerous.

  (3) Add an otherwise unused relocation to the use of
      the output of the gottprel insn.  I.e. mark the 
      add or lwzx insn.

I also think you should explicitly list all the relaxation
forms you'll accept.  You listed the immediate forms, but
not the indexed load forms.

The rest of the spec looks pretty good.

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.


r~



More information about the Binutils mailing list