about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-05-03 22:40:52 +0000
committerUlrich Drepper <drepper@redhat.com>2004-05-03 22:40:52 +0000
commit27b0258934adb212b760ead998d51f8005224abc (patch)
tree227015d0044b530f0bdf169f2088f956ef28fcaa /sysdeps
parent4bb8fc33018de0b3519b1069fa87d670f71249dc (diff)
downloadglibc-27b0258934adb212b760ead998d51f8005224abc.tar.gz
glibc-27b0258934adb212b760ead998d51f8005224abc.tar.xz
glibc-27b0258934adb212b760ead998d51f8005224abc.zip
Update.
2004-04-23  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/ia64/fpu/libm_support.h (__libm_error_support): Add
	libc_hidden_proto.  Define to __GI___libm_error_support for
	assembly going into libc.so.
	* sysdeps/ia64/fpu/libc_libm_error.c (__libm_error_support): Add
	libc_hidden_def.

	* include/libc-symbols.h (HIDDEN_BUILTIN_JUMPTARGET): Define.
	* sysdeps/ia64/bcopy.S (bcopy): Use it for jump to memmove.

	* sysdeps/unix/sysv/linux/ia64/sysdep.S (__syscall_error): Access
	gprel errno if RTLD_PRIVATE_ERRNO or __thread __libc_errno/errno
	if USE___THREAD.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/ia64/bcopy.S2
-rw-r--r--sysdeps/ia64/fpu/libc_libm_error.c1
-rw-r--r--sysdeps/ia64/fpu/libm_support.h8
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sysdep.S29
4 files changed, 37 insertions, 3 deletions
diff --git a/sysdeps/ia64/bcopy.S b/sysdeps/ia64/bcopy.S
index a41c21d5a7..bdabf5acdc 100644
--- a/sysdeps/ia64/bcopy.S
+++ b/sysdeps/ia64/bcopy.S
@@ -6,5 +6,5 @@ ENTRY(bcopy)
 	mov in0 = in1
 	;;
 	mov in1 = r8
-	br.cond.sptk.many HIDDEN_JUMPTARGET(memmove)
+	br.cond.sptk.many HIDDEN_BUILTIN_JUMPTARGET(memmove)
 END(bcopy)
diff --git a/sysdeps/ia64/fpu/libc_libm_error.c b/sysdeps/ia64/fpu/libc_libm_error.c
index 83a0bae4df..5a34878d71 100644
--- a/sysdeps/ia64/fpu/libc_libm_error.c
+++ b/sysdeps/ia64/fpu/libc_libm_error.c
@@ -11,3 +11,4 @@ __libm_error_support (void *arg1, void *arg2, void *retval,
 {
   __set_errno (ERANGE);
 }
+libc_hidden_def (__libm_error_support)
diff --git a/sysdeps/ia64/fpu/libm_support.h b/sysdeps/ia64/fpu/libm_support.h
index 68ebddec81..5d3498dfc9 100644
--- a/sysdeps/ia64/fpu/libm_support.h
+++ b/sysdeps/ia64/fpu/libm_support.h
@@ -239,6 +239,7 @@ typedef enum
 } error_types;
 
 void __libm_error_support(void*,void*,void*,error_types);
+libc_hidden_proto(__libm_error_support)
 
 #define BIAS_64  1023
 #define EXPINF_64  2047
@@ -340,6 +341,13 @@ extern _LIB_VERSION_TYPE _LIB_VERSION;
 // This is a run-time variable and may effect
 // floating point behavior of the libm functions
 
+#elif defined _LIBC
+
+# if !defined NOT_IN_libc && defined SHARED && defined DO_VERSIONING \
+     && !defined HAVE_BROKEN_ALIAS_ATTRIBUTE && !defined NO_HIDDEN
+#  define __libm_error_support  __GI___libm_error_support
+# endif
+
 #endif	/* __ASSEMBLER__ */
 
 /* Support for compatible assembler handling.  */
diff --git a/sysdeps/unix/sysv/linux/ia64/sysdep.S b/sysdeps/unix/sysv/linux/ia64/sysdep.S
index c053c3a053..24780a1692 100644
--- a/sysdeps/unix/sysv/linux/ia64/sysdep.S
+++ b/sysdeps/unix/sysv/linux/ia64/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
 
@@ -19,9 +19,34 @@
 
 #include <sysdep.h>
 #include <features.h>
+#include <tls.h>
 
 ENTRY(__syscall_error)
-#ifdef _LIBC_REENTRANT
+#if RTLD_PRIVATE_ERRNO
+	/*
+	 * Note that the gp has to be set properly for this to work.
+	 * As long as all syscalls are in the same load unit
+	 * (executable or shared library) as this routine, we should
+	 * be fine.  Otherwise, we would have to first load the global
+	 * pointer register from __gp.
+	 */
+	addl	r2=@gprel(errno),gp
+	;;
+	st4	[r2]=r8
+	mov	r8=-1
+#elif defined USE___THREAD
+# ifndef NOT_IN_libc
+#  define SYSCALL_ERROR_ERRNO __libc_errno
+# else
+#  define SYSCALL_ERROR_ERRNO errno
+# endif
+	addl	r2=@ltoff(@tprel(SYSCALL_ERROR_ERRNO)), gp;;
+	ld8	r2=[r2]
+	mov	r3=r8;;
+	mov	r8=-1
+	add	r2=r2,r13;;
+	st4	[r2]=r3
+#elif defined _LIBC_REENTRANT
 	.prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(0)
 	alloc	r33=ar.pfs, 0, 4, 0, 0
 	mov	r32=rp