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]

GNU C Library master sources branch, hjl/x32/master, updated. glibc-2.15-1352-ge472988


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 "GNU C Library master sources".

The branch, hjl/x32/master has been updated
       via  e4729888f51119d8b2ab7c478b9a35e05719f54f (commit)
       via  c57ea9180aa83433594f450fd3c29f2153772ec6 (commit)
       via  3f75d4426990057449aa41e5696e5ee7ac200b66 (commit)
       via  dc7322443eb8806290a6f4b4f5a9dfc3388b9318 (commit)
       via  d9990eacdf5ab4dbb54fef1ba1e3b67c6112ccc7 (commit)
       via  6afa2e2f80e6a47a78f806210e9ee997b73fcfa0 (commit)
       via  6a9a785bd06f5af4896913e994642e20a96351bc (commit)
       via  4594223bd1563f2f40d4d8875769296d12b4e8e1 (commit)
       via  83678f764bfc0b6b7a7427459f383aa55b2a1911 (commit)
       via  a4f6e481247a9af67547a4037c66c046f8c35824 (commit)
       via  f63d5db67c5ac9da31e03e389fa454314ef96a35 (commit)
       via  98a61bcbca89e50a3bdfa92fa851546bccee41e7 (commit)
       via  6226efbda1ee2950d53b830a7aab50cec7421c87 (commit)
       via  b99e4f783c20a35a33efd8b33362fc67b290dc94 (commit)
       via  643e01e6cbbcb37daa53e8020f099c9822615026 (commit)
       via  2554247d83080250693a60f9aca91820af4234e0 (commit)
       via  826dd0abdfe2b8ba1c4b4effb4c61ed4b405ff12 (commit)
       via  bd83aabe5a14f6e741c80b61f8d0d981baeb2e70 (commit)
       via  95770f140bf0c9ecb8ee3a9c00de5248e7e5cc61 (commit)
       via  90820c096d3429c01050f6c21f1b72debb8b76be (commit)
       via  b60067514d1966fac982b5e14380d751c2899fc7 (commit)
       via  3da7605ae8d53356d30db44e917b021bcb1eeb83 (commit)
       via  c67a1e66339df6932cf7405a6664b6014fdadbd3 (commit)
       via  0e44a77e481e18b56ef5bd2354fc97a267487551 (commit)
       via  5e1a27a96de16ad0cd67a81e25741790b32e2c25 (commit)
       via  e5cae07ef29a8c220a209ebca6571a2630fde539 (commit)
       via  5dccc53bda24dcc904f2f1d78dd1e7111c697562 (commit)
       via  46259beccca5f4b3a6c64a1b84b2c09f079eb3ae (commit)
       via  44b20b016c3351fbea02011ccf8126b9549661a3 (commit)
       via  b494194071f36c026cfb6617a8dd7c227d9627b5 (commit)
       via  b78d53e515f2b1fdad096769334ae5d677a7c3fe (commit)
       via  59f0c22ed2b131cac16446d6bcc3d5da1d09e120 (commit)
       via  c5b3a2c05b407197fe56d229542eeeba1f710908 (commit)
       via  26bdda2ca114ed886dc8c0d04a13642dfc64f303 (commit)
       via  c7731fea2ba8ba903ef7a3f9738ed36c749ac143 (commit)
       via  b857321df5b1162dfb573d2b77268d2596d370ac (commit)
       via  bbb3154bc9610e8ced4efd23e8bd052d55f19c2f (commit)
      from  bd9ca8e817db02559fceaca867c5c29fe92e96a6 (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.git;a=commitdiff;h=e4729888f51119d8b2ab7c478b9a35e05719f54f

commit e4729888f51119d8b2ab7c478b9a35e05719f54f
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 22 12:47:34 2012 -0700

    Remove trailing whitespaces

diff --git a/sysdeps/unix/sysv/linux/sysctl.mk b/sysdeps/unix/sysv/linux/sysctl.mk
index e8f2a83..ac407a6 100644
--- a/sysdeps/unix/sysv/linux/sysctl.mk
+++ b/sysdeps/unix/sysv/linux/sysctl.mk
@@ -1,3 +1,3 @@
 ifeq ($(subdir),misc)
-sysctl = sysctl 
+sysctl = sysctl
 endif
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/sysctl.mk b/sysdeps/unix/sysv/linux/x86_64/x32/sysctl.mk
index 9f640be..e939081 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/sysctl.mk
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/sysctl.mk
@@ -1,4 +1,4 @@
 # X32 doesn't support sysctl.
 ifeq ($(subdir),misc)
-sysctl = 
+sysctl =
 endif

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c57ea9180aa83433594f450fd3c29f2153772ec6

commit c57ea9180aa83433594f450fd3c29f2153772ec6
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 22 12:46:33 2012 -0700

    Remove trailing whitespaces

diff --git a/ChangeLog.x32 b/ChangeLog.x32
index 7d90de2..5cd5025 100644
--- a/ChangeLog.x32
+++ b/ChangeLog.x32
@@ -28,12 +28,12 @@
 
 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
 
-	* sysdeps/unix/sysv/linux/x86_64/sysdep.h 
+	* sysdeps/unix/sysv/linux/x86_64/sysdep.h
 	(LOAD_REGS_TYPES_[1-6]): Add types.
 
 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
 
-	* sysdeps/unix/sysv/linux/x86_64/sysdep.h 
+	* sysdeps/unix/sysv/linux/x86_64/sysdep.h
 	(LOAD_ARGS_TYPE_[1-6]): Renamed to ...
 	(LOAD_ARGS_TYPES_[1-6]): This.
 	(LOAD_REGS_TYPE_[1-6]): Renamed to ...
@@ -60,7 +60,7 @@
 
 2012-05-21  H.J. Lu  <hongjiu.lu@intel.com>
 
-	* sysdeps/unix/sysv/linux/x86_64/sysdep.h (LOAD_ARG1_TYPE): 
+	* sysdeps/unix/sysv/linux/x86_64/sysdep.h (LOAD_ARG1_TYPE):
 	Removed.
 	(LOAD_ARG2_TYPE): Likewise.
 	(LOAD_ARG3_TYPE): Likewise.

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3f75d4426990057449aa41e5696e5ee7ac200b66

commit 3f75d4426990057449aa41e5696e5ee7ac200b66
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 22 12:34:33 2012 -0700

    Add sysctl.mk and x86_64/sys/sysctl.h

diff --git a/ChangeLog.x32 b/ChangeLog.x32
index 59ebccf..7d90de2 100644
--- a/ChangeLog.x32
+++ b/ChangeLog.x32
@@ -1,5 +1,17 @@
 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* sysdeps/unix/sysv/linux/Makefile: Include
+	$(firstword $(wildcard $(sysdirs:=/sysctl.mk))).
+	(sysdep_routines): Replace sysctl with $(sysctl).
+
+	* sysdeps/unix/sysv/linux/sysctl.mk: New file.
+	* sysdeps/unix/sysv/linux/x86_64/sys/sysctl.h: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/x32/sysctl.mk: Likewise.
+
+	* sysdeps/unix/sysv/linux/x86_64/x32/sysctl.c: Removed.
+
+2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* sysdeps/unix/sysv/linux/x86_64/x32/arch_prctl.c (__arch_prctl):
 	Updated.
 
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 120d544..1011509 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -17,7 +17,9 @@ sysdep_routines += internal_accept4 recvmmsg internal_recvmmsg sendmmsg \
 endif
 
 ifeq ($(subdir),misc)
-sysdep_routines += sysctl clone llseek umount umount2 readahead \
+include $(firstword $(wildcard $(sysdirs:=/sysctl.mk)))
+
+sysdep_routines += $(sysctl) clone llseek umount umount2 readahead \
 		   setfsuid setfsgid makedev epoll_pwait signalfd \
 		   eventfd eventfd_read eventfd_write prlimit
 
diff --git a/sysdeps/unix/sysv/linux/sysctl.mk b/sysdeps/unix/sysv/linux/sysctl.mk
new file mode 100644
index 0000000..e8f2a83
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sysctl.mk
@@ -0,0 +1,3 @@
+ifeq ($(subdir),misc)
+sysctl = sysctl 
+endif
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/sysctl.h b/sysdeps/unix/sysv/linux/x86_64/sys/sysctl.h
new file mode 100644
index 0000000..c488d99
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86_64/sys/sysctl.h
@@ -0,0 +1,75 @@
+/* Copyright (C) 1996-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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#ifndef	_SYS_SYSCTL_H
+#define	_SYS_SYSCTL_H	1
+
+#if defined __x86_64__ && defined __ILP32__
+# error "sysctl system call is unsupported in x32 kernel"
+#endif
+
+#include <features.h>
+#define __need_size_t
+#include <stddef.h>
+/* Prevent more kernel headers than necessary to be included.  */
+#ifndef _LINUX_KERNEL_H
+# define _LINUX_KERNEL_H	1
+# define __undef_LINUX_KERNEL_H
+#endif
+#ifndef _LINUX_TYPES_H
+# define _LINUX_TYPES_H		1
+# define __undef_LINUX_TYPES_H
+#endif
+#ifndef _LINUX_LIST_H
+# define _LINUX_LIST_H		1
+# define __undef_LINUX_LIST_H
+#endif
+#ifndef __LINUX_COMPILER_H
+# define __LINUX_COMPILER_H	1
+# define __user
+# define __undef__LINUX_COMPILER_H
+#endif
+
+#include <linux/sysctl.h>
+
+#ifdef __undef_LINUX_KERNEL_H
+# undef _LINUX_KERNEL_H
+# undef __undef_LINUX_KERNEL_H
+#endif
+#ifdef __undef_LINUX_TYPES_H
+# undef _LINUX_TYPES_H
+# undef __undef_LINUX_TYPES_H
+#endif
+#ifdef __undef_LINUX_LIST_H
+# undef _LINUX_LIST_H
+# undef __undef_LINUX_LIST_H
+#endif
+#ifdef __undef__LINUX_COMPILER_H
+# undef __LINUX_COMPILER_H
+# undef __user
+# undef __undef__LINUX_COMPILER_H
+#endif
+
+__BEGIN_DECLS
+
+/* Read or write system parameters.  */
+extern int sysctl (int *__name, int __nlen, void *__oldval,
+		   size_t *__oldlenp, void *__newval, size_t __newlen) __THROW;
+
+__END_DECLS
+
+#endif	/* _SYS_SYSCTL_H */
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/sysctl.c b/sysdeps/unix/sysv/linux/x86_64/x32/sysctl.c
deleted file mode 100644
index 634c289..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/sysctl.c
+++ /dev/null
@@ -1 +0,0 @@
-/* X32 doesn't have _sysctl.  */
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/sysctl.mk b/sysdeps/unix/sysv/linux/x86_64/x32/sysctl.mk
new file mode 100644
index 0000000..9f640be
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/sysctl.mk
@@ -0,0 +1,4 @@
+# X32 doesn't support sysctl.
+ifeq ($(subdir),misc)
+sysctl = 
+endif

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=dc7322443eb8806290a6f4b4f5a9dfc3388b9318

commit dc7322443eb8806290a6f4b4f5a9dfc3388b9318
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 22 12:01:39 2012 -0700

    Update x32 arch_prctl.c

diff --git a/ChangeLog.x32 b/ChangeLog.x32
index 83190e9..59ebccf 100644
--- a/ChangeLog.x32
+++ b/ChangeLog.x32
@@ -1,5 +1,10 @@
 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* sysdeps/unix/sysv/linux/x86_64/x32/arch_prctl.c (__arch_prctl):
+	Updated.
+
+2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* sysdeps/unix/sysv/linux/x86_64/sysdep.h (INLINE_SYSCALL_TYPES):
 	New macro.
 	(INTERNAL_SYSCALL_NCS_TYPES): Likewise.
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/arch_prctl.c b/sysdeps/unix/sysv/linux/x86_64/x32/arch_prctl.c
index 44c100b..6933306 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/arch_prctl.c
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/arch_prctl.c
@@ -21,28 +21,27 @@
 #include <sys/syscall.h>
 #include <sysdep.h>
 
-/* Since x32 arch_prctl stores 32-bit base address of segment register %fs
-   and %gs as unsigned 64-bit value via ARCH_GET_FS and ARCH_GET_GS, we
-   use a local unsigned 64-bit variable to hold the base address and copy
-   it to ADDR after arch_prctl return.  */
+/* Since x32 arch_prctl stores 32-bit base address of segment registers
+   %fs and %gs as unsigned 64-bit value via ARCH_GET_FS and ARCH_GET_GS,
+   we use an unsigned 64-bit variable to hold the base address and copy
+   it to ADDR after the system call returns.  */
 
 int
 __arch_prctl (int code, uintptr_t *addr)
 {
   int res;
   uint64_t addr64;
-  uintptr_t *addr_saved;
+  void *prctl_arg = addr;
 
   switch (code)
     {
     case ARCH_GET_FS:
     case ARCH_GET_GS:
-      addr_saved = addr;
-      addr = (uintptr_t *) &addr64;
+      prctl_arg = &addr64;
       break;
     }
 
-  res = INLINE_SYSCALL (arch_prctl, 2, code, addr);
+  res = INLINE_SYSCALL (arch_prctl, 2, code, prctl_arg);
   if (res == 0)
     switch (code)
       {
@@ -54,11 +53,10 @@ __arch_prctl (int code, uintptr_t *addr)
 	    __set_errno (EOVERFLOW);
 	    return -1;
 	  }
-	*addr_saved = (uintptr_t) addr64;
+	*addr = (uintptr_t) addr64;
 	break;
       }
 
   return res;
 }
-
 weak_alias (__arch_prctl, arch_prctl)

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d9990eacdf5ab4dbb54fef1ba1e3b67c6112ccc7

commit d9990eacdf5ab4dbb54fef1ba1e3b67c6112ccc7
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 22 12:00:11 2012 -0700

    Add INLINE_SYSCALL_TYPES

diff --git a/ChangeLog.x32 b/ChangeLog.x32
index ae7bca3..83190e9 100644
--- a/ChangeLog.x32
+++ b/ChangeLog.x32
@@ -1,5 +1,16 @@
 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* sysdeps/unix/sysv/linux/x86_64/sysdep.h (INLINE_SYSCALL_TYPES):
+	New macro.
+	(INTERNAL_SYSCALL_NCS_TYPES): Likewise.
+	(INTERNAL_SYSCALL_TYPES): Likewise.
+
+	* sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c
+	(posix_fallocate): Use INTERNAL_SYSCALL_TYPES if it is defined.
+	* sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c: Removed.
+
+2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* sysdeps/unix/sysv/linux/x86_64/sysdep.h 
 	(LOAD_REGS_TYPES_[1-6]): Add types.
 
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c b/sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c
index 906b5c2..f791422 100644
--- a/sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c
+++ b/sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c
@@ -38,7 +38,13 @@ posix_fallocate (int fd, __off_t offset, __off_t len)
 # endif
     {
       INTERNAL_SYSCALL_DECL (err);
+# ifdef INTERNAL_SYSCALL_TYPES
+      int res = INTERNAL_SYSCALL_TYPES (fallocate, err, 4, int, fd,
+					int, 0, off_t, offset,
+					off_t, len);
+# else
       int res = INTERNAL_SYSCALL (fallocate, err, 4, fd, 0, offset, len);
+# endif
 
       if (! INTERNAL_SYSCALL_ERROR_P (res, err))
 	return 0;
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
index 8e13b1a..cde8652 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
@@ -203,6 +203,20 @@
       }									      \
     (long int) resultvar; })
 
+/* Define a macro with explicit types for arguments, which expands inline
+   into the wrapper code for a system call.  It should be used when size
+   of any argument > size of long int.  */
+# undef INLINE_SYSCALL_TYPES
+# define INLINE_SYSCALL_TYPES(name, nr, args...) \
+  ({									      \
+    unsigned long int resultvar = INTERNAL_SYSCALL_TYPES (name, , nr, args);  \
+    if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (resultvar, ), 0))	      \
+      {									      \
+	__set_errno (INTERNAL_SYSCALL_ERRNO (resultvar, ));		      \
+	resultvar = (unsigned long int) -1;				      \
+      }									      \
+    (long int) resultvar; })
+
 # undef INTERNAL_SYSCALL_DECL
 # define INTERNAL_SYSCALL_DECL(err) do { } while (0)
 
@@ -220,6 +234,20 @@
 # define INTERNAL_SYSCALL(name, err, nr, args...) \
   INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args)
 
+# define INTERNAL_SYSCALL_NCS_TYPES(name, err, nr, args...) \
+  ({									      \
+    unsigned long int resultvar;					      \
+    LOAD_ARGS_TYPES_##nr (args)						      \
+    LOAD_REGS_TYPES_##nr (args)						      \
+    asm volatile (							      \
+    "syscall\n\t"							      \
+    : "=a" (resultvar)							      \
+    : "0" (name) ASM_ARGS_##nr : "memory", "cc", "r11", "cx");		      \
+    (long int) resultvar; })
+# undef INTERNAL_SYSCALL_TYPES
+# define INTERNAL_SYSCALL_TYPES(name, err, nr, args...) \
+  INTERNAL_SYSCALL_NCS_TYPES (__NR_##name, err, nr, ##args)
+
 # undef INTERNAL_SYSCALL_ERROR_P
 # define INTERNAL_SYSCALL_ERROR_P(val, err) \
   ((unsigned long int) (long int) (val) >= -4095L)
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c b/sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c
deleted file mode 100644
index 5df8ebe..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <sysdep.h>
-
-/* Since posix_fallocate is implemented by calling the fallocate
-   system call with: fallocate (fd, 0, offset, len), we redefine
-   arguments 3 (offset) and 4 (len) to be long long int to match:
-
-   int fallocate(int fd, int mode, off_t offset, off_t len);
- */
-
-#undef LOAD_ARGS_4
-#define LOAD_ARGS_4(a1, a2, a3, a4)			\
-  LOAD_ARGS_TYPES_4 (long int, a1, long int, a2,		\
-		    long long int, a3, long long int, a4)
-#undef LOAD_REGS_4
-#define LOAD_REGS_4					\
-  LOAD_REGS_TYPES_4 (long int, a1, long int, a2,		\
-		    long long int, a3, long long int, a4)
-
-#include <sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c>

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6afa2e2f80e6a47a78f806210e9ee997b73fcfa0

commit 6afa2e2f80e6a47a78f806210e9ee997b73fcfa0
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 22 10:35:02 2012 -0700

    Add types to LOAD_REGS_TYPES_[1-6]

diff --git a/ChangeLog.x32 b/ChangeLog.x32
index 9664f27..ae7bca3 100644
--- a/ChangeLog.x32
+++ b/ChangeLog.x32
@@ -1,6 +1,11 @@
 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* sysdeps/unix/sysv/linux/x86_64/sysdep.h 
+	(LOAD_REGS_TYPES_[1-6]): Add types.
+
+2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* sysdeps/unix/sysv/linux/x86_64/sysdep.h 
 	(LOAD_ARGS_TYPE_[1-6]): Renamed to ...
 	(LOAD_ARGS_TYPES_[1-6]): This.
 	(LOAD_REGS_TYPE_[1-6]): Renamed to ...
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
index aeb39db..8e13b1a 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
@@ -289,78 +289,80 @@
 # define LOAD_ARGS_TYPES_1(t1, a1)					   \
   t1 __arg1 = (t1) (a1);						   \
   LOAD_ARGS_0 ()
-# define LOAD_REGS_TYPES_1(t1)						   \
+# define LOAD_REGS_TYPES_1(t1, a1)					   \
   register t1 _a1 asm ("rdi") = __arg1;					   \
   LOAD_REGS_0
 # define ASM_ARGS_1	ASM_ARGS_0, "r" (_a1)
 # define LOAD_ARGS_1(a1)						   \
   LOAD_ARGS_TYPES_1 (long int, a1)
 # define LOAD_REGS_1							   \
-  LOAD_REGS_TYPES_1 (long int)
+  LOAD_REGS_TYPES_1 (long int, a1)
 
 # define LOAD_ARGS_TYPES_2(t1, a1, t2, a2)				   \
   t2 __arg2 = (t2) (a2);						   \
   LOAD_ARGS_TYPES_1 (t1, a1)
-# define LOAD_REGS_TYPES_2(t1, t2)					   \
+# define LOAD_REGS_TYPES_2(t1, a1, t2, a2)				   \
   register t2 _a2 asm ("rsi") = __arg2;					   \
-  LOAD_REGS_TYPES_1(t1)
+  LOAD_REGS_TYPES_1(t1, a1)
 # define ASM_ARGS_2	ASM_ARGS_1, "r" (_a2)
 # define LOAD_ARGS_2(a1, a2)						   \
   LOAD_ARGS_TYPES_2 (long int, a1, long int, a2)
 # define LOAD_REGS_2							   \
-  LOAD_REGS_TYPES_2 (long int, long int)
+  LOAD_REGS_TYPES_2 (long int, a1, long int, a2)
 
 # define LOAD_ARGS_TYPES_3(t1, a1, t2, a2, t3, a3)			   \
   t3 __arg3 = (t3) (a3);						   \
   LOAD_ARGS_TYPES_2 (t1, a1, t2, a2)
-# define LOAD_REGS_TYPES_3(t1, t2, t3)					   \
+# define LOAD_REGS_TYPES_3(t1, a1, t2, a2, t3, a3)			   \
   register t3 _a3 asm ("rdx") = __arg3;					   \
-  LOAD_REGS_TYPES_2(t1, t2)
+  LOAD_REGS_TYPES_2(t1, a1, t2, a2)
 # define ASM_ARGS_3	ASM_ARGS_2, "r" (_a3)
 # define LOAD_ARGS_3(a1, a2, a3)					   \
   LOAD_ARGS_TYPES_3 (long int, a1, long int, a2, long int, a3)
 # define LOAD_REGS_3							   \
-  LOAD_REGS_TYPES_3 (long int, long int, long int)
+  LOAD_REGS_TYPES_3 (long int, a1, long int, a2, long int, a3)
 
 # define LOAD_ARGS_TYPES_4(t1, a1, t2, a2, t3, a3, t4, a4)		   \
   t4 __arg4 = (t4) (a4);						   \
   LOAD_ARGS_TYPES_3 (t1, a1, t2, a2, t3, a3)
-# define LOAD_REGS_TYPES_4(t1, t2, t3, t4)				   \
+# define LOAD_REGS_TYPES_4(t1, a1, t2, a2, t3, a3, t4, a4)		   \
   register t4 _a4 asm ("r10") = __arg4;					   \
-  LOAD_REGS_TYPES_3(t1, t2, t3)
+  LOAD_REGS_TYPES_3(t1, a2, t2, a2, t3, a3)
 # define ASM_ARGS_4	ASM_ARGS_3, "r" (_a4)
 # define LOAD_ARGS_4(a1, a2, a3, a4)					   \
   LOAD_ARGS_TYPES_4 (long int, a1, long int, a2, long int, a3,		   \
 		     long int, a4)
 # define LOAD_REGS_4							   \
-  LOAD_REGS_TYPES_4 (long int, long int, long int, long int)
+  LOAD_REGS_TYPES_4 (long int, a1, long int, a2, long int, a3,		   \
+		     long int, a4)
 
 # define LOAD_ARGS_TYPES_5(t1, a1, t2, a2, t3, a3, t4, a4, t5, a5)	   \
   t5 __arg5 = (t5) (a5);						   \
   LOAD_ARGS_TYPES_4 (t1, a1, t2, a2, t3, a3, t4, a4)
-# define LOAD_REGS_TYPES_5(t1, t2, t3, t4, t5)				   \
+# define LOAD_REGS_TYPES_5(t1, a1, t2, a2, t3, a3, t4, a4, t5, a5)	   \
   register t5 _a5 asm ("r8") = __arg5;					   \
-  LOAD_REGS_TYPES_4(t1, t2, t3, t4)
+  LOAD_REGS_TYPES_4 (t1, a1, t2, a2, t3, a3, t4, a4)
 # define ASM_ARGS_5	ASM_ARGS_4, "r" (_a5)
 # define LOAD_ARGS_5(a1, a2, a3, a4, a5)				   \
   LOAD_ARGS_TYPES_5 (long int, a1, long int, a2, long int, a3,		   \
 		     long int, a4, long int, a5)
 # define LOAD_REGS_5							   \
-  LOAD_REGS_TYPES_5 (long int, long int, long int, long int, long int)
+  LOAD_REGS_TYPES_5 (long int, a1, long int, a2, long int, a3,		   \
+		     long int, a4, long int, a5)
 
 # define LOAD_ARGS_TYPES_6(t1, a1, t2, a2, t3, a3, t4, a4, t5, a5, t6, a6) \
   t6 __arg6 = (t6) (a6);						   \
   LOAD_ARGS_TYPES_5 (t1, a1, t2, a2, t3, a3, t4, a4, t5, a5)
-# define LOAD_REGS_TYPES_6(t1, t2, t3, t4, t5, t6)			   \
+# define LOAD_REGS_TYPES_6(t1, a1, t2, a2, t3, a3, t4, a4, t5, a5, t6, a6) \
   register t6 _a6 asm ("r9") = __arg6;					   \
-  LOAD_REGS_TYPES_5(t1, t2, t3, t4, t5)
+  LOAD_REGS_TYPES_5 (t1, a1, t2, a2, t3, a3, t4, a4, t5, a5)
 # define ASM_ARGS_6	ASM_ARGS_5, "r" (_a6)
 # define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6)				   \
   LOAD_ARGS_TYPES_6 (long int, a1, long int, a2, long int, a3,		   \
 		     long int, a4, long int, a5, long int, a6)
 # define LOAD_REGS_6							   \
-  LOAD_REGS_TYPES_6 (long int, long int, long int, long int, long int,	   \
-		     long int)
+  LOAD_REGS_TYPES_6 (long int, a1, long int, a2, long int, a3,		   \
+		     long int, a4, long int, a5, long int, a6)
 
 #endif	/* __ASSEMBLER__ */
 
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c b/sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c
index 94deb77..5df8ebe 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c
@@ -13,7 +13,7 @@
 		    long long int, a3, long long int, a4)
 #undef LOAD_REGS_4
 #define LOAD_REGS_4					\
-  LOAD_REGS_TYPES_4 (long int, long int, long long int,	\
-		    long long int)
+  LOAD_REGS_TYPES_4 (long int, a1, long int, a2,		\
+		    long long int, a3, long long int, a4)
 
 #include <sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c>

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6a9a785bd06f5af4896913e994642e20a96351bc

commit 6a9a785bd06f5af4896913e994642e20a96351bc
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 22 10:17:10 2012 -0700

    Rename LOAD_XXGS_TYPE_[1-6] to LOAD_XXGS_TYPES_[1-6]

diff --git a/ChangeLog.x32 b/ChangeLog.x32
index 280b308..9664f27 100644
--- a/ChangeLog.x32
+++ b/ChangeLog.x32
@@ -1,5 +1,18 @@
 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* sysdeps/unix/sysv/linux/x86_64/sysdep.h 
+	(LOAD_ARGS_TYPE_[1-6]): Renamed to ...
+	(LOAD_ARGS_TYPES_[1-6]): This.
+	(LOAD_REGS_TYPE_[1-6]): Renamed to ...
+	(LOAD_REGS_TYPES_[1-6]): This.
+	(LOAD_ARGS_[1-6]): Updated.
+	(LOAD_REGS_[1-6]): Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c
+	(LOAD_ARGS_4): Updated.
+	(LOAD_REGS_4): Likewise.
+
+2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* sysdeps/unix/sysv/linux/x86_64/x32/ptrace.c: Removed.
 
 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
index 5e503f2..aeb39db 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
@@ -286,81 +286,81 @@
 # define LOAD_REGS_0
 # define ASM_ARGS_0
 
-# define LOAD_ARGS_TYPE_1(t1, a1)					  \
-  t1 __arg1 = (t1) (a1);						  \
+# define LOAD_ARGS_TYPES_1(t1, a1)					   \
+  t1 __arg1 = (t1) (a1);						   \
   LOAD_ARGS_0 ()
-# define LOAD_REGS_TYPE_1(t1)						  \
-  register t1 _a1 asm ("rdi") = __arg1;					  \
+# define LOAD_REGS_TYPES_1(t1)						   \
+  register t1 _a1 asm ("rdi") = __arg1;					   \
   LOAD_REGS_0
 # define ASM_ARGS_1	ASM_ARGS_0, "r" (_a1)
-# define LOAD_ARGS_1(a1)						  \
-  LOAD_ARGS_TYPE_1 (long int, a1)
-# define LOAD_REGS_1							  \
-  LOAD_REGS_TYPE_1 (long int)
-
-# define LOAD_ARGS_TYPE_2(t1, a1, t2, a2)				  \
-  t2 __arg2 = (t2) (a2);						  \
-  LOAD_ARGS_TYPE_1 (t1, a1)
-# define LOAD_REGS_TYPE_2(t1, t2)					  \
-  register t2 _a2 asm ("rsi") = __arg2;					  \
-  LOAD_REGS_TYPE_1(t1)
+# define LOAD_ARGS_1(a1)						   \
+  LOAD_ARGS_TYPES_1 (long int, a1)
+# define LOAD_REGS_1							   \
+  LOAD_REGS_TYPES_1 (long int)
+
+# define LOAD_ARGS_TYPES_2(t1, a1, t2, a2)				   \
+  t2 __arg2 = (t2) (a2);						   \
+  LOAD_ARGS_TYPES_1 (t1, a1)
+# define LOAD_REGS_TYPES_2(t1, t2)					   \
+  register t2 _a2 asm ("rsi") = __arg2;					   \
+  LOAD_REGS_TYPES_1(t1)
 # define ASM_ARGS_2	ASM_ARGS_1, "r" (_a2)
-# define LOAD_ARGS_2(a1, a2)						  \
-  LOAD_ARGS_TYPE_2 (long int, a1, long int, a2)
-# define LOAD_REGS_2							  \
-  LOAD_REGS_TYPE_2 (long int, long int)
-
-# define LOAD_ARGS_TYPE_3(t1, a1, t2, a2, t3, a3)			  \
-  t3 __arg3 = (t3) (a3);						  \
-  LOAD_ARGS_TYPE_2 (t1, a1, t2, a2)
-# define LOAD_REGS_TYPE_3(t1, t2, t3)					  \
-  register t3 _a3 asm ("rdx") = __arg3;					  \
-  LOAD_REGS_TYPE_2(t1, t2)
+# define LOAD_ARGS_2(a1, a2)						   \
+  LOAD_ARGS_TYPES_2 (long int, a1, long int, a2)
+# define LOAD_REGS_2							   \
+  LOAD_REGS_TYPES_2 (long int, long int)
+
+# define LOAD_ARGS_TYPES_3(t1, a1, t2, a2, t3, a3)			   \
+  t3 __arg3 = (t3) (a3);						   \
+  LOAD_ARGS_TYPES_2 (t1, a1, t2, a2)
+# define LOAD_REGS_TYPES_3(t1, t2, t3)					   \
+  register t3 _a3 asm ("rdx") = __arg3;					   \
+  LOAD_REGS_TYPES_2(t1, t2)
 # define ASM_ARGS_3	ASM_ARGS_2, "r" (_a3)
-# define LOAD_ARGS_3(a1, a2, a3)					  \
-  LOAD_ARGS_TYPE_3 (long int, a1, long int, a2,	long int, a3)
-# define LOAD_REGS_3							  \
-  LOAD_REGS_TYPE_3 (long int, long int, long int)
-
-# define LOAD_ARGS_TYPE_4(t1, a1, t2, a2, t3, a3, t4, a4)		  \
-  t4 __arg4 = (t4) (a4);						  \
-  LOAD_ARGS_TYPE_3 (t1, a1, t2, a2, t3, a3)
-# define LOAD_REGS_TYPE_4(t1, t2, t3, t4)				  \
-  register t4 _a4 asm ("r10") = __arg4;					  \
-  LOAD_REGS_TYPE_3(t1, t2, t3)
+# define LOAD_ARGS_3(a1, a2, a3)					   \
+  LOAD_ARGS_TYPES_3 (long int, a1, long int, a2, long int, a3)
+# define LOAD_REGS_3							   \
+  LOAD_REGS_TYPES_3 (long int, long int, long int)
+
+# define LOAD_ARGS_TYPES_4(t1, a1, t2, a2, t3, a3, t4, a4)		   \
+  t4 __arg4 = (t4) (a4);						   \
+  LOAD_ARGS_TYPES_3 (t1, a1, t2, a2, t3, a3)
+# define LOAD_REGS_TYPES_4(t1, t2, t3, t4)				   \
+  register t4 _a4 asm ("r10") = __arg4;					   \
+  LOAD_REGS_TYPES_3(t1, t2, t3)
 # define ASM_ARGS_4	ASM_ARGS_3, "r" (_a4)
-# define LOAD_ARGS_4(a1, a2, a3, a4)					  \
-  LOAD_ARGS_TYPE_4 (long int, a1, long int, a2,	long int, a3,		  \
-		    long int, a4)
-# define LOAD_REGS_4							  \
-  LOAD_REGS_TYPE_4 (long int, long int, long int, long int)
-
-# define LOAD_ARGS_TYPE_5(t1, a1, t2, a2, t3, a3, t4, a4, t5, a5)	  \
-  t5 __arg5 = (t5) (a5);						  \
-  LOAD_ARGS_TYPE_4 (t1, a1, t2, a2, t3, a3, t4, a4)
-# define LOAD_REGS_TYPE_5(t1, t2, t3, t4, t5)				  \
-  register t5 _a5 asm ("r8") = __arg5;					  \
-  LOAD_REGS_TYPE_4(t1, t2, t3, t4)
+# define LOAD_ARGS_4(a1, a2, a3, a4)					   \
+  LOAD_ARGS_TYPES_4 (long int, a1, long int, a2, long int, a3,		   \
+		     long int, a4)
+# define LOAD_REGS_4							   \
+  LOAD_REGS_TYPES_4 (long int, long int, long int, long int)
+
+# define LOAD_ARGS_TYPES_5(t1, a1, t2, a2, t3, a3, t4, a4, t5, a5)	   \
+  t5 __arg5 = (t5) (a5);						   \
+  LOAD_ARGS_TYPES_4 (t1, a1, t2, a2, t3, a3, t4, a4)
+# define LOAD_REGS_TYPES_5(t1, t2, t3, t4, t5)				   \
+  register t5 _a5 asm ("r8") = __arg5;					   \
+  LOAD_REGS_TYPES_4(t1, t2, t3, t4)
 # define ASM_ARGS_5	ASM_ARGS_4, "r" (_a5)
-# define LOAD_ARGS_5(a1, a2, a3, a4, a5)				  \
-  LOAD_ARGS_TYPE_5 (long int, a1, long int, a2,	long int, a3,		  \
-		    long int, a4, long int, a5)
-# define LOAD_REGS_5							  \
-  LOAD_REGS_TYPE_5 (long int, long int, long int, long int, long int)
-
-# define LOAD_ARGS_TYPE_6(t1, a1, t2, a2, t3, a3, t4, a4, t5, a5, t6, a6) \
-  t6 __arg6 = (t6) (a6);						  \
-  LOAD_ARGS_TYPE_5 (t1, a1, t2, a2, t3, a3, t4, a4, t5, a5)
-# define LOAD_REGS_TYPE_6(t1, t2, t3, t4, t5, t6)			  \
-  register t6 _a6 asm ("r9") = __arg6;					  \
-  LOAD_REGS_TYPE_5(t1, t2, t3, t4, t5)
+# define LOAD_ARGS_5(a1, a2, a3, a4, a5)				   \
+  LOAD_ARGS_TYPES_5 (long int, a1, long int, a2, long int, a3,		   \
+		     long int, a4, long int, a5)
+# define LOAD_REGS_5							   \
+  LOAD_REGS_TYPES_5 (long int, long int, long int, long int, long int)
+
+# define LOAD_ARGS_TYPES_6(t1, a1, t2, a2, t3, a3, t4, a4, t5, a5, t6, a6) \
+  t6 __arg6 = (t6) (a6);						   \
+  LOAD_ARGS_TYPES_5 (t1, a1, t2, a2, t3, a3, t4, a4, t5, a5)
+# define LOAD_REGS_TYPES_6(t1, t2, t3, t4, t5, t6)			   \
+  register t6 _a6 asm ("r9") = __arg6;					   \
+  LOAD_REGS_TYPES_5(t1, t2, t3, t4, t5)
 # define ASM_ARGS_6	ASM_ARGS_5, "r" (_a6)
-# define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6)				  \
-  LOAD_ARGS_TYPE_6 (long int, a1, long int, a2,	long int, a3,		  \
-		    long int, a4, long int, a5, long int, a6)
-# define LOAD_REGS_6							  \
-  LOAD_REGS_TYPE_6 (long int, long int, long int, long int, long int,	  \
-		    long int)
+# define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6)				   \
+  LOAD_ARGS_TYPES_6 (long int, a1, long int, a2, long int, a3,		   \
+		     long int, a4, long int, a5, long int, a6)
+# define LOAD_REGS_6							   \
+  LOAD_REGS_TYPES_6 (long int, long int, long int, long int, long int,	   \
+		     long int)
 
 #endif	/* __ASSEMBLER__ */
 
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c b/sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c
index 104ef89..94deb77 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c
@@ -9,11 +9,11 @@
 
 #undef LOAD_ARGS_4
 #define LOAD_ARGS_4(a1, a2, a3, a4)			\
-  LOAD_ARGS_TYPE_4 (long int, a1, long int, a2,		\
+  LOAD_ARGS_TYPES_4 (long int, a1, long int, a2,		\
 		    long long int, a3, long long int, a4)
 #undef LOAD_REGS_4
 #define LOAD_REGS_4					\
-  LOAD_REGS_TYPE_4 (long int, long int, long long int,	\
+  LOAD_REGS_TYPES_4 (long int, long int, long long int,	\
 		    long long int)
 
 #include <sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c>

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4594223bd1563f2f40d4d8875769296d12b4e8e1

commit 4594223bd1563f2f40d4d8875769296d12b4e8e1
Merge: 90820c0 83678f7
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 22 10:06:26 2012 -0700

    Merge remote-tracking branch 'origin/master' into hjl/x32/master


http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=90820c096d3429c01050f6c21f1b72debb8b76be

commit 90820c096d3429c01050f6c21f1b72debb8b76be
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 22 05:46:39 2012 -0700

    Update copyright year

diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
index 5239a94..9fa5ecb 100644
--- a/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
+++ b/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
@@ -1,6 +1,5 @@
 /* O_*, F_*, FD_* bit values for Linux/x86-64.
-   Copyright (C) 2001,2002,2004,2006,2007,2009-2012
-   Free Software Foundation, Inc.
+   Copyright (C) 2001-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

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b60067514d1966fac982b5e14380d751c2899fc7

commit b60067514d1966fac982b5e14380d751c2899fc7
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 22 05:44:51 2012 -0700

    Remove x32 ptrace.c

diff --git a/ChangeLog.x32 b/ChangeLog.x32
index d12503a..280b308 100644
--- a/ChangeLog.x32
+++ b/ChangeLog.x32
@@ -1,5 +1,9 @@
 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* sysdeps/unix/sysv/linux/x86_64/x32/ptrace.c: Removed.
+
+2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER):
 	Use "neg %eax".
 
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/ptrace.c b/sysdeps/unix/sysv/linux/x86_64/x32/ptrace.c
deleted file mode 100644
index c636a3f..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/x32/ptrace.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/* ptrace call for Linux/x32.
-   Copyright (C) 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <errno.h>
-#include <sys/types.h>
-#define ptrace __redirect_ptrace
-#include <sys/ptrace.h>
-#undef ptrace
-#include <sys/syscall.h>
-#include <sysdep.h>
-
-/* PTRACE_ARCH_PRCTL is specific to x86 kernel and is only used by GDB.  */
-#ifndef PTRACE_ARCH_PRCTL
-# define PTRACE_ARCH_PRCTL	30
-#endif
-
-/* Since x32 ptrace stores 32-bit base address of segment register %fs
-   and %gs as unsigned 64-bit value via ARCH_GET_FS and ARCH_GET_GS with
-   PTRACE_ARCH_PRCTL, we use a local unsigned 64-bit variable to hold
-   the base address and copy it to ADDR after ptrace return.
-
-   We don't use
-
-   long int ptrace (enum __ptrace_request __request, ...);
-
-   since x32 passes all 4 parameters in registers, which is the same
-   as the non-stdarg call.  The generated code is much simpler.
-   */
-
-long int
-ptrace (enum __ptrace_request request, pid_t pid, void *addr, void *data)
-{
-  long res, ret;
-  unsigned long long base_addr;
-  unsigned long *addr_saved;
-
-  switch ((int) request)
-    {
-    case PTRACE_PEEKTEXT:
-    case PTRACE_PEEKDATA:
-    case PTRACE_PEEKUSER:
-      /* Pass the address of return data to kernel.  */
-      data = &ret;
-      break;
-
-    case PTRACE_ARCH_PRCTL:
-      switch ((int) data)
-	{
-	case ARCH_GET_FS:
-	case ARCH_GET_GS:
-	  addr_saved = (unsigned long *) addr;
-	  addr = &base_addr;
-	  break;
-
-	default:
-	  break;
-	}
-      break;
-
-    default:
-      break;
-    }
-
-  res = INLINE_SYSCALL (ptrace, 4, request, pid, addr, data);
-  if (res >= 0)
-    switch ((int) request)
-      {
-      case PTRACE_PEEKTEXT:
-      case PTRACE_PEEKDATA:
-      case PTRACE_PEEKUSER:
-	__set_errno (0);
-	return ret;
-
-      case PTRACE_ARCH_PRCTL:
-	switch ((int) data)
-	  {
-	  case ARCH_GET_FS:
-	  case ARCH_GET_GS:
-	    *addr_saved = (unsigned long) base_addr;
-	    break;
-
-	  default:
-	    break;
-	  }
-	break;
-
-      default:
-	break;
-      }
-
-  return res;
-}

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3da7605ae8d53356d30db44e917b021bcb1eeb83

commit 3da7605ae8d53356d30db44e917b021bcb1eeb83
Merge: c67a1e6 0e44a77
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 22 05:43:30 2012 -0700

    Merge remote-tracking branch 'origin/master' into hjl/x32/master


http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c67a1e66339df6932cf7405a6664b6014fdadbd3

commit c67a1e66339df6932cf7405a6664b6014fdadbd3
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 22 05:42:09 2012 -0700

    Use "neg %eax" in i386 SYSCALL_ERROR_HANDLER

diff --git a/ChangeLog.x32 b/ChangeLog.x32
index 8a0c349..d12503a 100644
--- a/ChangeLog.x32
+++ b/ChangeLog.x32
@@ -1,5 +1,10 @@
 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER):
+	Use "neg %eax".
+
+2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER):
 	Put back "ret".
 
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
index e7d7103..6c4f778 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -112,9 +112,8 @@
 #  define SYSCALL_ERROR_HANDLER						      \
 0:SETUP_PIC_REG(cx);							      \
   addl $_GLOBAL_OFFSET_TABLE_, %ecx;					      \
-  xorl %edx, %edx;							      \
-  subl %eax, %edx;							      \
-  movl %edx, rtld_errno@GOTOFF(%ecx);					      \
+  negl %eax;								      \
+  movl %eax, rtld_errno@GOTOFF(%ecx);					      \
   orl $-1, %eax;							      \
   jmp L(pseudo_end);
 
@@ -129,9 +128,8 @@
 0:SETUP_PIC_REG (cx);							      \
   addl $_GLOBAL_OFFSET_TABLE_, %ecx;					      \
   movl SYSCALL_ERROR_ERRNO@GOTNTPOFF(%ecx), %ecx;			      \
-  xorl %edx, %edx;							      \
-  subl %eax, %edx;							      \
-  SYSCALL_ERROR_HANDLER_TLS_STORE (%edx, %ecx);				      \
+  negl %eax;								      \
+  SYSCALL_ERROR_HANDLER_TLS_STORE (%eax, %ecx);				      \
   orl $-1, %eax;							      \
   jmp L(pseudo_end);
 #  ifndef NO_TLS_DIRECT_SEG_REFS
@@ -147,10 +145,9 @@
 #  define SYSCALL_ERROR_HANDLER						      \
 0:SETUP_PIC_REG(cx);							      \
   addl $_GLOBAL_OFFSET_TABLE_, %ecx;					      \
-  xorl %edx, %edx;							      \
-  subl %eax, %edx;							      \
+  negl %eax;								      \
   movl errno@GOT(%ecx), %ecx;						      \
-  movl %edx, (%ecx);							      \
+  movl %eax, (%ecx);							      \
   orl $-1, %eax;							      \
   jmp L(pseudo_end);
 # endif	/* _LIBC_REENTRANT */

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e5cae07ef29a8c220a209ebca6571a2630fde539

commit e5cae07ef29a8c220a209ebca6571a2630fde539
Merge: 5dccc53 46259be
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 22 05:28:49 2012 -0700

    Merge remote-tracking branch 'origin/master' into hjl/x32/master


http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5dccc53bda24dcc904f2f1d78dd1e7111c697562

commit 5dccc53bda24dcc904f2f1d78dd1e7111c697562
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue May 22 05:28:02 2012 -0700

    Put back "ret" in x86-64 SYSCALL_ERROR_HANDLER

diff --git a/ChangeLog.x32 b/ChangeLog.x32
index 9631135..8a0c349 100644
--- a/ChangeLog.x32
+++ b/ChangeLog.x32
@@ -1,3 +1,8 @@
+2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER):
+	Put back "ret".
+
 2012-05-21  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* sysdeps/unix/sysv/linux/x86_64/sysdep.h (LOAD_ARG1_TYPE): 
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
index 1c8dad7..5e503f2 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
@@ -136,7 +136,7 @@
 0:						\
   SYSCALL_SET_ERRNO;				\
   or $-1, %RAX_LP;				\
-  ret;
+  jmp L(pseudo_end);
 # endif	/* PIC */
 
 /* The Linux/x86-64 kernel expects the system call parameters in

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=44b20b016c3351fbea02011ccf8126b9549661a3

commit 44b20b016c3351fbea02011ccf8126b9549661a3
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon May 21 18:09:45 2012 -0700

    Reformat x86_64/sysdep.h

diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
index c19f541..1c8dad7 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
@@ -286,86 +286,81 @@
 # define LOAD_REGS_0
 # define ASM_ARGS_0
 
-# define LOAD_ARGS_TYPE_1(t1, a1)			\
-  t1 __arg1 = (t1) (a1);				\
+# define LOAD_ARGS_TYPE_1(t1, a1)					  \
+  t1 __arg1 = (t1) (a1);						  \
   LOAD_ARGS_0 ()
-# define LOAD_REGS_TYPE_1(t1)				\
-  register t1 _a1 asm ("rdi") = __arg1;			\
+# define LOAD_REGS_TYPE_1(t1)						  \
+  register t1 _a1 asm ("rdi") = __arg1;					  \
   LOAD_REGS_0
 # define ASM_ARGS_1	ASM_ARGS_0, "r" (_a1)
-# define LOAD_ARGS_1(a1)				\
+# define LOAD_ARGS_1(a1)						  \
   LOAD_ARGS_TYPE_1 (long int, a1)
-# define LOAD_REGS_1					\
+# define LOAD_REGS_1							  \
   LOAD_REGS_TYPE_1 (long int)
 
-# define LOAD_ARGS_TYPE_2(t1, a1, t2, a2)		\
-  t2 __arg2 = (t2) (a2);				\
+# define LOAD_ARGS_TYPE_2(t1, a1, t2, a2)				  \
+  t2 __arg2 = (t2) (a2);						  \
   LOAD_ARGS_TYPE_1 (t1, a1)
-# define LOAD_REGS_TYPE_2(t1, t2)			\
-  register t2 _a2 asm ("rsi") = __arg2;	\
+# define LOAD_REGS_TYPE_2(t1, t2)					  \
+  register t2 _a2 asm ("rsi") = __arg2;					  \
   LOAD_REGS_TYPE_1(t1)
 # define ASM_ARGS_2	ASM_ARGS_1, "r" (_a2)
-# define LOAD_ARGS_2(a1, a2)				\
+# define LOAD_ARGS_2(a1, a2)						  \
   LOAD_ARGS_TYPE_2 (long int, a1, long int, a2)
-# define LOAD_REGS_2					\
+# define LOAD_REGS_2							  \
   LOAD_REGS_TYPE_2 (long int, long int)
 
-# define LOAD_ARGS_TYPE_3(t1, a1, t2, a2, t3, a3)	\
-  t3 __arg3 = (t3) (a3);				\
+# define LOAD_ARGS_TYPE_3(t1, a1, t2, a2, t3, a3)			  \
+  t3 __arg3 = (t3) (a3);						  \
   LOAD_ARGS_TYPE_2 (t1, a1, t2, a2)
-# define LOAD_REGS_TYPE_3(t1, t2, t3)			\
-  register t3 _a3 asm ("rdx") = __arg3;			\
+# define LOAD_REGS_TYPE_3(t1, t2, t3)					  \
+  register t3 _a3 asm ("rdx") = __arg3;					  \
   LOAD_REGS_TYPE_2(t1, t2)
 # define ASM_ARGS_3	ASM_ARGS_2, "r" (_a3)
-# define LOAD_ARGS_3(a1, a2, a3)			\
-  LOAD_ARGS_TYPE_3 (long int, a1, long int, a2,		\
-		    long int, a3)
-# define LOAD_REGS_3					\
+# define LOAD_ARGS_3(a1, a2, a3)					  \
+  LOAD_ARGS_TYPE_3 (long int, a1, long int, a2,	long int, a3)
+# define LOAD_REGS_3							  \
   LOAD_REGS_TYPE_3 (long int, long int, long int)
 
-# define LOAD_ARGS_TYPE_4(t1, a1, t2, a2, t3, a3, t4, a4) \
-  t4 __arg4 = (t4) (a4);				\
+# define LOAD_ARGS_TYPE_4(t1, a1, t2, a2, t3, a3, t4, a4)		  \
+  t4 __arg4 = (t4) (a4);						  \
   LOAD_ARGS_TYPE_3 (t1, a1, t2, a2, t3, a3)
-# define LOAD_REGS_TYPE_4(t1, t2, t3, t4)		\
-  register t4 _a4 asm ("r10") = __arg4;			\
+# define LOAD_REGS_TYPE_4(t1, t2, t3, t4)				  \
+  register t4 _a4 asm ("r10") = __arg4;					  \
   LOAD_REGS_TYPE_3(t1, t2, t3)
 # define ASM_ARGS_4	ASM_ARGS_3, "r" (_a4)
-# define LOAD_ARGS_4(a1, a2, a3, a4)			\
-  LOAD_ARGS_TYPE_4 (long int, a1, long int, a2,		\
-		    long int, a3, long int, a4)
-# define LOAD_REGS_4					\
-  LOAD_REGS_TYPE_4 (long int, long int, long int,	\
-		    long int)
-
-# define LOAD_ARGS_TYPE_5(t1, a1, t2, a2, t3, a3, t4, a4, t5, a5) \
-  t5 __arg5 = (t5) (a5);				\
+# define LOAD_ARGS_4(a1, a2, a3, a4)					  \
+  LOAD_ARGS_TYPE_4 (long int, a1, long int, a2,	long int, a3,		  \
+		    long int, a4)
+# define LOAD_REGS_4							  \
+  LOAD_REGS_TYPE_4 (long int, long int, long int, long int)
+
+# define LOAD_ARGS_TYPE_5(t1, a1, t2, a2, t3, a3, t4, a4, t5, a5)	  \
+  t5 __arg5 = (t5) (a5);						  \
   LOAD_ARGS_TYPE_4 (t1, a1, t2, a2, t3, a3, t4, a4)
-# define LOAD_REGS_TYPE_5(t1, t2, t3, t4, t5)		\
-  register t5 _a5 asm ("r8") = __arg5;			\
+# define LOAD_REGS_TYPE_5(t1, t2, t3, t4, t5)				  \
+  register t5 _a5 asm ("r8") = __arg5;					  \
   LOAD_REGS_TYPE_4(t1, t2, t3, t4)
 # define ASM_ARGS_5	ASM_ARGS_4, "r" (_a5)
-# define LOAD_ARGS_5(a1, a2, a3, a4, a5)		\
-  LOAD_ARGS_TYPE_5 (long int, a1, long int, a2,		\
-		    long int, a3, long int, a4,		\
-		    long int, a5)
-# define LOAD_REGS_5					\
-  LOAD_REGS_TYPE_5 (long int, long int, long int,	\
-		    long int, long int)
+# define LOAD_ARGS_5(a1, a2, a3, a4, a5)				  \
+  LOAD_ARGS_TYPE_5 (long int, a1, long int, a2,	long int, a3,		  \
+		    long int, a4, long int, a5)
+# define LOAD_REGS_5							  \
+  LOAD_REGS_TYPE_5 (long int, long int, long int, long int, long int)
 
 # define LOAD_ARGS_TYPE_6(t1, a1, t2, a2, t3, a3, t4, a4, t5, a5, t6, a6) \
-  t6 __arg6 = (t6) (a6);				\
+  t6 __arg6 = (t6) (a6);						  \
   LOAD_ARGS_TYPE_5 (t1, a1, t2, a2, t3, a3, t4, a4, t5, a5)
-# define LOAD_REGS_TYPE_6(t1, t2, t3, t4, t5, t6)	\
-  register t6 _a6 asm ("r9") = __arg6;	\
+# define LOAD_REGS_TYPE_6(t1, t2, t3, t4, t5, t6)			  \
+  register t6 _a6 asm ("r9") = __arg6;					  \
   LOAD_REGS_TYPE_5(t1, t2, t3, t4, t5)
 # define ASM_ARGS_6	ASM_ARGS_5, "r" (_a6)
-# define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6)		\
-  LOAD_ARGS_TYPE_6 (long int, a1, long int, a2,		\
-		    long int, a3, long int, a4,		\
-		    long int, a5, long int, a6)
-# define LOAD_REGS_6					\
-  LOAD_REGS_TYPE_6 (long int, long int, long int,	\
-		    long int, long int, long int)
+# define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6)				  \
+  LOAD_ARGS_TYPE_6 (long int, a1, long int, a2,	long int, a3,		  \
+		    long int, a4, long int, a5, long int, a6)
+# define LOAD_REGS_6							  \
+  LOAD_REGS_TYPE_6 (long int, long int, long int, long int, long int,	  \
+		    long int)
 
 #endif	/* __ASSEMBLER__ */
 

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b494194071f36c026cfb6617a8dd7c227d9627b5

commit b494194071f36c026cfb6617a8dd7c227d9627b5
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon May 21 18:01:46 2012 -0700

    Change LOAD_ARG[1-6]_TYPE toLOAD_{ARGS|REG}_TYPE_[1-6]

diff --git a/ChangeLog.x32 b/ChangeLog.x32
index b387885..9631135 100644
--- a/ChangeLog.x32
+++ b/ChangeLog.x32
@@ -1,5 +1,44 @@
 2012-05-21  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* sysdeps/unix/sysv/linux/x86_64/sysdep.h (LOAD_ARG1_TYPE): 
+	Removed.
+	(LOAD_ARG2_TYPE): Likewise.
+	(LOAD_ARG3_TYPE): Likewise.
+	(LOAD_ARG4_TYPE): Likewise.
+	(LOAD_ARG5_TYPE): Likewise.
+	(LOAD_ARG6_TYPE): Likewise.
+	(LOAD_ARGS_TYPE_1): New macro.
+	(LOAD_REGS_TYPE_1): Likewise.
+	(LOAD_ARGS_TYPE_2): Likewise.
+	(LOAD_REGS_TYPE_2): Likewise.
+	(LOAD_ARGS_TYPE_3): Likewise.
+	(LOAD_REGS_TYPE_3): Likewise.
+	(LOAD_ARGS_TYPE_4): Likewise.
+	(LOAD_REGS_TYPE_4): Likewise.
+	(LOAD_ARGS_TYPE_5): Likewise.
+	(LOAD_REGS_TYPE_5): Likewise.
+	(LOAD_ARGS_TYPE_6): Likewise.
+	(LOAD_REGS_TYPE_6): Likewise.
+	(LOAD_ARGS_1): Use LOAD_ARGS_TYPE_1.
+	(LOAD_REGS_1): Use LOAD_REGS_TYPE_1.
+	(LOAD_ARGS_2): Use LOAD_ARGS_TYPE_2.
+	(LOAD_REGS_2): Use LOAD_REGS_TYPE_2.
+	(LOAD_ARGS_3): Use LOAD_ARGS_TYPE_3.
+	(LOAD_REGS_3): Use LOAD_REGS_TYPE_3.
+	(LOAD_ARGS_4): Use LOAD_ARGS_TYPE_4.
+	(LOAD_REGS_4): Use LOAD_REGS_TYPE_4.
+	(LOAD_ARGS_5): Use LOAD_ARGS_TYPE_5.
+	(LOAD_REGS_5): Use LOAD_REGS_TYPE_5.
+	(LOAD_ARGS_6): Use LOAD_ARGS_TYPE_6.
+	(LOAD_REGS_6): Use LOAD_REGS_TYPE_6.
+	* sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c
+	(LOAD_ARG3_TYPE): Removed.
+	(LOAD_ARG4_TYPE): Likewise.
+	(LOAD_ARGS_4): New.  Redefined.
+	(LOAD_REGS_4): Likewise.
+
+2012-05-21  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* sysdeps/unix/sysv/linux/x86_64/x32/llseek.S: Renamed to ...
 	* sysdeps/unix/sysv/linux/x86_64/x32/lseek.S: This.
 	* sysdeps/unix/sysv/linux/x86_64/x32/llseek.S: New dummy file.
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
index 0203f07..c19f541 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
@@ -285,60 +285,87 @@
 # define LOAD_ARGS_0()
 # define LOAD_REGS_0
 # define ASM_ARGS_0
-# define LOAD_ARG1_TYPE	long int
-# define LOAD_ARG2_TYPE	long int
-# define LOAD_ARG3_TYPE	long int
-# define LOAD_ARG4_TYPE	long int
-# define LOAD_ARG5_TYPE	long int
-# define LOAD_ARG6_TYPE	long int
 
-# define LOAD_ARGS_1(a1)				\
-  LOAD_ARG1_TYPE __arg1 = (LOAD_ARG1_TYPE) (a1);	\
+# define LOAD_ARGS_TYPE_1(t1, a1)			\
+  t1 __arg1 = (t1) (a1);				\
   LOAD_ARGS_0 ()
-# define LOAD_REGS_1					\
-  register LOAD_ARG1_TYPE _a1 asm ("rdi") = __arg1;	\
+# define LOAD_REGS_TYPE_1(t1)				\
+  register t1 _a1 asm ("rdi") = __arg1;			\
   LOAD_REGS_0
 # define ASM_ARGS_1	ASM_ARGS_0, "r" (_a1)
-
+# define LOAD_ARGS_1(a1)				\
+  LOAD_ARGS_TYPE_1 (long int, a1)
+# define LOAD_REGS_1					\
+  LOAD_REGS_TYPE_1 (long int)
+
+# define LOAD_ARGS_TYPE_2(t1, a1, t2, a2)		\
+  t2 __arg2 = (t2) (a2);				\
+  LOAD_ARGS_TYPE_1 (t1, a1)
+# define LOAD_REGS_TYPE_2(t1, t2)			\
+  register t2 _a2 asm ("rsi") = __arg2;	\
+  LOAD_REGS_TYPE_1(t1)
+# define ASM_ARGS_2	ASM_ARGS_1, "r" (_a2)
 # define LOAD_ARGS_2(a1, a2)				\
-  LOAD_ARG2_TYPE __arg2 = (LOAD_ARG2_TYPE) (a2);	\
-  LOAD_ARGS_1 (a1)
+  LOAD_ARGS_TYPE_2 (long int, a1, long int, a2)
 # define LOAD_REGS_2					\
-  register LOAD_ARG2_TYPE _a2 asm ("rsi") = __arg2;	\
-  LOAD_REGS_1
-# define ASM_ARGS_2	ASM_ARGS_1, "r" (_a2)
-
+  LOAD_REGS_TYPE_2 (long int, long int)
+
+# define LOAD_ARGS_TYPE_3(t1, a1, t2, a2, t3, a3)	\
+  t3 __arg3 = (t3) (a3);				\
+  LOAD_ARGS_TYPE_2 (t1, a1, t2, a2)
+# define LOAD_REGS_TYPE_3(t1, t2, t3)			\
+  register t3 _a3 asm ("rdx") = __arg3;			\
+  LOAD_REGS_TYPE_2(t1, t2)
+# define ASM_ARGS_3	ASM_ARGS_2, "r" (_a3)
 # define LOAD_ARGS_3(a1, a2, a3)			\
-  LOAD_ARG3_TYPE __arg3 = (LOAD_ARG3_TYPE) (a3);	\
-  LOAD_ARGS_2 (a1, a2)
+  LOAD_ARGS_TYPE_3 (long int, a1, long int, a2,		\
+		    long int, a3)
 # define LOAD_REGS_3					\
-  register LOAD_ARG3_TYPE _a3 asm ("rdx") = __arg3;	\
-  LOAD_REGS_2
-# define ASM_ARGS_3	ASM_ARGS_2, "r" (_a3)
-
+  LOAD_REGS_TYPE_3 (long int, long int, long int)
+
+# define LOAD_ARGS_TYPE_4(t1, a1, t2, a2, t3, a3, t4, a4) \
+  t4 __arg4 = (t4) (a4);				\
+  LOAD_ARGS_TYPE_3 (t1, a1, t2, a2, t3, a3)
+# define LOAD_REGS_TYPE_4(t1, t2, t3, t4)		\
+  register t4 _a4 asm ("r10") = __arg4;			\
+  LOAD_REGS_TYPE_3(t1, t2, t3)
+# define ASM_ARGS_4	ASM_ARGS_3, "r" (_a4)
 # define LOAD_ARGS_4(a1, a2, a3, a4)			\
-  LOAD_ARG4_TYPE __arg4 = (LOAD_ARG4_TYPE) (a4);	\
-  LOAD_ARGS_3 (a1, a2, a3)
+  LOAD_ARGS_TYPE_4 (long int, a1, long int, a2,		\
+		    long int, a3, long int, a4)
 # define LOAD_REGS_4					\
-  register LOAD_ARG4_TYPE _a4 asm ("r10") = __arg4;	\
-  LOAD_REGS_3
-# define ASM_ARGS_4	ASM_ARGS_3, "r" (_a4)
-
+  LOAD_REGS_TYPE_4 (long int, long int, long int,	\
+		    long int)
+
+# define LOAD_ARGS_TYPE_5(t1, a1, t2, a2, t3, a3, t4, a4, t5, a5) \
+  t5 __arg5 = (t5) (a5);				\
+  LOAD_ARGS_TYPE_4 (t1, a1, t2, a2, t3, a3, t4, a4)
+# define LOAD_REGS_TYPE_5(t1, t2, t3, t4, t5)		\
+  register t5 _a5 asm ("r8") = __arg5;			\
+  LOAD_REGS_TYPE_4(t1, t2, t3, t4)
+# define ASM_ARGS_5	ASM_ARGS_4, "r" (_a5)
 # define LOAD_ARGS_5(a1, a2, a3, a4, a5)		\
-  LOAD_ARG5_TYPE __arg5 = (LOAD_ARG5_TYPE) (a5);	\
-  LOAD_ARGS_4 (a1, a2, a3, a4)
+  LOAD_ARGS_TYPE_5 (long int, a1, long int, a2,		\
+		    long int, a3, long int, a4,		\
+		    long int, a5)
 # define LOAD_REGS_5					\
-  register LOAD_ARG5_TYPE _a5 asm ("r8") = __arg5;	\
-  LOAD_REGS_4
-# define ASM_ARGS_5	ASM_ARGS_4, "r" (_a5)
-
+  LOAD_REGS_TYPE_5 (long int, long int, long int,	\
+		    long int, long int)
+
+# define LOAD_ARGS_TYPE_6(t1, a1, t2, a2, t3, a3, t4, a4, t5, a5, t6, a6) \
+  t6 __arg6 = (t6) (a6);				\
+  LOAD_ARGS_TYPE_5 (t1, a1, t2, a2, t3, a3, t4, a4, t5, a5)
+# define LOAD_REGS_TYPE_6(t1, t2, t3, t4, t5, t6)	\
+  register t6 _a6 asm ("r9") = __arg6;	\
+  LOAD_REGS_TYPE_5(t1, t2, t3, t4, t5)
+# define ASM_ARGS_6	ASM_ARGS_5, "r" (_a6)
 # define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6)		\
-  LOAD_ARG6_TYPE __arg6 = (LOAD_ARG6_TYPE) (a6);	\
-  LOAD_ARGS_5 (a1, a2, a3, a4, a5)
+  LOAD_ARGS_TYPE_6 (long int, a1, long int, a2,		\
+		    long int, a3, long int, a4,		\
+		    long int, a5, long int, a6)
 # define LOAD_REGS_6					\
-  register LOAD_ARG6_TYPE _a6 asm ("r9") = __arg6;	\
-  LOAD_REGS_5
-# define ASM_ARGS_6	ASM_ARGS_5, "r" (_a6)
+  LOAD_REGS_TYPE_6 (long int, long int, long int,	\
+		    long int, long int, long int)
 
 #endif	/* __ASSEMBLER__ */
 
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c b/sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c
index c4783c7..104ef89 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c
@@ -7,9 +7,13 @@
    int fallocate(int fd, int mode, off_t offset, off_t len);
  */
 
-#undef LOAD_ARG3_TYPE
-#define LOAD_ARG3_TYPE long long int
-#undef LOAD_ARG4_TYPE
-#define LOAD_ARG4_TYPE long long int
+#undef LOAD_ARGS_4
+#define LOAD_ARGS_4(a1, a2, a3, a4)			\
+  LOAD_ARGS_TYPE_4 (long int, a1, long int, a2,		\
+		    long long int, a3, long long int, a4)
+#undef LOAD_REGS_4
+#define LOAD_REGS_4					\
+  LOAD_REGS_TYPE_4 (long int, long int, long long int,	\
+		    long long int)
 
 #include <sysdeps/unix/sysv/linux/wordsize-64/posix_fallocate.c>

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b78d53e515f2b1fdad096769334ae5d677a7c3fe

commit b78d53e515f2b1fdad096769334ae5d677a7c3fe
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon May 21 16:27:05 2012 -0700

    Swap x32 llseek.S with lseek.S

diff --git a/ChangeLog.x32 b/ChangeLog.x32
index 28f4120..b387885 100644
--- a/ChangeLog.x32
+++ b/ChangeLog.x32
@@ -1,5 +1,11 @@
 2012-05-21  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* sysdeps/unix/sysv/linux/x86_64/x32/llseek.S: Renamed to ...
+	* sysdeps/unix/sysv/linux/x86_64/x32/lseek.S: This.
+	* sysdeps/unix/sysv/linux/x86_64/x32/llseek.S: New dummy file.
+
+2012-05-21  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_SET_ERRNO): Use
 	"neg %eax".
 	(SYSCALL_ERROR_HANDLER): Replace "jmp L(pseudo_end)" with "ret".
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/llseek.S b/sysdeps/unix/sysv/linux/x86_64/x32/llseek.S
index bec302e..5084d0e 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/llseek.S
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/llseek.S
@@ -1,43 +1 @@
-/* The lseek system call with 64-bit offset.  Linux/x32 version.
-   Copyright (C) 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sysdep-cancel.h>
-
-/* Return -1LL in a full 64 bits.  */
-#undef SYSCALL_ERROR_HANDLER
-#define SYSCALL_ERROR_HANDLER	\
-0:				\
-	SYSCALL_SET_ERRNO;	\
-	orq $-1, %rax;		\
-	ret;
-
-/* Always use our own error handler.  */
-#undef SYSCALL_ERROR_LABEL
-#define SYSCALL_ERROR_LABEL 0f
-
-PSEUDO (__libc_lseek64, lseek, 3)
-	ret
-PSEUDO_END (__libc_lseek64)
-
-weak_alias (__libc_lseek64, __lseek64)
-libc_hidden_weak (__lseek64)
-weak_alias (__libc_lseek64, lseek64)
-libc_hidden_weak (lseek64)
-weak_alias (__libc_lseek64, __lseek)
-libc_hidden_weak (__lseek)
-weak_alias (__libc_lseek64, lseek)
+/* No llseek for x32.  */
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/lseek.S b/sysdeps/unix/sysv/linux/x86_64/x32/lseek.S
index eb976ee..bec302e 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/lseek.S
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/lseek.S
@@ -1,2 +1,43 @@
-/* Need this dummy file since make-syscalls.sh doesn't know that the
-   lseek system call number is used by llseek.S.  */
+/* The lseek system call with 64-bit offset.  Linux/x32 version.
+   Copyright (C) 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <sysdep-cancel.h>
+
+/* Return -1LL in a full 64 bits.  */
+#undef SYSCALL_ERROR_HANDLER
+#define SYSCALL_ERROR_HANDLER	\
+0:				\
+	SYSCALL_SET_ERRNO;	\
+	orq $-1, %rax;		\
+	ret;
+
+/* Always use our own error handler.  */
+#undef SYSCALL_ERROR_LABEL
+#define SYSCALL_ERROR_LABEL 0f
+
+PSEUDO (__libc_lseek64, lseek, 3)
+	ret
+PSEUDO_END (__libc_lseek64)
+
+weak_alias (__libc_lseek64, __lseek64)
+libc_hidden_weak (__lseek64)
+weak_alias (__libc_lseek64, lseek64)
+libc_hidden_weak (lseek64)
+weak_alias (__libc_lseek64, __lseek)
+libc_hidden_weak (__lseek)
+weak_alias (__libc_lseek64, lseek)

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=26bdda2ca114ed886dc8c0d04a13642dfc64f303

commit 26bdda2ca114ed886dc8c0d04a13642dfc64f303
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon May 21 15:05:53 2012 -0700

    Use "neg %eax"/peplace "jmp L(pseudo_end)" with "ret"

diff --git a/ChangeLog.x32 b/ChangeLog.x32
index 988d242..28f4120 100644
--- a/ChangeLog.x32
+++ b/ChangeLog.x32
@@ -1,5 +1,11 @@
 2012-05-21  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_SET_ERRNO): Use
+	"neg %eax".
+	(SYSCALL_ERROR_HANDLER): Replace "jmp L(pseudo_end)" with "ret".
+
+2012-05-21  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_SET_ERRNO): Remove
 	trailing `;'.
 	(SYSCALL_ERROR_HANDLER): Add `;' after SYSCALL_SET_ERRNO.
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
index 09ed7e3..0203f07 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
@@ -115,9 +115,8 @@
 # if defined PIC && defined RTLD_PRIVATE_ERRNO
 #  define SYSCALL_SET_ERRNO			\
   lea rtld_errno(%rip), %RCX_LP;		\
-  xorl %edx, %edx;				\
-  sub %RAX_LP, %RDX_LP;				\
-  movl %edx, (%rcx)
+  neg %eax;					\
+  movl %eax, (%rcx)
 # else
 #  ifndef NOT_IN_libc
 #   define SYSCALL_ERROR_ERRNO __libc_errno
@@ -126,9 +125,8 @@
 #  endif
 #  define SYSCALL_SET_ERRNO			\
   movq SYSCALL_ERROR_ERRNO@GOTTPOFF(%rip), %rcx;\
-  xorl %edx, %edx;				\
-  sub %RAX_LP, %RDX_LP;				\
-  movl %edx, %fs:(%rcx)
+  neg %eax;					\
+  movl %eax, %fs:(%rcx);
 # endif
 
 # ifndef PIC
@@ -138,7 +136,7 @@
 0:						\
   SYSCALL_SET_ERRNO;				\
   or $-1, %RAX_LP;				\
-  jmp L(pseudo_end);
+  ret;
 # endif	/* PIC */
 
 /* The Linux/x86-64 kernel expects the system call parameters in

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c7731fea2ba8ba903ef7a3f9738ed36c749ac143

commit c7731fea2ba8ba903ef7a3f9738ed36c749ac143
Merge: b857321 bbb3154
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon May 21 14:55:45 2012 -0700

    Merge remote-tracking branch 'origin/master' into hjl/x32/master


http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b857321df5b1162dfb573d2b77268d2596d370ac

commit b857321df5b1162dfb573d2b77268d2596d370ac
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon May 21 14:55:08 2012 -0700

    Remove trailing `;' from SYSCALL_SET_ERRNO

diff --git a/ChangeLog.x32 b/ChangeLog.x32
index 4b01569..988d242 100644
--- a/ChangeLog.x32
+++ b/ChangeLog.x32
@@ -1,5 +1,13 @@
 2012-05-21  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_SET_ERRNO): Remove
+	trailing `;'.
+	(SYSCALL_ERROR_HANDLER): Add `;' after SYSCALL_SET_ERRNO.
+	* sysdeps/unix/sysv/linux/x86_64/x32/llseek.S (SYSCALL_ERROR_HANDLER):
+	Likewise.
+
+2012-05-21  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* sysdeps/unix/sysv/linux/x86_64/x32/nptl/libc.abilist: Updated.
 
 2012-05-19  H.J. Lu  <hongjiu.lu@intel.com>
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
index 5cecc57..09ed7e3 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
@@ -117,7 +117,7 @@
   lea rtld_errno(%rip), %RCX_LP;		\
   xorl %edx, %edx;				\
   sub %RAX_LP, %RDX_LP;				\
-  movl %edx, (%rcx);
+  movl %edx, (%rcx)
 # else
 #  ifndef NOT_IN_libc
 #   define SYSCALL_ERROR_ERRNO __libc_errno
@@ -128,7 +128,7 @@
   movq SYSCALL_ERROR_ERRNO@GOTTPOFF(%rip), %rcx;\
   xorl %edx, %edx;				\
   sub %RAX_LP, %RDX_LP;				\
-  movl %edx, %fs:(%rcx);
+  movl %edx, %fs:(%rcx)
 # endif
 
 # ifndef PIC
@@ -136,7 +136,7 @@
 # else
 #  define SYSCALL_ERROR_HANDLER			\
 0:						\
-  SYSCALL_SET_ERRNO				\
+  SYSCALL_SET_ERRNO;				\
   or $-1, %RAX_LP;				\
   jmp L(pseudo_end);
 # endif	/* PIC */
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/llseek.S b/sysdeps/unix/sysv/linux/x86_64/x32/llseek.S
index 85f4d70..bec302e 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/llseek.S
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/llseek.S
@@ -22,7 +22,7 @@
 #undef SYSCALL_ERROR_HANDLER
 #define SYSCALL_ERROR_HANDLER	\
 0:				\
-	SYSCALL_SET_ERRNO	\
+	SYSCALL_SET_ERRNO;	\
 	orq $-1, %rax;		\
 	ret;
 

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

Summary of changes:
 ChangeLog                                          |   68 ++++++++
 ChangeLog.x32                                      |  119 ++++++++++++++
 Makerules                                          |   14 --
 NEWS                                               |    9 +-
 configure                                          |    7 +
 configure.in                                       |    7 +
 localedata/ChangeLog                               |    6 +
 localedata/SUPPORTED                               |    1 +
 localedata/locales/mag_IN                          |  168 ++++++++++++++++++++
 sysdeps/unix/make-syscalls.sh                      |    4 +-
 sysdeps/unix/sysv/linux/Makefile                   |    4 +-
 sysdeps/unix/sysv/linux/i386/sysdep.h              |   15 +-
 sysdeps/unix/sysv/linux/sysctl.mk                  |    3 +
 .../unix/sysv/linux/wordsize-64/posix_fallocate.c  |    6 +
 sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h        |    3 +-
 sysdeps/unix/sysv/linux/x86_64/sys/sysctl.h        |   75 +++++++++
 sysdeps/unix/sysv/linux/x86_64/sysdep.h            |  156 ++++++++++++------
 sysdeps/unix/sysv/linux/x86_64/x32/arch_prctl.c    |   18 +--
 sysdeps/unix/sysv/linux/x86_64/x32/llseek.S        |   44 +-----
 sysdeps/unix/sysv/linux/x86_64/x32/lseek.S         |   45 +++++-
 .../unix/sysv/linux/x86_64/x32/posix_fallocate.c   |   15 --
 sysdeps/unix/sysv/linux/x86_64/x32/ptrace.c        |  107 -------------
 sysdeps/unix/sysv/linux/x86_64/x32/sysctl.c        |    1 -
 sysdeps/unix/sysv/linux/x86_64/x32/sysctl.mk       |    4 +
 time/mktime.c                                      |    4 +-
 25 files changed, 638 insertions(+), 265 deletions(-)
 create mode 100644 localedata/locales/mag_IN
 create mode 100644 sysdeps/unix/sysv/linux/sysctl.mk
 create mode 100644 sysdeps/unix/sysv/linux/x86_64/sys/sysctl.h
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/x32/posix_fallocate.c
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/x32/ptrace.c
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/x32/sysctl.c
 create mode 100644 sysdeps/unix/sysv/linux/x86_64/x32/sysctl.mk


hooks/post-receive
-- 
GNU C Library master sources


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