RE: TLS support on ARM

2009-12-03 Thread Thomas Klein
Hello > > But is this true? > It is true because a typical implementation of this function has no > need to clobber registers. For instance, glibc's calls a kernel > helper this way: Ah. now I understand, you require to have a virtual memory system (or similar) that is translating the call in

Re: TLS support on ARM

2009-12-03 Thread Daniel Jacobowitz
On Thu, Dec 03, 2009 at 05:09:38PM +, Thomas Klein wrote: > This might be the initial plan. > But is this true? It is true because a typical implementation of this function has no need to clobber registers. For instance, glibc's calls a kernel helper this way: 0x00015810 <__aeabi_read_tp+0>:

RE: TLS support on ARM

2009-12-03 Thread Thomas Klein
Hello > > Dose anyone know the reason why they are not clobbered? > > So that they don't have to be saved. This function is supposed to be > very fast. If you want to use a slow implementation, write an > assembly wrapper which saves additional registers. This might be the initial plan. But is

Re: TLS support on ARM

2009-12-03 Thread Daniel Jacobowitz
On Thu, Dec 03, 2009 at 02:28:36PM +, Thomas Klein wrote: > Dose anyone know the reason why they are not clobbered? So that they don't have to be saved. This function is supposed to be very fast. If you want to use a slow implementation, write an assembly wrapper which saves additional regis

TLS support on ARM

2009-12-03 Thread Thomas Klein
Hello To me it looks like, that support for Thread Local Storage exists on ARM cpu's. When needed the compiler is going to fetch the base pointer by a internal __builtin_thread_pointer() call. This is either a call to __aeabi_read_tp() or a Coprocessor fetch instruction. If I'm going to impl