This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: mips tls with -mlong64/-mgp32


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


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