This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] PPC64 enable with-tls
- From: Roland McGrath <roland at redhat dot com>
- To: sjmunroe at vnet dot ibm dot com
- Cc: libc-alpha at sources dot redhat dot com, bergner at vnet dot ibm dot com
- Date: Mon, 24 Feb 2003 13:46:14 -0800
- Subject: Re: [PATCH] PPC64 enable with-tls
Wouldn't it be better to use a global register variable and C arithmetic
for THREAD_SELF? i.e.
register uintptr_t __thread_register asm ("13");
#define THREAD_SELF \
((pthread_descr) (__thread_register + 0x7000 + TLS_TCB_SIZE + TLS_PRE_TCB_SIZE))
Then THREAD_GETMEM(,foo) => THREAD_SELF->foo allows the compiler to combine
the constant register bias and the member offset in one insn.