This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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: [PATCH 07/26] arm: Introduce and use GET_TLS


On Tue, 26 Feb 2013, Richard Henderson wrote:

> Factor out the sequence needed to call kuser_get_tls,
> as we can't play subtract into pc games in thumb mode.
> ---
> 	* sysdeps/unix/sysv/linux/arm/sysdep.h (GET_TLS): New macro.
> 	* sysdeps/unix/arm/sysdep.S (__syscall_error): Use it.
> 	* sysdeps/unix/sysv/linux/arm/clone.S (__clone): Likewise.
> 	* sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S (SAVE_PID): Likewise.
> 	* sysdeps/unix/sysv/linux/arm/nptl/vfork.S (SAVE_PID): Likewise.
> 	* sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S (__aeabi_read_tp):
> 	Add thumb2 alternative.

OK - although for v6K, v6ZK and v7-A and above, GCC defaults to -mtp=hard, 
so it might make sense as a followup to define this macro to use 
corresponding hard-tp code on such architectures (and for that matter to 
make __aeabi_read_tp use the hard-tp instruction, for running code built 
for an older architecture with libc built for a newer architecture).

(In the hard-tp case you could then avoid the lr save/restore in the users 
of GET_TLS, though you'd need to define another macro to say that GET_TLS 
doesn't clobber lr.)

-- 
Joseph S. Myers
joseph@codesourcery.com


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