This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH/RFA] SH TLS support
- From: Joern Rennecke <amylaar at onetel dot net dot uk>
- To: rth at redhat dot com (Richard Henderson)
- Cc: kkojima at rr dot iij4u dot or dot jp (kaz Kojima), gcc-patches at gcc dot gnu dot org, aoliva at redhat dot com
- Date: Sat, 22 Feb 2003 16:07:51 +0000 (GMT)
- Subject: Re: [PATCH/RFA] SH TLS support
> Simpler than that. The GOTOFF->TPOFF substitution can be made
> based solely on how X gets bound.
> You don't have to replace the pc-rel load at all, and thus don't
> have to worry about whether it's in range. You just need to be
> able to find the indexed load and nop it out. I.e.
> mov.l .L1, r0 -> mov.l .L1, r0 (unchanged)
> stc gbr, r1 -> stc gbr, r1 (unchanged)
> mov.l @(r0,r12), r0 -> nop
> add r1, r0 -> add r1, r0 (unchanged)
> (constant pool)
> L1: .long x at GOTTPOFF -> .long x at TPOFF
That requires the indexed load to use r0 for its destination.
Removing this requirement is important to give the register allocator
and the scheduler more freedom.