about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/ia64
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/unix/sysv/linux/ia64
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/unix/sysv/linux/ia64')
-rw-r--r--sysdeps/unix/sysv/linux/ia64/sysdep.S29
1 files changed, 27 insertions, 2 deletions
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