From 7d0bcd10a7e3455697985522580267c8470cfcb9 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 20 Dec 2005 10:50:52 +0000 Subject: Updated to fedora-glibc-20051220T1028 --- nptl/sysdeps/powerpc/tls.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'nptl/sysdeps/powerpc/tls.h') diff --git a/nptl/sysdeps/powerpc/tls.h b/nptl/sysdeps/powerpc/tls.h index b2322b09bd..976a271362 100644 --- a/nptl/sysdeps/powerpc/tls.h +++ b/nptl/sysdeps/powerpc/tls.h @@ -66,9 +66,11 @@ typedef union dtv # include /* The stack_guard is accessed directly by GCC -fstack-protector code, - so it is a part of public ABI. The dtv field is private. */ + so it is a part of public ABI. The dtv and pointer_guard fields + are private. */ typedef struct { + uintptr_t pointer_guard; uintptr_t stack_guard; dtv_t *dtv; } tcbhead_t; @@ -166,6 +168,17 @@ register void *__thread_register __asm__ ("r13"); = ((tcbhead_t *) ((char *) __thread_register \ - TLS_TCB_OFFSET))[-1].stack_guard) +/* Set the stack guard field in TCB head. */ +# define THREAD_GET_POINTER_GUARD() \ + (((tcbhead_t *) ((char *) __thread_register \ + - TLS_TCB_OFFSET))[-1].pointer_guard) +# define THREAD_SET_POINTER_GUARD(value) \ + (THREAD_GET_POINTER_GUARD () = (value)) +# define THREAD_COPY_POINTER_GUARD(descr) \ + (((tcbhead_t *) ((char *) (descr) \ + + TLS_PRE_TCB_SIZE))[-1].pointer_guard \ + = THREAD_GET_POINTER_GUARD()) + /* l_tls_offset == 0 is perfectly valid on PPC, so we have to use some different value to mean unset l_tls_offset. */ # define NO_TLS_OFFSET -1 -- cgit v1.2.3