This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: ColdFire and Thread-Local Storage


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.


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