[mips-tls] A couple of potential changes to the MIPS TLS ABI
Maciej W. Rozycki
macro at mips.com
Wed Feb 9 18:32:36 UTC 2005
On Wed, 9 Feb 2005, Daniel Jacobowitz wrote:
> > As part of our own experiments Maciej implemented a "fast path" rdhwr
> > emulation, which he promises he will post to this list today. It has a
> > typical emulation time of between 30 and 60 cycles, depending on the
> > CPU, and assuming a fixed destination register for rdhwr (e.g. only
> > rdhwr $2,$5). Not too bad, but not brilliant either if thread pointer
> > access time turns out to be critical to the performance of some
> > threaded applications.
>
> Can you compare this to the normal cost of an emulated instruction?
For the 24Kf processor the cost of doing a normal emulation is about 550%
of that of my fast path. For the 4Kc one it's 1975%...
> I'm not sure if I've posted the rdhwr emulation patch anywhere; I know
> Ralf has a copy. I'm not thrilled about hardcoding the target
> register but if that's what ya gotta do...
You can have a fast path for the dedicated target register and normal
emulation for the others to keep the semantics consistent. The cost rise
from doing a computed goto to emulate a write to an arbitrary target
register is about 25%, i.e. the total cost is about 125% of the original.
Maciej
More information about the mips-tls
mailing list