about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sh
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-12-20 18:05:57 +0000
committerJakub Jelinek <jakub@redhat.com>2005-12-20 18:05:57 +0000
commit2bf037b4e8e189e910a41744d79404b94235ab8b (patch)
treeec0234c3f56396c982e3ed5a77780423502a111f /sysdeps/unix/sysv/linux/sh
parent20a911071d1cfaf7d20d088efe9ede27c5809c09 (diff)
downloadglibc-2bf037b4e8e189e910a41744d79404b94235ab8b.tar.gz
glibc-2bf037b4e8e189e910a41744d79404b94235ab8b.tar.xz
glibc-2bf037b4e8e189e910a41744d79404b94235ab8b.zip
Updated to fedora-glibc-20051220T1751 cvs/fedora-glibc-2_3_90-21
Diffstat (limited to 'sysdeps/unix/sysv/linux/sh')
-rw-r--r--sysdeps/unix/sysv/linux/sh/sysdep.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.h b/sysdeps/unix/sysv/linux/sh/sysdep.h
index d56ec454f9..1a412e53db 100644
--- a/sysdeps/unix/sysv/linux/sh/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sh/sysdep.h
@@ -1,5 +1,5 @@
-/* Copyright (C) 1992,1993,1995,1996,1997,1998,1999,2000,2002,2003,2004
-	Free Software Foundation, Inc.
+/* Copyright (C) 1992,1993,1995,1996,1997,1998,1999,2000,2002,2003,2004,
+   2005	Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>, August 1995.
    Changed by Kaz Kojima, <kkojima@rr.iij4u.or.jp>.
@@ -24,6 +24,7 @@
 
 /* There is some commonality.  */
 #include <sysdeps/unix/sh/sysdep.h>
+#include <tls.h>
 
 /* For Linux we can use the system call table in the header file
 	/usr/include/asm/unistd.h
@@ -104,7 +105,7 @@
 	mova 0f,r0; \
 	add r0,r12; \
 	mov.l 1f,r0; \
-	mov.l r1,@(r0,r12)
+	mov.l r1,@(r0,r12); \
 	bra .Lpseudo_end; \
 	 mov _IMM1,r0; \
 	.align 2; \
@@ -359,4 +360,21 @@
 
 #endif	/* __ASSEMBLER__ */
 
+/* Pointer mangling support.  */
+#if defined NOT_IN_libc && defined IS_IN_rtld
+/* We cannot use the thread descriptor because in ld.so we use setjmp
+   earlier than the descriptor is initialized.  Using a global variable
+   is too complicated here since we have no PC-relative addressing mode.  */
+#else
+# ifdef __ASSEMBLER__
+#  define PTR_MANGLE(reg) \
+     stc gbr,r1; mov.l @(POINTER_GUARD,r1),r1; xor r1,reg
+#  define PTR_DEMANGLE(reg)	PTR_MANGLE (reg)
+# else
+#  define PTR_MANGLE(var) \
+     (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
+#  define PTR_DEMANGLE(var)	PTR_MANGLE (var)
+# endif
+#endif
+
 #endif /* linux/sh/sysdep.h */