This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC v2][PATCH 12/27] Add Infinity THREAD_SELF macros to sysdeps/powerpc/nptl/tls.h


This commit adds Infinity THREAD_SELF macros for powerpc.
---
 sysdeps/powerpc/nptl/tls.h |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/sysdeps/powerpc/nptl/tls.h b/sysdeps/powerpc/nptl/tls.h
index 0e889bc..67b8a55 100644
--- a/sysdeps/powerpc/nptl/tls.h
+++ b/sysdeps/powerpc/nptl/tls.h
@@ -177,12 +177,15 @@ register void *__thread_register __asm__ ("r13");
     ((struct pthread *) (__thread_register \
 			 - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE))
 
+/* Magic for Infinity to know how to do THREAD_SELF.  */
+# define I8_THREAD_SELF I8_TS_REGISTER
+# define I8_TS_REG_OFFSET PT_THREAD_POINTER * sizeof (void *)
+# define I8_TS_REG_BIAS -(TLS_TCB_OFFSET + TLS_PRE_TCB_SIZE)
+
 /* Magic for libthread_db to know how to do THREAD_SELF.  */
 # define DB_THREAD_SELF							      \
-  REGISTER (32, 32, PT_THREAD_POINTER * 4,				      \
-	    - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)			      \
-  REGISTER (64, 64, PT_THREAD_POINTER * 8,				      \
-	    - TLS_TCB_OFFSET - TLS_PRE_TCB_SIZE)
+  REGISTER (32, 32, PT_THREAD_POINTER * 4, I8_TS_REG_BIAS)		      \
+  REGISTER (64, 64, PT_THREAD_POINTER * 8, I8_TS_REG_BIAS)
 
 /* Read member of the thread descriptor directly.  */
 # define THREAD_GETMEM(descr, member) ((void)(descr), (THREAD_SELF)->member)
-- 
1.7.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]