This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] PPC64 eanble --with-tls M2
- From: Jakub Jelinek <jakub at redhat dot com>
- To: sjmunroe at vnet dot ibm dot com
- Cc: libc-alpha at sources dot redhat dot com
- Date: Tue, 25 Feb 2003 16:25:29 +0100
- Subject: Re: [PATCH] PPC64 eanble --with-tls M2
- References: <3E5B8347.26B389D3@us.ibm.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Feb 25, 2003 at 08:52:55AM -0600, Steven Munroe wrote:
> +/* Install new dtv for current thread. */
> +# define INSTALL_NEW_DTV(DTV) \
> + ({ \
> + asm ( \
> + " std %0,-(0x7000+%1)(13)\n" \
> + : \
> + : "b" (DTV), "I" (TLS_TCB_SIZE) \
> + : "memory" ); \
> + })
Why cannot this be written in just C, through __thread_self too?
> +# define TLS_INIT_TP(TCBP, SECONDCALL) \
> + ({ \
> + asm ( \
> + " addi 13,%0,(0x7000+%1)\n" \
> + : : "b" (TCBP), "I" (TLS_TCB_SIZE) ); \
> + NULL; \
> + })
Likewise.
> +/* Return the address of the dtv for the current thread. */
> +# define THREAD_DTV() \
> + ({ dtv_t * __dvtp; \
> + asm ( \
> + " ld %0,-(0x7000+%1)(13)\n" \
> + : "=b" (__dvtp) \
> + : "I" (TLS_TCB_SIZE) ); \
> + (__dvtp); \
> + })
> +
Likewise.
> +# define INIT_THREAD_SELF(DESCR, NR) \
> + ({ \
> + asm ( \
> + " addi 13,%0,(0x7000+%1+%2)\n" \
> + : \
> + : "b" (DESCR), "I" (TLS_TCB_SIZE), "I" (TLS_PRE_TCB_SIZE) ); \
> + })
Likewise.
Jakub