[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: TLS support patch
On Thu, Apr 07, 2011 at 04:50:59AM -0700, Matt Thomas wrote:
> On Apr 6, 2011, at 4:30 PM, Joerg Sonnenberger wrote:
> > Hi all,
> > the attached patch allows TLS support on ARM. I won't commit it, since
> > it will make pthread usage inacceptable slow. I hope someone is going to
> > write the magic for __eabi_read_tp and __lwp_getprivate_fast().
> That's __aeabi_read_tp. I've added kernel emulation so that -mtp=hard
> will work even on those CPUs that don't have that register.
> Assuming we just don't have __aeabi_read_tp just to a
> mrc p15, 0, r0, c13, c0, 3
> and take the emulation hit, what mechanism should be used?
__aeabi_read_tp is part of the ABI and the calls get hard-coded. There
is another ARM TLS spec, which seems to depend on a fixed memory
location, but I am not sure if that actually got implemented.
The easiest approach would be to require the kernel page to exist
and use that by default. If the above is faster than using the kernel
page, the __aeabi_read_tp could be provided as DSO loaded on demand.
Having the kernel page as required part of the kernel ABI would allow
implementing the/an alternative ARM ABI using a plain TLS_TP relocation
instead of branching.
Main Index |
Thread Index |