This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: mips tls with -mlong64/-mgp32
- From: Daniel Jacobowitz <drow at false dot org>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 10 May 2007 17:24:51 -0400
- Subject: Re: mips tls with -mlong64/-mgp32
- References: <200705102046.l4AKkiB4017813@greed.delorie.com>
On Thu, May 10, 2007 at 04:46:44PM -0400, DJ Delorie wrote:
>
> If TLS pointers are 64 bits but GP registers are 32 bits, the TLS load
> needs to be split. This means we need to support offsetted GOT
> addresses, at least for TLS (perhaps for more, but this is the only
> one that causes a failure in the testsuite - gcc.dg/tls/nonpic.c)
>
> This results in code like this, which the assembler seems to be ok
> with:
>
> lw $3,%tprel_lo(e1+4)($2)
> lw $2,%tprel_lo(e1)($2)
Maybe this is a silly question, but what the heck is going on here?
Pointers are the same size as `long's, or the same size
as integer registers, whichever is smaller.
Shouldn't the tprel offset be pointer-sized then? Doesn't seem much
point in loading a bigger offset than fits in a register.
--
Daniel Jacobowitz
CodeSourcery