about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-12-28 09:27:26 +0000
committerUlrich Drepper <drepper@redhat.com>2002-12-28 09:27:26 +0000
commit131fd126cddad8379741597892cdfcd5cab3a49f (patch)
treeae4e3dc6182f230ae952cd95fecb2ee20948387b /sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
parentca78735936e87a2b72c553636e815bd555c4ef7e (diff)
downloadglibc-131fd126cddad8379741597892cdfcd5cab3a49f.tar.gz
glibc-131fd126cddad8379741597892cdfcd5cab3a49f.tar.xz
glibc-131fd126cddad8379741597892cdfcd5cab3a49f.zip
Update.
2002-12-28  Ulrich Drepper  <drepper@redhat.com>

	* descr.h (struct pthread): Move header.data.list to the back of the
	struct.
	* sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
	(MULTIPLE_THREADS_OFFSET): Adjust offset.
	(SYSINFO_OFFSEET): Likewise.

2002-12-27  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
	Define.
	(DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
	* sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
	DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
	(USE_DL_SYSINFO): Undef.

2002-12-22  Jakub Jelinek  <jakub@redhat.com>

	* Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
	$(common-objpfx)libc.so.
	* tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
	it is bigger than pipe buffer size even on arches with bigger
	page size.
	(tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h')
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h50
1 files changed, 32 insertions, 18 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
index 10b764712b..a64da1a223 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h
@@ -31,11 +31,7 @@
 
 #ifdef __ASSEMBLER__
 
-#ifdef DONT_LOAD_G1
-# define LOADSYSCALL(x)
-#else
-# define LOADSYSCALL(x) mov __NR_##x, %g1
-#endif
+#define LOADSYSCALL(x) mov __NR_##x, %g1
 
 /* Linux/SPARC uses a different trap number */
 #undef PSEUDO
@@ -47,6 +43,21 @@
 	C_LABEL(name);							\
 	.type name,@function;
 
+#ifdef LINKER_HANDLES_R_SPARC_WDISP22
+/* Unfortunately, we cannot do this yet.  Linker doesn't seem to
+   handle R_SPARC_WDISP22 against non-STB_LOCAL symbols properly .  */
+# define SYSCALL_ERROR_HANDLER_ENTRY(handler)				\
+	.section .gnu.linkonce.t.handler,"ax",@progbits;		\
+	.globl handler;							\
+	.hidden handler;						\
+	.type handler,@function;					\
+handler:
+#else
+# define SYSCALL_ERROR_HANDLER_ENTRY(handler)				\
+	.subsection 3;							\
+handler:
+#endif
+
 #if RTLD_PRIVATE_ERRNO
 # define SYSCALL_ERROR_HANDLER						\
 	.section .gnu.linkonce.t.__sparc64.get_pic.l7,"ax",@progbits;	\
@@ -57,6 +68,7 @@ __sparc64.get_pic.l7:							\
 	retl;								\
 	 add	%o7, %l7, %l7;						\
 	.previous;							\
+SYSCALL_ERROR_HANDLER_ENTRY(__syscall_error_handler)			\
 	save	%sp, -192, %sp;						\
 	sethi	%hi(_GLOBAL_OFFSET_TABLE_-4), %l7;			\
 	call	__sparc64.get_pic.l7;					\
@@ -64,17 +76,20 @@ __sparc64.get_pic.l7:							\
 	ldx	[%l7 + errno], %l0;					\
 	st	%i0, [%l0];						\
 	jmpl	%i7+8, %g0;						\
-	 restore %g0, -1, %o0;
+	 restore %g0, -1, %o0;						\
+	.previous;
 #else
-# define SYSCALL_ERROR_HANDLER					\
-	.global __errno_location;				\
-	.type   __errno_location,@function;			\
-	save	%sp, -192, %sp;					\
-	call	__errno_location;				\
-	 nop;							\
-	st	%i0, [%o0];					\
-	jmpl	%i7+8, %g0;					\
-	 restore %g0, -1, %o0;
+# define SYSCALL_ERROR_HANDLER						\
+SYSCALL_ERROR_HANDLER_ENTRY(__syscall_error_handler)			\
+	.global __errno_location;					\
+	.type   __errno_location,@function;				\
+	save	%sp, -192, %sp;						\
+	call	__errno_location;					\
+	 nop;								\
+	st	%i0, [%o0];						\
+	jmpl	%i7+8, %g0;						\
+	 restore %g0, -1, %o0;						\
+	.previous;
 #endif
 
 #define PSEUDO(name, syscall_name, args)				\
@@ -82,10 +97,9 @@ __sparc64.get_pic.l7:							\
 	ENTRY(name);							\
 	LOADSYSCALL(syscall_name);					\
 	ta	0x6d;							\
-	bcc,pt	%xcc, 1f;						\
+	bcs,pn	%xcc, __syscall_error_handler;				\
 	 nop;								\
-	SYSCALL_ERROR_HANDLER;						\
-1:
+	SYSCALL_ERROR_HANDLER
 
 #undef PSEUDO_END
 #define PSEUDO_END(name)						\