ColdFire and Thread-Local Storage
Sebastian Huber
sebastian.huber@embedded-brains.de
Thu Jan 30 10:43:00 GMT 2014
Hello Norbert,
thanks for the warning.
On 2014-01-29 20:50, Norbert Lange wrote:
> its been some time since I looked at the TLS conventions and I only done this
> on ARM.
> But I would strongly advise you to implement the function in asm, on ARM you
> arent allowed to change any register except the one you return and I would bet
> its the same on other architectures.
Yes, this is true for ARM, here __aeabi_read_tp() can clobber only r0. On m68k
the situation is different:
https://lists.debian.org/debian-68k/2007/11/msg00071.html
"This TLS ABI defines a function __m68k_read_tp, provided by libc.
This returns the thread pointer in register a0 (not d0) and may
clobber other call-clobbered registers. The compiler will generate
calls to this function for the initial exec and local exec models."
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschÀftliche Mitteilung im Sinne des EHUG.
More information about the Gcc-help
mailing list