[PATCH] PPC64 eanble --with-tls M2
Jakub Jelinek
jakub@redhat.com
Tue Feb 25 15:25:00 GMT 2003
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
More information about the Libc-alpha
mailing list