This is the mail archive of the glibc-cvs@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]

Community source repository for glibc add-on ports branch, master, updated. glibc-2.15-56-g15be932


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Community source repository for glibc add-on ports".

The branch, master has been updated
       via  15be932dfc8d227474006f268deb4592555359ac (commit)
       via  4c85d632e4f9782a2abf0d99cb159c960adcba1d (commit)
      from  7865d19cf68bcfb32c12fa3e7ce6a85fb4738383 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc-ports.git;a=commitdiff;h=15be932dfc8d227474006f268deb4592555359ac

commit 15be932dfc8d227474006f268deb4592555359ac
Author: Richard Henderson <rth@twiddle.net>
Date:   Wed Feb 15 12:19:03 2012 -0800

    alpha: Don't check USE___THREAD in __syscall_error.

diff --git a/ChangeLog.alpha b/ChangeLog.alpha
index 08d2c31..7fc6f07 100644
--- a/ChangeLog.alpha
+++ b/ChangeLog.alpha
@@ -1,5 +1,10 @@
 2012-02-15  Richard Henderson  <rth@twiddle.net>
 
+	* sysdeps/unix/alpha/sysdeps.S: Don't check __ELF__, USE___THREAD,
+	or _LIBC_REENTRANT.
+
+2012-02-15  Richard Henderson  <rth@twiddle.net>
+
 	[BZ #13361]
 	* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (struct file_handle): New.
 	(fallocate, name_to_handle_at, open_by_handle_at): Declare.
diff --git a/sysdeps/unix/alpha/sysdep.S b/sysdeps/unix/alpha/sysdep.S
index c67a654..8003fdc 100644
--- a/sysdeps/unix/alpha/sysdep.S
+++ b/sysdeps/unix/alpha/sysdep.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1996, 1998, 2002, 2003, 2004
+/* Copyright (C) 1993, 1996, 1998, 2002, 2003, 2004, 2012
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Brendan Kehoe (brendan@zen.org).
@@ -21,7 +21,7 @@
 #include <sysdep.h>
 #include <features.h>
 
-#if defined(__ELF__) && defined(PIC)
+#if defined(PIC)
 	/* Put this at the end of libc's text segment so that all of
 	   the direct branches from the syscalls are forward, and 
 	   thus predicted not taken.  */
@@ -30,106 +30,38 @@
 	.text
 #endif
 
-#ifdef PIC
-	/* When building a shared library, we branch here without
-	   having loaded the GP.  Nor, since it was a direct branch,
-	   have we loaded PV with our address.  Do both.  */
-# define LOADGP		br pv, 1f; 1: ldgp gp, 0(pv)
-# define PROLOGUE	.prologue 0
-# define EPILOGUE
+#ifndef NOT_IN_libc
+# define SYSCALL_ERROR_ERRNO __libc_errno
 #else
-	/* When building the static library, we tail call here from
-	   elsewhere, which might use a different GP.  The entertaining
-	   part is that we have to return with the GP of our caller
-	   in place, so that linker relaxation works properly.  */
-	/* ??? This is so ugly.  Consider always putting the errno
-	   setting code with the syscall in the static case.  */
-# define GPSAVEREG	t10
-# define LOADGP		ldah	t11, 0(pv) !gpdisp!1;		\
-			br	1f;				\
-			.subsection 2;				\
-			1: mov	gp, GPSAVEREG;			\
-			lda	gp, 0(t11) !gpdisp!1;		\
-			br	2f;				\
-			.previous;				\
-			mov	gp, GPSAVEREG;			\
-			2:
-# define PROLOGUE	.prologue 1
-# define EPILOGUE	mov	GPSAVEREG, gp
+# define SYSCALL_ERROR_ERRNO errno
 #endif
 
 	.align 4
-	.globl __syscall_error
-	.ent __syscall_error
+	.globl	__syscall_error
+	.ent	__syscall_error
 __syscall_error:
+	/* When building a shared library, we branch here without having
+	   loaded the GP.  Nor, since it was a direct branch, have we
+	   loaded PV with our address.
 
-#if defined(_LIBC_REENTRANT) && USE___THREAD
-
-#ifndef NOT_IN_libc
-# define SYSCALL_ERROR_ERRNO __libc_errno
-#else
-# define SYSCALL_ERROR_ERRNO errno
-#endif
+	   When building a static library, we tail call here from another
+	   object file, possibly with a different GP, and must return with
+	   the GP of our caller in place so that linker relaxation works.
 
-	LOADGP
-	PROLOGUE
+	   Both issues are solved by computing the GP into T1 instead of
+	   clobbering the traditional GP register.  */
+	.prologue 0
 	mov	v0, t0
+	br	t1, 1f
+1:	ldah	t1, 0(t1) !gpdisp!1
 	call_pal PAL_rduniq
-	ldq	t1, SYSCALL_ERROR_ERRNO(gp) !gottprel
-	addq	v0, t1, v0
-	stl	t0, 0(v0)
-	lda	v0, -1
-	EPILOGUE
-	ret
-
-#elif defined(_LIBC_REENTRANT)
-
-	LOADGP
-	lda	sp, -32(sp)
-	.frame	sp, 32, ra, 0
-	stq	ra, 0(sp)
-	stq	v0, 8(sp)
-#ifdef GPSAVEREG
-	stq	GPSAVEREG, 16(sp)
-#endif
-	.mask	0x4000001, -32
-	PROLOGUE
 
-	/* Find our per-thread errno address  */
-#if defined PIC && !defined IS_IN_librt
-	bsr	ra, __errno_location	!samegp
-#else
-	jsr	ra, __errno_location
-#ifndef GPSAVEREG
-	ldgp	gp, 0(ra)
-#endif
-#endif
-
-	/* Store the error value.  */
-	ldq	t0, 8(sp)
-	stl	t0, 0(v0)
-
-	/* And kick back a -1.  */
-	ldi	v0, -1
-
-#ifdef GPSAVEREG
-	ldq	GPSAVEREG, 16(sp)
-#endif
-	ldq	ra, 0(sp)
-	lda	sp, 32(sp)
-	EPILOGUE
-	ret
-
-#else
-
-	LOADGP
-	PROLOGUE
-	stl	v0, errno
+	lda	t1, 0(t1) !gpdisp!1
+	ldq	t1, SYSCALL_ERROR_ERRNO(t1) !gottprel
+	addq	v0, t1, t1
 	lda	v0, -1
-	EPILOGUE
-	ret
 
-#endif
+	stl	t0, 0(t1)
+	ret
 
-	.subsection 3
 	.end __syscall_error

http://sources.redhat.com/git/gitweb.cgi?p=glibc-ports.git;a=commitdiff;h=4c85d632e4f9782a2abf0d99cb159c960adcba1d

commit 4c85d632e4f9782a2abf0d99cb159c960adcba1d
Author: Richard Henderson <rth@twiddle.net>
Date:   Wed Feb 15 12:16:31 2012 -0800

    BZ #13361
    alpha: More Linux additions copied from generic/bits/fcntl.h.

diff --git a/ChangeLog.alpha b/ChangeLog.alpha
index a5271de..08d2c31 100644
--- a/ChangeLog.alpha
+++ b/ChangeLog.alpha
@@ -1,3 +1,9 @@
+2012-02-15  Richard Henderson  <rth@twiddle.net>
+
+	[BZ #13361]
+	* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (struct file_handle): New.
+	(fallocate, name_to_handle_at, open_by_handle_at): Declare.
+
 2012-02-14  Joseph Myers  <joseph@codesourcery.com>
 	    Tom de Vries  <tom@codesourcery.com>
 
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
index e5e726b..d1cebfa 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h
@@ -1,5 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux.
-   Copyright (C) 1995-2000,2004,2005,2006,2007,2010 Free Software Foundation, Inc.
+   Copyright (C) 1995-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -223,6 +223,18 @@ struct f_owner_ex
 					   we splice from/to).  */
 # define SPLICE_F_MORE		4	/* Expect more data.  */
 # define SPLICE_F_GIFT		8	/* Pages passed in are a gift.  */
+
+/* File handle structure.  */
+struct file_handle
+{
+  unsigned int handle_bytes;
+  int handle_type;
+  /* File identifier.  */
+  unsigned char f_handle[0];
+};
+
+/* Maximum handle size (for now).  */
+# define MAX_HANDLE_SZ	128
 #endif
 
 __BEGIN_DECLS
@@ -252,6 +264,38 @@ extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
 extern ssize_t tee (int __fdin, int __fdout, size_t __len,
 		    unsigned int __flags);
 
+/* Reserve storage for the data of the file associated with FD.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+# ifndef __USE_FILE_OFFSET64
+extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
+# else
+#  ifdef __REDIRECT
+extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset,
+				   __off64_t __len),
+		       fallocate64);
+#  else
+#   define fallocate fallocate64
+#  endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
+			__off64_t __len);
+# endif
+
+/* Map file name to file handle.  */
+extern int name_to_handle_at (int __dfd, const char *__name,
+			      struct file_handle *__handle, int *__mnt_id,
+			      int __flags) __THROW;
+
+/* Open file using the file handle.
+
+   This function is a possible cancellation point and therefore not
+   marked with __THROW.  */
+extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
+			      int __flags);
+
 #endif
 
 __END_DECLS

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog.alpha                            |   11 +++
 sysdeps/unix/alpha/sysdep.S                |  114 ++++++----------------------
 sysdeps/unix/sysv/linux/alpha/bits/fcntl.h |   46 +++++++++++-
 3 files changed, 79 insertions(+), 92 deletions(-)


hooks/post-receive
-- 
Community source repository for glibc add-on ports


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