[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r22576 - in /fsf/trunk/libc: ./ io/ ports/ ports/sysdeps/arm/ ports/sysdeps/arm/armv6t2/ ports/sysdeps/unix/arm/ ports/sysde...
- To: commits@xxxxxxxxxx
- Subject: [Commits] r22576 - in /fsf/trunk/libc: ./ io/ ports/ ports/sysdeps/arm/ ports/sysdeps/arm/armv6t2/ ports/sysdeps/unix/arm/ ports/sysde...
- From: eglibc@xxxxxxxxxx
- Date: Thu, 07 Mar 2013 00:01:58 -0000
Author: eglibc
Date: Thu Mar 7 00:01:57 2013
New Revision: 22576
Log:
Import glibc-mainline for 2013-03-07
Added:
fsf/trunk/libc/ports/sysdeps/arm/add_n.S
fsf/trunk/libc/ports/sysdeps/arm/addmul_1.S
fsf/trunk/libc/ports/sysdeps/arm/armv6t2/ffs.S
fsf/trunk/libc/ports/sysdeps/arm/armv6t2/ffsll.S
fsf/trunk/libc/ports/sysdeps/arm/sub_n.S
fsf/trunk/libc/ports/sysdeps/arm/submul_1.S
Removed:
fsf/trunk/libc/sysdeps/generic/bp-sym.h
fsf/trunk/libc/sysdeps/powerpc/powerpc64/bp-asm.h
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/NEWS
fsf/trunk/libc/io/fcntl.h
fsf/trunk/libc/ports/ChangeLog.alpha
fsf/trunk/libc/ports/ChangeLog.arm
fsf/trunk/libc/ports/ChangeLog.hppa
fsf/trunk/libc/ports/ChangeLog.ia64
fsf/trunk/libc/ports/ChangeLog.m68k
fsf/trunk/libc/ports/ChangeLog.mips
fsf/trunk/libc/ports/sysdeps/arm/__longjmp.S
fsf/trunk/libc/ports/sysdeps/arm/arm-mcount.S
fsf/trunk/libc/ports/sysdeps/arm/crti.S
fsf/trunk/libc/ports/sysdeps/arm/crtn.S
fsf/trunk/libc/ports/sysdeps/arm/dl-machine.h
fsf/trunk/libc/ports/sysdeps/arm/dl-tlsdesc.S
fsf/trunk/libc/ports/sysdeps/arm/dl-trampoline.S
fsf/trunk/libc/ports/sysdeps/arm/memcpy.S
fsf/trunk/libc/ports/sysdeps/arm/memmove.S
fsf/trunk/libc/ports/sysdeps/arm/start.S
fsf/trunk/libc/ports/sysdeps/arm/sysdep.h
fsf/trunk/libc/ports/sysdeps/unix/arm/sysdep.S
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/alpha/bits/mman.h
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/alpha/bits/msq.h
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/bits/mman.h
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/clone.S
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/mmap.S
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/mmap64.S
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/vfork.S
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/syscall.S
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/sysdep.h
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/vfork.S
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/generic/bits/msq.h
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/mman.h
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/msq.h
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/bits/msq.h
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/bits/msq.h
fsf/trunk/libc/stdio-common/vfprintf.c
fsf/trunk/libc/sysdeps/powerpc/powerpc64/__longjmp-common.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/a2/memcpy.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/cell/memcpy.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/memcpy.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/memset.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power4/memcmp.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power4/memcpy.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power4/memset.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power4/strncmp.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power6/memcpy.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power6/memset.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/memchr.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/memcmp.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/memcpy.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/mempcpy.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/memrchr.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/memset.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/rawmemchr.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/strcasecmp.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/strchr.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/strchrnul.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/strlen.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/strncmp.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/strnlen.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/setjmp-common.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/start.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/stpcpy.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/strchr.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/strcmp.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/strcpy.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/strlen.S
fsf/trunk/libc/sysdeps/powerpc/powerpc64/strncmp.S
fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/mman-linux.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/bits/msq.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/internal_statvfs.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/linux_fsinfo.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/pathconf.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/msq.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S
fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/mman.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/bits/msq.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/s390/sys/ptrace.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/msq.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/sys/ptrace.h
fsf/trunk/libc/sysdeps/unix/sysv/linux/x86/bits/msq.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Thu Mar 7 00:01:57 2013
@@ -1,3 +1,202 @@
+2013-03-06 Patsy Franklin <pfrankli@xxxxxxxxxx>
+
+ * io/fcntl.h: Added a comment about AT_EACCESS and AT_REMOVEDIR.
+
+2013-03-06 Andreas Jaeger <aj@xxxxxxx>
+
+ * sysdeps/unix/sysv/linux/bits/mman-linux.h (MAP_ANONYMOUS): Allow
+ definition via __MAP_ANONYMOUS.
+
+ * sysdeps/unix/sysv/linux/s390/bits/mman.h (MAP_GROWSUP): Remove,
+ it's not part of Linux headers.
+
+ * sysdeps/unix/sysv/linux/bits/mman-linux.h (MAP_HUGE_SHIFT): Define.
+ (MAP_HUGE_MASK): Define.
+
+ * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h (PTRACE_O_EXIT_KILL):
+ Define.
+ (PTRACE_O_MASK): Adjust for PTRACE_O_EXITKILL.
+ * sysdeps/unix/sysv/linux/s390/sys/ptrace.h (PTRACE_O_EXIT_KILL):
+ Define.
+ (PTRACE_O_MASK): Adjust for PTRACE_O_EXITKILL.
+ * sysdeps/unix/sysv/linux/sys/ptrace.h (PTRACE_O_EXIT_KILL):
+ Define.
+ (PTRACE_O_MASK): Adjust for PTRACE_O_EXITKILL.
+ * sysdeps/unix/sysv/linux/sparc/sys/ptrace.h (PTRACE_O_EXITKILL):
+ Define.
+ (PTRACE_O_MASK): Adjust for PTRACE_O_EXITKILL.
+
+ * sysdeps/unix/sysv/linux/x86/bits/msq.h (MSG_COPY): Likewise.
+ * sysdeps/unix/sysv/linux/generic/bits/msq.h (MSG_COPY): Define.
+ * sysdeps/unix/sysv/linux/powerpc/bits/msq.h (MSG_COPY): Likewise.
+ * sysdeps/unix/sysv/linux/bits/msq.h (MSG_COPY): Likewise.
+ * sysdeps/unix/sysv/linux/s390/bits/msq.h (MSG_COPY): Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/msq.h (MSG_COPY): Define.
+
+ * sysdeps/unix/sysv/linux/pathconf.c (__statfs_filesize_max):
+ Handle f2fs.
+
+ * sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags):
+ Handle f2fs and efivarfs.
+
+ * sysdeps/unix/sysv/linux/pathconf.c (__statfs_link_max): Handle
+ f2fs.
+
+ * sysdeps/unix/sysv/linux/linux_fsinfo.h (F2FS_SUPER_MAGIC): Add.
+ (EFIVARFS_MAGIC): Add.
+ (F2FS_LINK_MAX): Add.
+
+2013-03-06 Paul Pluzhnikov <ppluzhnikov@xxxxxxxxxx>
+
+ * stdio-common/vfprintf.c: Replace __builtin_expect with
+ __glibc_unlikely.
+
+2013-03-06 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ [BZ #13550]
+ * sysdeps/generic/bp-sym.h: Remove file.
+ * sysdeps/powerpc/powerpc64/bp-asm.h: Likewise.
+ * sysdeps/powerpc/powerpc64/__longjmp-common.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (__longjmp): Don't use BP_SYM.
+ * sysdeps/powerpc/powerpc64/a2/memcpy.S: Don't include <bp-sym.h>
+ and <bp-asm.h>.
+ (memcpy): Don't use BP_SYM.
+ * sysdeps/powerpc/powerpc64/cell/memcpy.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (memcpy): Don't use BP_SYM.
+ * sysdeps/powerpc/powerpc64/memcpy.S: Don't include <bp-sym.h> and
+ <bp-asm.h>.
+ (memcpy): Don't use BP_SYM.
+ * sysdeps/powerpc/powerpc64/memset.S: Don't include <bp-sym.h> and
+ <bp-asm.h>.
+ (memset): Don't use BP_SYM.
+ (memset) [__BOUNDED_POINTERS__]: Remove conditional code.
+ (memset) [!__BOUNDED_POINTERS__]: Make code unconditional.
+ (__bzero): Don't use BP_SYM.
+ (__bzero) [__BOUNDED_POINTERS__]: Remove conditional code.
+ (__bzero) [!__BOUNDED_POINTERS__]: Make code unconditional.
+ * sysdeps/powerpc/powerpc64/power4/memcmp.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (memcmp): Don't use BP_SYM. Remove comment about bounded
+ pointers.
+ * sysdeps/powerpc/powerpc64/power4/memcpy.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (memcpy): Don't use BP_SYM.
+ * sysdeps/powerpc/powerpc64/power4/memset.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (memset): Don't use BP_SYM.
+ (memset) [__BOUNDED_POINTERS__]: Remove conditional code.
+ (memset) [!__BOUNDED_POINTERS__]: Make code unconditional.
+ (__bzero): Don't use BP_SYM.
+ (__bzero) [__BOUNDED_POINTERS__]: Remove conditional code.
+ (__bzero) [!__BOUNDED_POINTERS__]: Make code unconditional.
+ * sysdeps/powerpc/powerpc64/power4/strncmp.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (strncmp): Don't use BP_SYM. Remove comment about bounded
+ pointers.
+ * sysdeps/powerpc/powerpc64/power6/memcpy.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (memcpy): Don't use BP_SYM.
+ * sysdeps/powerpc/powerpc64/power6/memset.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (memset): Don't use BP_SYM.
+ (memset) [__BOUNDED_POINTERS__]: Remove conditional code.
+ (memset) [!__BOUNDED_POINTERS__]: Make code unconditional.
+ (__bzero): Don't use BP_SYM.
+ (__bzero) [__BOUNDED_POINTERS__]: Remove conditional code.
+ (__bzero) [!__BOUNDED_POINTERS__]: Make code unconditional.
+ * sysdeps/powerpc/powerpc64/power7/memchr.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (__memchr): Don't use BP_SYM.
+ * sysdeps/powerpc/powerpc64/power7/memcmp.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (memcmp): Don't use BP_SYM. Remove comment about bounded
+ pointers.
+ * sysdeps/powerpc/powerpc64/power7/memcpy.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (memcpy): Don't use BP_SYM.
+ * sysdeps/powerpc/powerpc64/power7/mempcpy.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (__mempcpy): Don't use BP_SYM.
+ * sysdeps/powerpc/powerpc64/power7/memrchr.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (__memrchr): Don't use BP_SYM.
+ * sysdeps/powerpc/powerpc64/power7/memset.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (memset): Don't use BP_SYM.
+ (__bzero): Likewise.
+ * sysdeps/powerpc/powerpc64/power7/rawmemchr.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (__rawmemchr): Don't use BP_SYM.
+ * sysdeps/powerpc/powerpc64/power7/strcasecmp.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (__STRCMP): Don't use BP_SYM.
+ * sysdeps/powerpc/powerpc64/power7/strchr.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (strchr): Don't use BP_SYM.
+ * sysdeps/powerpc/powerpc64/power7/strchrnul.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (__strchrnul): Don't use BP_SYM.
+ * sysdeps/powerpc/powerpc64/power7/strlen.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (strlen): Don't use BP_SYM.
+ * sysdeps/powerpc/powerpc64/power7/strncmp.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (strncmp): Don't use BP_SYM. Remove comment about bounded
+ pointers.
+ * sysdeps/powerpc/powerpc64/power7/strnlen.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (__strnlen): Don't use BP_SYM.
+ * sysdeps/powerpc/powerpc64/setjmp-common.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (__GI__setjmp): Don't use BP_SYM.
+ (_setjmp): Likewise.
+ (__sigsetjmp): Likewise.
+ * sysdeps/powerpc/powerpc64/start.S: Don't include "bp-sym.h".
+ (L(start_addresses)): Don't use BP_SYM.
+ (_start): Likewise.
+ * sysdeps/powerpc/powerpc64/stpcpy.S: Don't include <bp-sym.h> and
+ <bp-asm.h>.
+ (__stpcpy): Don't use BP_SYM, CHECK_BOUNDS_LOW,
+ STORE_RETURN_BOUNDS, CHECK_BOUNDS_HIGH and STORE_RETURN_VALUE.
+ (__stpcpy) [__BOUNDED_POINTERS__]: Remove conditional code.
+ (__stpcpy) [!__BOUNDED_POINTERS__]: Make code unconditional.
+ * sysdeps/powerpc/powerpc64/strchr.S: Don't include <bp-sym.h> and
+ <bp-asm.h>.
+ (strchr): Don't use BP_SYM, CHECK_BOUNDS_LOW, STORE_RETURN_BOUNDS,
+ CHECK_BOUNDS_HIGH_RTN and STORE_RETURN_VALUE. Remove comment
+ about bounded pointers.
+ (strchr) [__BOUNDED_POINTERS__]: Remove conditional code.
+ (strchr) [!__BOUNDED_POINTERS__]: Make code unconditional.
+ * sysdeps/powerpc/powerpc64/strcmp.S: Don't include <bp-sym.h> and
+ <bp-asm.h>.
+ (strcmp): Don't use BP_SYM and CHECK_BOUNDS_LOW. Remove comment
+ about bounded pointers. Remove GKM FIXME comments.
+ (strcmp) [__BOUNDED_POINTERS__]: Remove conditional code.
+ * sysdeps/powerpc/powerpc64/strcpy.S: Don't include <bp-sym.h> and
+ <bp-asm.h>.
+ (strcpy): Don't use BP_SYM, CHECK_BOUNDS_LOW and
+ STORE_RETURN_BOUNDS. Remove comment about bounded pointers.
+ Remove GKM FIXME comments.
+ (strcpy) [__BOUNDED_POINTERS__]: Remove conditional code.
+ (strcpy) [!__BOUNDED_POINTERS__]: Make code unconditional.
+ * sysdeps/powerpc/powerpc64/strlen.S: Don't include <bp-sym.h> and
+ <bp-asm.h>.
+ (strlen): Don't use BP_SYM and CHECK_BOUNDS_LOW. Remove comment
+ about bounded pointers. Remove GKM FIXME comment.
+ * sysdeps/powerpc/powerpc64/strncmp.S: Don't include <bp-sym.h>
+ and <bp-asm.h>.
+ (strncmp): Don't use BP_SYM. Remove comment about bounded
+ pointers.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (__brk): Don't use BP_SYM and DISCARD_BOUNDS.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Don't include
+ <bp-sym.h> and <bp-asm.h>.
+ (__clone): Don't use BP_SYM and DISCARD_BOUNDS. Remove GKM FIXME
+ comment.
+
2013-03-05 Paul Pluzhnikov <ppluzhnikov@xxxxxxxxxx>
* stdio-common/vfprintf.c (vfprintf): Check malloc return; don't
@@ -29,6 +228,7 @@
2013-03-05 Andreas Krebbel <Andreas.Krebbel@xxxxxxxxxx>
+ [BZ #15232]
* sysdeps/s390/s390-32/multiarch/ifunc-resolve.c: Use
attribute_hidden.
* sysdeps/s390/s390-64/multiarch/ifunc-resolve.c: Likewise.
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Thu Mar 7 00:01:57 2013
@@ -9,9 +9,9 @@
* The following bugs are resolved with this release:
- 11561, 13951, 14142, 14200, 14317, 14327, 14496, 14920, 14964, 14981,
- 14982, 14985, 14994, 14996, 15003, 15006, 15020, 15023, 15036, 15054,
- 15055, 15062, 15078, 15160.
+ 11561, 13550, 13951, 14142, 14200, 14317, 14327, 14496, 14920, 14964,
+ 14981, 14982, 14985, 14994, 14996, 15003, 15006, 15020, 15023, 15036,
+ 15054, 15055, 15062, 15078, 15160, 15232.
* Add support for calling C++11 thread_local object destructors on thread
and program exit. This needs compiler support for offloading C++11
Modified: fsf/trunk/libc/io/fcntl.h
==============================================================================
--- fsf/trunk/libc/io/fcntl.h (original)
+++ fsf/trunk/libc/io/fcntl.h Thu Mar 7 00:01:57 2013
@@ -129,6 +129,12 @@
# define SEEK_END 2 /* Seek from end of file. */
#endif /* XPG */
+/* The constants AT_REMOVEDIR and AT_EACCESS have the same value. AT_EASSESS
+ is meaningful only to faccessat, while AT_REMOVEDIR is meaningful only to
+ unlinkat. The two functions do completely different things and therefore,
+ the flags can be allowed to overlap. For example, passing AT_REMOVEDIR to
+ faccessat would be undefined behavior and thus treating it equivalent to
+ AT_EACCESS is valid undefined behavior. */
#ifdef __USE_ATFILE
# define AT_FDCWD -100 /* Special value used to indicate
the *at functions should use the
Modified: fsf/trunk/libc/ports/ChangeLog.alpha
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.alpha (original)
+++ fsf/trunk/libc/ports/ChangeLog.alpha Thu Mar 7 00:01:57 2013
@@ -1,3 +1,9 @@
+2013-03-06 Andreas Jaeger <aj@xxxxxxx>
+
+ * sysdeps/unix/sysv/linux/alpha/bits/mman.h (MAP_HUGE_MASK)
+ (MAP_HUGE_SHIFT): Define.
+ * sysdeps/unix/sysv/linux/alpha/bits/msq.h (MSG_COPY): Define.
+
2013-02-19 Richard Henderson <rth@xxxxxxxxxx>
[BZ #14920]
Modified: fsf/trunk/libc/ports/ChangeLog.arm
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.arm (original)
+++ fsf/trunk/libc/ports/ChangeLog.arm Thu Mar 7 00:01:57 2013
@@ -1,3 +1,99 @@
+2013-03-06 Richard Henderson <rth@xxxxxxxxxx>
+
+ * sysdeps/arm/add_n.S: New file.
+ * sysdeps/arm/sub_n.S: New file.
+ * sysdeps/arm/submul_1.S: New file.
+ * sysdeps/arm/addmul_1.S: New file.
+ * sysdeps/arm/armv6t2/ffs.S: New file.
+ * sysdeps/arm/armv6t2/ffsll.S: New file.
+
+ * sysdeps/arm/sysdep.h (ARCH_HAS_HARD_TP): New macro.
+ (GET_TLS): Use hard-tp if ARCH_HAS_HARD_TP.
+ * sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S: Likewise.
+ * sysdeps/unix/sysv/linux/arm/sysdep.h (GET_TLS): Don't override
+ the default definition if ARCH_HAS_HARD_TP.
+
+ * sysdeps/arm/sysdep.h (__ARM_ARCH): New macro.
+ (ARCH_HAS_BX, ARCH_HAS_BLX, ARCH_HAS_T2): New macros.
+ (BX): Select on ARCH_HAS_BX instead of __USE_BX__.
+ (BLX): Select on ARCH_HAS_BLX instead of __ARM_ARCH_4T__.
+ * ports/sysdeps/arm/dl-machine.h (BX): Select on ARCH_HAS_BX
+ instead of __USE_BX__.
+
+ * sysdeps/arm/arm-mcount.S (_mcount): Use pop into pc unless
+ __ARM_ARCH_4T__ and __THUMB_INTERWORK__.
+ * sysdeps/arm/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Likewise.
+
+ * sysdeps/arm/sysdep.h (BX, BXC, BLX): New macros.
+ (DO_RET): Use BX.
+ (RETINSTR): Use BXC.
+ * sysdeps/arm/dl-tlsdesc.S (BX): Remove.
+ * sysdeps/arm/dl-trampoline.S (BX): Remove.
+ (_dl_runtime_profile): Use BLX.
+
+ * sysdeps/arm/__longjmp.S (__longjmp): Use ldmia insn directly.
+ * sysdeps/arm/sysdep.h (LOADREGS): Remove.
+
+ * sysdeps/arm/arm-mcount.S (_mcount): Use push/pop mnemonics.
+ * sysdeps/arm/crti.S, sysdeps/arm/crtn.S: Likewise.
+ * sysdeps/arm/dl-tlsdesc.S: Likewise.
+ * sysdeps/arm/dl-trampoline.S: Likewise.
+ * sysdeps/arm/start.S: Likewise.
+ * sysdeps/arm/memcpy.S (PULL): Rename macro from pull.
+ (PUSH): Rename macro from push.
+ (memcpy): Use push/pop mnemonics.
+ * sysdeps/arm/memmove.S: Similarly.
+ * sysdeps/arm/sysdep.h (CALL_MCOUNT): Use push/pop mnemonics.
+ * sysdeps/unix/sysv/linux/arm/____longjmp_chk.S: Likewise.
+ * sysdeps/unix/sysv/linux/arm/clone.S: Likewise.
+ * sysdeps/unix/sysv/linux/arm/mmap.S: Likewise.
+ * sysdeps/unix/sysv/linux/arm/mmap64.S: Likewise.
+ * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h: Likewise.
+ * sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c: Likewise.
+ * sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c: Likewise.
+ * sysdeps/unix/sysv/linux/arm/syscall.S: Likewise.
+ * sysdeps/unix/sysv/linux/arm/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/arm/vfork.S: Likewise.
+
+ * sysdeps/arm/sysdep.h [__ASSEMBLER__]: Enable thumb2 if __thumb2__.
+ (PC_OFS): Respect __thumb__ if __ASSEMBLER__.
+
+ * sysdeps/arm/sysdep.h (GET_TLS): New macro.
+ * sysdeps/arm/dl-tlsdesc.S (_dl_tlsdesc_undefweak): Use it.
+ (_dl_tlsdesc_dynamic): Likewise.
+ * sysdeps/unix/arm/sysdep.S (__syscall_error): Likewise.
+ * sysdeps/unix/sysv/linux/arm/sysdep.h (GET_TLS): New macro.
+ * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Likewise.
+ * sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S (SAVE_PID): Likewise.
+ * sysdeps/unix/sysv/linux/arm/nptl/vfork.S (SAVE_PID): Likewise.
+ * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (SINGLE_THREAD_P):
+ Likewise.
+ * sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S (__aeabi_read_tp):
+ Add thumb2 alternative.
+
+ * sysdeps/arm/sysdep.h (NEGOFF_ADJ_BASE): New macro.
+ (NEGOFF_ADJ_BASE2, NEGOFF_OFF1, NEGOFF_OFF2): New macros.
+ * sysdeps/unix/sysv/linux/arm/clone.S (__clone): Use them.
+ * sysdeps/unix/sysv/linux/arm/nptl/vfork.S: Likewise.
+ * sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S: Likewise.
+ * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (SINGLE_THREAD_P):
+ Likewise.
+
+ * sysdeps/arm/sysdep.h (LDST_PCREL): New macro.
+ * sysdeps/unix/arm/sysdep.S (__syscall_error): Use LDST_PCREL.
+ Fix up gottpoff load of errno for thumb2.
+ * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
+ (SINGLE_THREAD_P): Use LDST_PCREL.
+ (PSEUDO_PROLOGUE): Remove.
+ (PSEUDO): Don't use it.
+ * sysdeps/unix/sysv/linux/arm/sysdep.h (SYSCALL_ERROR_HANDLER):
+ Use LDST_PCREL.
+
+2013-03-06 Andreas Jaeger <aj@xxxxxxx>
+
+ * sysdeps/unix/sysv/linux/arm/bits/mman.h: Remove all defines
+ provided by bits/mman-linux.h and include <bits/mman-linux.h>.
+
2013-02-28 Richard Henderson <rth@xxxxxxxxxx>
* sysdeps/arm/preconfigure: Adjust scan for __ARM_ARCH_* defines.
Modified: fsf/trunk/libc/ports/ChangeLog.hppa
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.hppa (original)
+++ fsf/trunk/libc/ports/ChangeLog.hppa Thu Mar 7 00:01:57 2013
@@ -1,3 +1,9 @@
+2013-03-06 Andreas Jaeger <aj@xxxxxxx>
+
+ * sysdeps/unix/sysv/linux/hppa/bits/msq.h (MSG_COPY): Define.
+ * ports/sysdeps/unix/sysv/linux/hppa/bits/mman.h (MAP_HUGE_MASK)
+ (MAP_HUGE_SHIFT): Define.
+
2013-02-14 Carlos O'Donell <carlos@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.c
Modified: fsf/trunk/libc/ports/ChangeLog.ia64
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.ia64 (original)
+++ fsf/trunk/libc/ports/ChangeLog.ia64 Thu Mar 7 00:01:57 2013
@@ -1,3 +1,8 @@
+2013-03-06 Andreas Jaeger <aj@xxxxxxx>
+
+ * sysdeps/unix/sysv/linux/ia64/bits/msq.h (MSG_COPY): Define.
+ (MSG_EXCEPT): Make conditional on __USE_GNU.
+
2013-02-18 Siddhesh Poyarekar <siddhesh@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/ia64/nptl/libc.abilist: Add
Modified: fsf/trunk/libc/ports/ChangeLog.m68k
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.m68k (original)
+++ fsf/trunk/libc/ports/ChangeLog.m68k Thu Mar 7 00:01:57 2013
@@ -1,3 +1,8 @@
+2013-03-06 Andreas Jaeger <aj@xxxxxxx>
+
+ * sysdeps/unix/sysv/linux/m68k/bits/mman.h: Remove all defines
+ provided by bits/mman-linux.h and include <bits/mman-linux.h>.
+
2013-02-18 Siddhesh Poyarekar <siddhesh@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libc.abilist: Add
Modified: fsf/trunk/libc/ports/ChangeLog.mips
==============================================================================
--- fsf/trunk/libc/ports/ChangeLog.mips (original)
+++ fsf/trunk/libc/ports/ChangeLog.mips Thu Mar 7 00:01:57 2013
@@ -1,3 +1,11 @@
+2013-03-06 Andreas Jaeger <aj@xxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/bits/mman.h: Remove all defines
+ provided by bits/mman-linux.h and include <bits/mman-linux.h>.
+ (__MAP_ANONYMOUS): Define.
+
+ * sysdeps/unix/sysv/linux/mips/bits/msq.h (MSG_COPY): Define.
+
2013-02-27 Chung-Lin Tang <cltang@xxxxxxxxxxxxxxxx>
Maciej W. Rozycki <macro@xxxxxxxxxxxxxxxx>
Maxim Kuvyrkov <maxim@xxxxxxxxxxxxxxxx>
Modified: fsf/trunk/libc/ports/sysdeps/arm/__longjmp.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/__longjmp.S (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/__longjmp.S Thu Mar 7 00:01:57 2013
@@ -37,7 +37,7 @@
cfi_undefined (r4)
CHECK_SP (r4)
#endif
- LOADREGS(ia, ip!, {v1-v6, sl, fp, sp, lr})
+ ldmia ip!, {v1-v6, sl, fp, sp, lr}
cfi_restore (v1)
cfi_restore (v2)
cfi_restore (v3)
Added: fsf/trunk/libc/ports/sysdeps/arm/add_n.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/add_n.S (added)
+++ fsf/trunk/libc/ports/sysdeps/arm/add_n.S Thu Mar 7 00:01:57 2013
@@ -1,0 +1,84 @@
+/* mpn_add_n -- add (or subtract) bignums.
+ Copyright (C) 2013 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.h>
+
+ .syntax unified
+ .text
+
+#ifdef USE_AS_SUB_N
+# define INITC cmp r0, r0
+# define OPC sbcs
+# define RETC sbc r0, r0, r0; neg r0, r0
+# define FUNC __mpn_sub_n
+#else
+# define INITC cmn r0, #0
+# define OPC adcs
+# define RETC mov r0, #0; adc r0, r0, r0
+# define FUNC __mpn_add_n
+#endif
+
+/* mp_limb_t mpn_add_n(res_ptr, src1_ptr, src2_ptr, size) */
+
+ENTRY (FUNC)
+ push { r4, r5, r6, r7, r8, r10, lr }
+ cfi_adjust_cfa_offset (28)
+ cfi_rel_offset (r4, 0)
+ cfi_rel_offset (r5, 4)
+ cfi_rel_offset (r6, 8)
+ cfi_rel_offset (r7, 12)
+ cfi_rel_offset (r8, 16)
+ cfi_rel_offset (r10, 20)
+ cfi_rel_offset (lr, 24)
+
+ INITC /* initialize carry flag */
+ tst r3, #1 /* count & 1 == 1? */
+ add lr, r1, r3, lsl #2 /* compute end src1 */
+ beq 1f
+
+ ldr r4, [r1], #4 /* do one to make count even */
+ ldr r5, [r2], #4
+ OPC r4, r4, r5
+ teq r1, lr /* end of count? (preserve carry) */
+ str r4, [r0], #4
+ beq 9f
+1:
+ tst r3, #2 /* count & 2 == 2? */
+ beq 2f
+ ldm r1!, { r4, r5 } /* do two to make count 0 mod 4 */
+ ldm r2!, { r6, r7 }
+ OPC r4, r4, r6
+ OPC r5, r5, r7
+ teq r1, lr /* end of count? */
+ stm r0!, { r4, r5 }
+ beq 9f
+2:
+ ldm r1!, { r3, r5, r7, r10 } /* do four each loop */
+ ldm r2!, { r4, r6, r8, ip }
+ OPC r3, r3, r4
+ OPC r5, r5, r6
+ OPC r7, r7, r8
+ OPC r10, r10, ip
+ teq r1, lr
+ stm r0!, { r3, r5, r7, r10 }
+ bne 2b
+
+9:
+ RETC /* copy carry out */
+ pop { r4, r5, r6, r7, r8, r10, pc }
+END (FUNC)
Added: fsf/trunk/libc/ports/sysdeps/arm/addmul_1.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/addmul_1.S (added)
+++ fsf/trunk/libc/ports/sysdeps/arm/addmul_1.S Thu Mar 7 00:01:57 2013
@@ -1,0 +1,67 @@
+/* mpn_addmul_1 -- multiply and accumulate bignums.
+ Copyright (C) 2013 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.h>
+
+ .syntax unified
+ .text
+
+@ cycles/limb
+@ StrongArm ?
+@ Cortex-A8 ?
+@ Cortex-A9 ?
+@ Cortex-A15 4
+
+/* mp_limb_t mpn_addmul_1(res_ptr, src1_ptr, size, s2_limb) */
+
+ENTRY (__mpn_addmul_1)
+ push { r4, r5, r6, r7 }
+ cfi_adjust_cfa_offset (16)
+ cfi_rel_offset (r4, 0)
+ cfi_rel_offset (r5, 4)
+ cfi_rel_offset (r6, 8)
+ cfi_rel_offset (r7, 12)
+
+ ldr r6, [r1], #4
+ ldr r5, [r0]
+ mov r4, #0 /* init carry in */
+ b 1f
+0:
+ ldr r6, [r1], #4 /* load next ul */
+ adds r7, r4, r5 /* (out, c) = cl + lpl */
+ ldr r5, [r0, #4] /* load next rl */
+ adc r4, ip, #0 /* cl = hpl + c */
+ str r7, [r0], #4
+1:
+ mov ip, #0 /* zero-extend rl */
+ umlal r5, ip, r6, r3 /* (hpl, lpl) = ul * vl + rl */
+ subs r2, r2, #1
+ bne 0b
+
+ adds r4, r4, r5 /* (out, c) = cl + llpl */
+ str r4, [r0]
+ adc r0, ip, #0 /* return hpl + c */
+
+ pop { r4, r5, r6, r7 }
+ cfi_adjust_cfa_offset (-16)
+ cfi_restore (r4)
+ cfi_restore (r5)
+ cfi_restore (r6)
+ cfi_restore (r7)
+ DO_RET (lr)
+END (__mpn_addmul_1)
Modified: fsf/trunk/libc/ports/sysdeps/arm/arm-mcount.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/arm-mcount.S (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/arm-mcount.S Thu Mar 7 00:01:57 2013
@@ -69,7 +69,7 @@
code be compiled with APCS frame pointers. */
ENTRY(_mcount)
- stmdb sp!, {r0, r1, r2, r3, fp, lr}
+ push {r0, r1, r2, r3, fp, lr}
cfi_adjust_cfa_offset (24)
cfi_rel_offset (r0, 0)
cfi_rel_offset (r1, 4)
@@ -82,10 +82,8 @@
ldrne r0, [r0, #-4]
movsne r1, lr
blne __mcount_internal
-#ifdef __thumb2__
- ldmia sp!, {r0, r1, r2, r3, fp, pc}
-#else
- ldmia sp!, {r0, r1, r2, r3, fp, lr}
+#if defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__)
+ pop {r0, r1, r2, r3, fp, lr}
cfi_adjust_cfa_offset (-24)
cfi_restore (r0)
cfi_restore (r1)
@@ -94,6 +92,8 @@
cfi_restore (fp)
cfi_restore (lr)
bx lr
+#else
+ pop {r0, r1, r2, r3, fp, pc}
#endif
END(_mcount)
Added: fsf/trunk/libc/ports/sysdeps/arm/armv6t2/ffs.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/armv6t2/ffs.S (added)
+++ fsf/trunk/libc/ports/sysdeps/arm/armv6t2/ffs.S Thu Mar 7 00:01:57 2013
@@ -1,0 +1,35 @@
+/* ffs -- find first set bit in an int, from least significant end.
+ Copyright (C) 2013 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.h>
+
+ .syntax unified
+ .text
+
+ENTRY (__ffs)
+ cmp r0, #0
+ rbit r0, r0
+ itt ne
+ clzne r0, r0
+ addne r0, r0, #1
+ bx lr
+END (__ffs)
+
+weak_alias (__ffs, ffs)
+weak_alias (__ffs, ffsl)
+libc_hidden_builtin_def (ffs)
Added: fsf/trunk/libc/ports/sysdeps/arm/armv6t2/ffsll.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/armv6t2/ffsll.S (added)
+++ fsf/trunk/libc/ports/sysdeps/arm/armv6t2/ffsll.S Thu Mar 7 00:01:57 2013
@@ -1,0 +1,50 @@
+/* ffsll -- find first set bit in a long long, from least significant end.
+ Copyright (C) 2013 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.h>
+
+ .syntax unified
+ .text
+
+ENTRY (ffsll)
+ @ If low part is 0, operate on the high part. Ensure that the
+ @ word on which we operate is in r0. Set r2 to the bit offset
+ @ of the word being considered. Set the flags for the word
+ @ being operated on.
+#ifdef __ARMEL__
+ cmp r0, #0
+ itee ne
+ movne r2, #0
+ moveq r2, #32
+ movseq r0, r1
+#else
+ cmp r1, #0
+ ittee ne
+ movne r2, #0
+ movne r0, r1
+ moveq r2, #32
+ cmpeq r0, #0
+#endif
+ @ Perform the ffs on r0.
+ rbit r0, r0
+ ittt ne
+ clzne r0, r0
+ addne r2, r2, #1
+ addne r0, r0, r2
+ bx lr
+END (ffsll)
Modified: fsf/trunk/libc/ports/sysdeps/arm/crti.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/crti.S (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/crti.S Thu Mar 7 00:01:57 2013
@@ -80,7 +80,7 @@
.globl _init
.type _init, %function
_init:
- stmfd sp!, {r3, lr}
+ push {r3, lr}
#if PREINIT_FUNCTION_WEAK
bl call_weak_fn
#else
@@ -92,4 +92,4 @@
.globl _fini
.type _fini, %function
_fini:
- stmfd sp!, {r3, lr}
+ push {r3, lr}
Modified: fsf/trunk/libc/ports/sysdeps/arm/crtn.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/crtn.S (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/crtn.S Thu Mar 7 00:01:57 2013
@@ -42,16 +42,16 @@
.section .init,"ax",%progbits
#ifdef __ARM_ARCH_4T__
- ldmfd sp!, {r3, lr}
+ pop {r3, lr}
bx lr
#else
- ldmfd sp!, {r3, pc}
+ pop {r3, pc}
#endif
.section .fini,"ax",%progbits
#ifdef __ARM_ARCH_4T__
- ldmfd sp!, {r3, lr}
+ pop {r3, lr}
bx lr
#else
- ldmfd sp!, {r3, pc}
+ pop {r3, pc}
#endif
Modified: fsf/trunk/libc/ports/sysdeps/arm/dl-machine.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/dl-machine.h (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/dl-machine.h Thu Mar 7 00:01:57 2013
@@ -136,7 +136,7 @@
return lazy;
}
-#if defined(__USE_BX__)
+#if defined(ARCH_HAS_BX)
#define BX(x) "bx\t" #x
#else
#define BX(x) "mov\tpc, " #x
Modified: fsf/trunk/libc/ports/sysdeps/arm/dl-tlsdesc.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/dl-tlsdesc.S (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/dl-tlsdesc.S Thu Mar 7 00:01:57 2013
@@ -19,12 +19,6 @@
#include <sysdep.h>
#include <tls.h>
#include "tlsdesc.h"
-
-#ifdef __USE_BX__
- #define BX(x) bx x
-#else
- #define BX(x) mov pc, x
-#endif
.text
@ emit debug information with cfi
@@ -50,18 +44,9 @@
.fnstart
.align 2
_dl_tlsdesc_undefweak:
- @ Are we allowed a misaligned stack pointer calling read_tp?
- .save {lr}
- stmdb sp!, {lr}
- cfi_adjust_cfa_offset (4)
- cfi_rel_offset (lr,0)
- bl __aeabi_read_tp
+ GET_TLS (r1)
rsb r0, r0, #0
- ldmia sp!, {lr}
- cfi_adjust_cfa_offset (-4)
- cfi_restore (lr)
BX (lr)
-
cfi_endproc
.fnend
.size _dl_tlsdesc_undefweak, .-_dl_tlsdesc_undefweak
@@ -99,14 +84,14 @@
/* Our calling convention is to clobber r0, r1 and the processor
flags. All others that are modified must be saved */
.save {r2,r3,r4,lr}
- stmdb sp!, {r2,r3,r4,lr}
+ push {r2,r3,r4,lr}
cfi_adjust_cfa_offset (16)
cfi_rel_offset (r2,0)
cfi_rel_offset (r3,4)
cfi_rel_offset (r4,8)
cfi_rel_offset (lr,12)
ldr r1, [r0] /* td */
- bl __aeabi_read_tp
+ GET_TLS (lr)
mov r4, r0 /* r4 = tp */
ldr r0, [r0]
ldr r2, [r1, #8] /* gen_count */
@@ -124,13 +109,18 @@
1: mov r0, r1
bl __tls_get_addr
rsb r0, r4, r0
-2: ldmia sp!, {r2,r3,r4, lr}
+2:
+#if defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__)
+ pop {r2,r3,r4, lr}
cfi_adjust_cfa_offset (-16)
cfi_restore (lr)
cfi_restore (r4)
cfi_restore (r3)
cfi_restore (r2)
- BX (lr)
+ bx lr
+#else
+ pop {r2,r3,r4, pc}
+#endif
.fnend
cfi_endproc
.size _dl_tlsdesc_dynamic, .-_dl_tlsdesc_dynamic
@@ -155,7 +145,7 @@
cfi_adjust_cfa_offset (4)
cfi_rel_offset (r2, 0)
.save {r0,r1,r3,ip,lr}
- stmdb sp!, {r0, r1, r3, ip, lr}
+ push {r0, r1, r3, ip, lr}
cfi_adjust_cfa_offset (20)
cfi_rel_offset (r0, 0)
cfi_rel_offset (r1, 4)
@@ -163,14 +153,14 @@
cfi_rel_offset (ip, 12)
cfi_rel_offset (lr, 16)
bl _dl_tlsdesc_lazy_resolver_fixup
- ldmia sp!, {r0, r1, r3, ip, lr}
+ pop {r0, r1, r3, ip, lr}
cfi_adjust_cfa_offset (-20)
cfi_restore (lr)
cfi_restore (ip)
cfi_restore (r3)
cfi_restore (r1)
cfi_restore (r0)
- ldmia sp!, {r2}
+ pop {r2}
cfi_adjust_cfa_offset (-4)
cfi_restore (r2)
ldr r1, [r0, #4]
@@ -193,7 +183,7 @@
cfi_adjust_cfa_offset (4)
cfi_rel_offset (r2, 0)
.save {r0,r1,r3,ip,lr}
- stmdb sp!, {r0, r1, r3, ip, lr}
+ push {r0, r1, r3, ip, lr}
cfi_adjust_cfa_offset (20)
cfi_rel_offset (r0, 0)
cfi_rel_offset (r1, 4)
@@ -202,14 +192,14 @@
cfi_rel_offset (lr, 16)
adr r2, _dl_tlsdesc_resolve_hold
bl _dl_tlsdesc_resolve_hold_fixup
- ldmia sp!, {r0, r1, r3, ip, lr}
+ pop {r0, r1, r3, ip, lr}
cfi_adjust_cfa_offset (-20)
cfi_restore (lr)
cfi_restore (ip)
cfi_restore (r3)
cfi_restore (r1)
cfi_restore (r0)
- ldmia sp!, {r2}
+ pop {r2}
cfi_adjust_cfa_offset (-4)
cfi_restore (r2)
ldr r1, [r0, #4]
Modified: fsf/trunk/libc/ports/sysdeps/arm/dl-trampoline.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/dl-trampoline.S (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/dl-trampoline.S Thu Mar 7 00:01:57 2013
@@ -20,12 +20,6 @@
#define NO_THUMB
#include <sysdep.h>
#include <libc-symbols.h>
-
-#if defined(__USE_BX__)
-#define BX(x) bx x
-#else
-#define BX(x) mov pc, x
-#endif
.text
.globl _dl_runtime_resolve
@@ -43,7 +37,7 @@
@ lr points to &GOT[2]
@ Save arguments. We save r4 to realign the stack.
- stmdb sp!,{r0-r4}
+ push {r0-r4}
cfi_adjust_cfa_offset (20)
cfi_rel_offset (r0, 0)
cfi_rel_offset (r1, 4)
@@ -67,7 +61,7 @@
@ get arguments and return address back. We restore r4
@ only to realign the stack.
- ldmia sp!, {r0-r4,lr}
+ pop {r0-r4,lr}
cfi_adjust_cfa_offset (-24)
@ jump to the newly found address
@@ -192,8 +186,7 @@
add ip, r7, #72
ldmia ip, {r0-r3}
ldr ip, [r7, #264]
- mov lr, pc
- BX(ip)
+ BLX(ip)
stmia r7, {r0-r3}
@ Call pltexit.
Modified: fsf/trunk/libc/ports/sysdeps/arm/memcpy.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/memcpy.S (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/memcpy.S Thu Mar 7 00:01:57 2013
@@ -45,11 +45,11 @@
* Endian independent macros for shifting bytes within registers.
*/
#ifndef __ARMEB__
-#define pull lsr
-#define push lsl
+#define PULL lsr
+#define PUSH lsl
#else
-#define pull lsl
-#define push lsr
+#define PULL lsl
+#define PUSH lsr
#endif
.text
@@ -58,7 +58,7 @@
ENTRY(memcpy)
- stmfd sp!, {r0, r4, lr}
+ push {r0, r4, lr}
cfi_adjust_cfa_offset (12)
cfi_rel_offset (r4, 4)
cfi_rel_offset (lr, 8)
@@ -74,7 +74,7 @@
bne 10f
1: subs r2, r2, #(28)
- stmfd sp!, {r5 - r8}
+ push {r5 - r8}
cfi_adjust_cfa_offset (16)
cfi_rel_offset (r5, 0)
cfi_rel_offset (r6, 4)
@@ -131,7 +131,7 @@
CALGN( bcs 2b )
-7: ldmfd sp!, {r5 - r8}
+7: pop {r5 - r8}
cfi_adjust_cfa_offset (-16)
cfi_restore (r5)
cfi_restore (r6)
@@ -147,13 +147,13 @@
strcsb ip, [r0]
#if defined (__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
- ldmfd sp!, {r0, r4, lr}
+ pop {r0, r4, lr}
cfi_adjust_cfa_offset (-12)
cfi_restore (r4)
cfi_restore (lr)
bx lr
#else
- ldmfd sp!, {r0, r4, pc}
+ pop {r0, r4, pc}
#endif
cfi_restore_state
@@ -189,7 +189,7 @@
CALGN( subcc r2, r2, ip )
CALGN( bcc 15f )
-11: stmfd sp!, {r5 - r9}
+11: push {r5 - r9}
cfi_adjust_cfa_offset (20)
cfi_rel_offset (r5, 0)
cfi_rel_offset (r6, 4)
@@ -206,30 +206,30 @@
12: PLD( pld [r1, #124] )
13: ldmia r1!, {r4, r5, r6, r7}
- mov r3, lr, pull #\pull
+ mov r3, lr, PULL #\pull
subs r2, r2, #32
ldmia r1!, {r8, r9, ip, lr}
- orr r3, r3, r4, push #\push
- mov r4, r4, pull #\pull
- orr r4, r4, r5, push #\push
- mov r5, r5, pull #\pull
- orr r5, r5, r6, push #\push
- mov r6, r6, pull #\pull
- orr r6, r6, r7, push #\push
- mov r7, r7, pull #\pull
- orr r7, r7, r8, push #\push
- mov r8, r8, pull #\pull
- orr r8, r8, r9, push #\push
- mov r9, r9, pull #\pull
- orr r9, r9, ip, push #\push
- mov ip, ip, pull #\pull
- orr ip, ip, lr, push #\push
+ orr r3, r3, r4, PUSH #\push
+ mov r4, r4, PULL #\pull
+ orr r4, r4, r5, PUSH #\push
+ mov r5, r5, PULL #\pull
+ orr r5, r5, r6, PUSH #\push
+ mov r6, r6, PULL #\pull
+ orr r6, r6, r7, PUSH #\push
+ mov r7, r7, PULL #\pull
+ orr r7, r7, r8, PUSH #\push
+ mov r8, r8, PULL #\pull
+ orr r8, r8, r9, PUSH #\push
+ mov r9, r9, PULL #\pull
+ orr r9, r9, ip, PUSH #\push
+ mov ip, ip, PULL #\pull
+ orr ip, ip, lr, PUSH #\push
stmia r0!, {r3, r4, r5, r6, r7, r8, r9, ip}
bge 12b
PLD( cmn r2, #96 )
PLD( bge 13b )
- ldmfd sp!, {r5 - r9}
+ pop {r5 - r9}
cfi_adjust_cfa_offset (-20)
cfi_restore (r5)
cfi_restore (r6)
@@ -240,10 +240,10 @@
14: ands ip, r2, #28
beq 16f
-15: mov r3, lr, pull #\pull
+15: mov r3, lr, PULL #\pull
ldr lr, [r1], #4
subs ip, ip, #4
- orr r3, r3, lr, push #\push
+ orr r3, r3, lr, PUSH #\push
str r3, [r0], #4
bgt 15b
CALGN( cmp r2, #0 )
Modified: fsf/trunk/libc/ports/sysdeps/arm/memmove.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/memmove.S (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/memmove.S Thu Mar 7 00:01:57 2013
@@ -45,11 +45,11 @@
* Endian independent macros for shifting bytes within registers.
*/
#ifndef __ARMEB__
-#define pull lsr
-#define push lsl
-#else
-#define pull lsl
-#define push lsr
+#define PULL lsr
+#define PUSH lsl
+#else
+#define PULL lsl
+#define PUSH lsr
#endif
.text
@@ -73,7 +73,7 @@
bls HIDDEN_JUMPTARGET(memcpy)
#endif
- stmfd sp!, {r0, r4, lr}
+ push {r0, r4, lr}
cfi_adjust_cfa_offset (12)
cfi_rel_offset (r4, 4)
cfi_rel_offset (lr, 8)
@@ -91,7 +91,7 @@
bne 10f
1: subs r2, r2, #(28)
- stmfd sp!, {r5 - r8}
+ push {r5 - r8}
cfi_adjust_cfa_offset (16)
cfi_rel_offset (r5, 0)
cfi_rel_offset (r6, 4)
@@ -147,7 +147,7 @@
CALGN( bcs 2b )
-7: ldmfd sp!, {r5 - r8}
+7: pop {r5 - r8}
cfi_adjust_cfa_offset (-16)
cfi_restore (r5)
cfi_restore (r6)
@@ -163,13 +163,13 @@
strcsb ip, [r0, #-1]
#if defined (__ARM_ARCH_4T__) && defined (__THUMB_INTERWORK__)
- ldmfd sp!, {r0, r4, lr}
+ pop {r0, r4, lr}
cfi_adjust_cfa_offset (-12)
cfi_restore (r4)
cfi_restore (lr)
bx lr
#else
- ldmfd sp!, {r0, r4, pc}
+ pop {r0, r4, pc}
#endif
cfi_restore_state
@@ -204,7 +204,7 @@
CALGN( subcc r2, r2, ip )
CALGN( bcc 15f )
-11: stmfd sp!, {r5 - r9}
+11: push {r5 - r9}
cfi_adjust_cfa_offset (20)
cfi_rel_offset (r5, 0)
cfi_rel_offset (r6, 4)
@@ -221,30 +221,30 @@
12: PLD( pld [r1, #-128] )
13: ldmdb r1!, {r7, r8, r9, ip}
- mov lr, r3, push #\push
+ mov lr, r3, PUSH #\push
subs r2, r2, #32
ldmdb r1!, {r3, r4, r5, r6}
- orr lr, lr, ip, pull #\pull
- mov ip, ip, push #\push
- orr ip, ip, r9, pull #\pull
- mov r9, r9, push #\push
- orr r9, r9, r8, pull #\pull
- mov r8, r8, push #\push
- orr r8, r8, r7, pull #\pull
- mov r7, r7, push #\push
- orr r7, r7, r6, pull #\pull
- mov r6, r6, push #\push
- orr r6, r6, r5, pull #\pull
- mov r5, r5, push #\push
- orr r5, r5, r4, pull #\pull
- mov r4, r4, push #\push
- orr r4, r4, r3, pull #\pull
+ orr lr, lr, ip, PULL #\pull
+ mov ip, ip, PUSH #\push
+ orr ip, ip, r9, PULL #\pull
+ mov r9, r9, PUSH #\push
+ orr r9, r9, r8, PULL #\pull
+ mov r8, r8, PUSH #\push
+ orr r8, r8, r7, PULL #\pull
+ mov r7, r7, PUSH #\push
+ orr r7, r7, r6, PULL #\pull
+ mov r6, r6, PUSH #\push
+ orr r6, r6, r5, PULL #\pull
+ mov r5, r5, PUSH #\push
+ orr r5, r5, r4, PULL #\pull
+ mov r4, r4, PUSH #\push
+ orr r4, r4, r3, PULL #\pull
stmdb r0!, {r4 - r9, ip, lr}
bge 12b
PLD( cmn r2, #96 )
PLD( bge 13b )
- ldmfd sp!, {r5 - r9}
+ pop {r5 - r9}
cfi_adjust_cfa_offset (-20)
cfi_restore (r5)
cfi_restore (r6)
@@ -255,10 +255,10 @@
14: ands ip, r2, #28
beq 16f
-15: mov lr, r3, push #\push
+15: mov lr, r3, PUSH #\push
ldr r3, [r1, #-4]!
subs ip, ip, #4
- orr lr, lr, r3, pull #\pull
+ orr lr, lr, r3, PULL #\pull
str lr, [r0, #-4]!
bgt 15b
CALGN( cmp r2, #0 )
Modified: fsf/trunk/libc/ports/sysdeps/arm/start.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/start.S (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/start.S Thu Mar 7 00:01:57 2013
@@ -80,14 +80,14 @@
mov lr, #0
/* Pop argc off the stack and save a pointer to argv */
- ldr a2, [sp], #4
+ pop { a2 }
mov a3, sp
/* Push stack limit */
- str a3, [sp, #-4]!
+ push { a3 }
/* Push rtld_fini */
- str a1, [sp, #-4]!
+ push { a1 }
#ifdef SHARED
ldr sl, .L_GOT
@@ -97,7 +97,7 @@
ldr ip, .L_GOT+4 /* __libc_csu_fini */
ldr ip, [sl, ip]
- str ip, [sp, #-4]! /* Push __libc_csu_fini */
+ push { ip } /* Push __libc_csu_fini */
ldr a4, .L_GOT+8 /* __libc_csu_init */
ldr a4, [sl, a4]
@@ -113,7 +113,7 @@
ldr ip, =__libc_csu_fini
/* Push __libc_csu_fini */
- str ip, [sp, #-4]!
+ push { ip }
/* Set up the other arguments in registers */
ldr a1, =main
Added: fsf/trunk/libc/ports/sysdeps/arm/sub_n.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/sub_n.S (added)
+++ fsf/trunk/libc/ports/sysdeps/arm/sub_n.S Thu Mar 7 00:01:57 2013
@@ -1,0 +1,2 @@
+#define USE_AS_SUB_N
+#include "add_n.S"
Added: fsf/trunk/libc/ports/sysdeps/arm/submul_1.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/submul_1.S (added)
+++ fsf/trunk/libc/ports/sysdeps/arm/submul_1.S Thu Mar 7 00:01:57 2013
@@ -1,0 +1,68 @@
+/* mpn_submul_1 -- multiply and subtract bignums.
+ Copyright (C) 2013 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.h>
+
+ .syntax unified
+ .text
+
+@ cycles/limb
+@ StrongArm ?
+@ Cortex-A8 ?
+@ Cortex-A9 ?
+@ Cortex-A15 4
+
+/* mp_limb_t mpn_submul_1(res_ptr, src1_ptr, size, s2_limb) */
+
+ENTRY (__mpn_submul_1)
+ push { r4, r5, r6, r7 }
+ cfi_adjust_cfa_offset (16)
+ cfi_rel_offset (r4, 0)
+ cfi_rel_offset (r5, 4)
+ cfi_rel_offset (r6, 8)
+ cfi_rel_offset (r7, 12)
+
+ ldr r6, [r1], #4
+ ldr r7, [r0]
+ mov r4, #0 /* init carry in */
+ b 1f
+0:
+ ldr r6, [r1], #4 /* load next ul */
+ adds r5, r5, r4 /* (lpl, c) = lpl + cl */
+ adc r4, ip, #0 /* cl = hpl + c */
+ subs r5, r7, r5 /* (lpl, !c) = rl - lpl */
+ ldr r7, [r0, #4] /* load next rl */
+ it cc
+ addcc r4, r4, #1 /* cl += !c */
+ str r5, [r0], #4
+1:
+ umull r5, ip, r6, r3 /* (hpl, lpl) = ul * vl */
+ subs r2, r2, #1
+ bne 0b
+
+ adds r5, r5, r4 /* (lpl, c) = lpl + cl */
+ adc r4, ip, #0 /* cl = hpl + c */
+ subs r5, r7, r5 /* (lpl, !c) = rl - lpl */
+ str r5, [r0], #4
+ it cc
+ addcc r4, r4, #1 /* cl += !c */
+ mov r0, r4 /* return carry */
+
+ pop { r4, r5, r6, r7 }
+ DO_RET (lr)
+END (__mpn_submul_1)
Modified: fsf/trunk/libc/ports/sysdeps/arm/sysdep.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/arm/sysdep.h (original)
+++ fsf/trunk/libc/ports/sysdeps/arm/sysdep.h Thu Mar 7 00:01:57 2013
@@ -19,9 +19,42 @@
#include <sysdeps/generic/sysdep.h>
#include <features.h>
-#if (!defined (__ARM_ARCH_2__) && !defined (__ARM_ARCH_3__) \
- && !defined (__ARM_ARCH_3M__) && !defined (__ARM_ARCH_4__))
-# define __USE_BX__
+/* The __ARM_ARCH define is provided by gcc 4.8. Construct it otherwise. */
+#ifndef __ARM_ARCH
+# ifdef __ARM_ARCH_2__
+# define __ARM_ARCH 2
+# elif defined (__ARM_ARCH_3__) || defined (__ARM_ARCH_3M__)
+# define __ARM_ARCH 3
+# elif defined (__ARM_ARCH_4__) || defined (__ARM_ARCH_4T__)
+# define __ARM_ARCH 4
+# elif defined (__ARM_ARCH_5__) || defined (__ARM_ARCH_5E__) \
+ || defined(__ARM_ARCH_5T__) || defined(__ARM_ARCH_5TE__) \
+ || defined(__ARM_ARCH_5TEJ__)
+# define __ARM_ARCH 5
+# elif defined (__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
+ || defined (__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) \
+ || defined (__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__)
+# define __ARM_ARCH 6
+# elif defined (__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
+ || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \
+ || defined(__ARM_ARCH_7EM__)
+# define __ARM_ARCH 7
+# else
+# error unknown arm architecture
+# endif
+#endif
+
+#if __ARM_ARCH > 4 || defined (__ARM_ARCH_4T__)
+# define ARCH_HAS_BX
+#endif
+#if __ARM_ARCH > 4
+# define ARCH_HAS_BLX
+#endif
+#if __ARM_ARCH > 6 || defined (__ARM_ARCH_6K__) || defined (__ARM_ARCH_6ZK__)
+# define ARCH_HAS_HARD_TP
+#endif
+#if __ARM_ARCH > 6 || defined (__ARM_ARCH_6T2__)
+# define ARCH_HAS_T2
#endif
#ifdef __ASSEMBLER__
@@ -33,29 +66,22 @@
#define PLTJMP(_x) _x##(PLT)
-/* APCS-32 doesn't preserve the condition codes across function call. */
-#ifdef __APCS_32__
-#define LOADREGS(cond, base, reglist...)\
- ldm##cond base,reglist
-#ifdef __USE_BX__
-#define RETINSTR(cond, reg) \
- bx##cond reg
-#define DO_RET(_reg) \
- bx _reg
-#else
-#define RETINSTR(cond, reg) \
- mov##cond pc, reg
-#define DO_RET(_reg) \
- mov pc, _reg
-#endif
-#else /* APCS-26 */
-#define LOADREGS(cond, base, reglist...)\
- ldm##cond base,reglist^
-#define RETINSTR(cond, reg) \
- mov##cond##s pc, reg
-#define DO_RET(_reg) \
- movs pc, _reg
-#endif
+#ifdef ARCH_HAS_BX
+# define BX(R) bx R
+# define BXC(C, R) bx##C R
+# ifdef ARCH_HAS_BLX
+# define BLX(R) blx R
+# else
+# define BLX(R) mov lr, pc; bx R
+# endif
+#else
+# define BX(R) mov pc, R
+# define BXC(C, R) mov##C pc, R
+# define BLX(R) mov lr, pc; mov pc, R
+#endif
+
+#define DO_RET(R) BX(R)
+#define RETINSTR(C, R) BXC(C, R)
/* Define an entry point visible from C. */
#define ENTRY(name) \
@@ -80,7 +106,7 @@
/* Call __gnu_mcount_nc if GCC >= 4.4. */
#if __GNUC_PREREQ(4,4)
#define CALL_MCOUNT \
- str lr,[sp, #-4]!; \
+ push {lr}; \
cfi_adjust_cfa_offset (4); \
cfi_rel_offset (lr, 0); \
bl PLTJMP(mcount); \
@@ -88,11 +114,11 @@
cfi_restore (lr)
#else /* else call _mcount */
#define CALL_MCOUNT \
- str lr,[sp, #-4]!; \
+ push {lr}; \
cfi_adjust_cfa_offset (4); \
cfi_rel_offset (lr, 0); \
bl PLTJMP(mcount); \
- ldr lr, [sp], #4; \
+ pops {lr}; \
cfi_adjust_cfa_offset (-4); \
cfi_restore (lr)
#endif
@@ -117,11 +143,77 @@
the caller. */
.eabi_attribute 24, 1
+/* The thumb2 encoding is reasonably complete. Unless suppressed, use it. */
+ .syntax unified
+# if defined(__thumb2__) && !defined(NO_THUMB)
+ .thumb
+#else
+# undef __thumb__
+# undef __thumb2__
+ .arm
+# endif
+
+/* Load or store to/from a pc-relative EXPR into/from R, using T. */
+# ifdef __thumb2__
+# define LDST_PCREL(OP, R, T, EXPR) \
+ ldr T, 98f; \
+ .subsection 2; \
+98: .word EXPR - 99f - PC_OFS; \
+ .previous; \
+99: add T, T, pc; \
+ OP R, [T]
+# else
+# define LDST_PCREL(OP, R, T, EXPR) \
+ ldr T, 98f; \
+ .subsection 2; \
+98: .word EXPR - 99f - PC_OFS; \
+ .previous; \
+99: OP R, [pc, T]
+# endif
+
+/* Cope with negative memory offsets, which thumb can't encode.
+ Use NEGOFF_ADJ_BASE to (conditionally) alter the base register,
+ and then NEGOFF_OFF1 to use 0 for thumb and the offset for arm,
+ or NEGOFF_OFF2 to use A-B for thumb and A for arm. */
+# ifdef __thumb2__
+# define NEGOFF_ADJ_BASE(R, OFF) add R, R, $OFF
+# define NEGOFF_ADJ_BASE2(D, S, OFF) add D, S, $OFF
+# define NEGOFF_OFF1(R, OFF) [R]
+# define NEGOFF_OFF2(R, OFFA, OFFB) [R, $((OFFA) - (OFFB))]
+# else
+# define NEGOFF_ADJ_BASE(R, OFF)
+# define NEGOFF_ADJ_BASE2(D, S, OFF) mov D, S
+# define NEGOFF_OFF1(R, OFF) [R, $OFF]
+# define NEGOFF_OFF2(R, OFFA, OFFB) [R, $OFFA]
+# endif
+
+/* Helper to get the TLS base pointer. The interface is that TMP is a
+ register that may be used to hold the LR, if necessary. TMP may be
+ LR itself to indicate that LR need not be saved. The base pointer
+ is returned in R0. Only R0 and TMP are modified. */
+
+# ifdef ARCH_HAS_HARD_TP
+/* If the cpu has cp15 available, use it. */
+# define GET_TLS(TMP) mrc p15, 0, r0, c13, c0, 3
+# else
+/* At this generic level we have no tricks to pull. Call the ABI routine. */
+# define GET_TLS(TMP) \
+ push { r1, r2, r3, lr }; \
+ cfi_remember_state; \
+ cfi_adjust_cfa_offset (16); \
+ cfi_rel_offset (r1, 0); \
+ cfi_rel_offset (r2, 4); \
+ cfi_rel_offset (r3, 8); \
+ cfi_rel_offset (lr, 12); \
+ bl __aeabi_read_tp; \
+ pop { r1, r2, r3, lr }; \
+ cfi_restore_state
+# endif /* ARCH_HAS_HARD_TP */
+
#endif /* __ASSEMBLER__ */
/* This number is the offset from the pc at the current location. */
-/* ??? At the moment we're not turning on thumb mode in assembly. */
-#if defined(__thumb__) && !defined(__ASSEMBLER__)
+#ifdef __thumb__
# define PC_OFS 4
#else
# define PC_OFS 8
Modified: fsf/trunk/libc/ports/sysdeps/unix/arm/sysdep.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/arm/sysdep.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/arm/sysdep.S Thu Mar 7 00:01:57 2013
@@ -37,28 +37,24 @@
#endif
#ifndef IS_IN_rtld
- mov ip, lr
- cfi_register (lr, ip)
- mov r1, r0
-
- mov r0, #0xffff0fff
- mov lr, pc
- sub pc, r0, #31
-
- ldr r2, 1f
-2: ldr r2, [pc, r2]
- str r1, [r0, r2]
- mvn r0, #0
- RETINSTR (, ip)
+ mov r1, r0
+ GET_TLS (r2)
+ ldr r2, 1f
+#ifdef __thumb__
+2: add r2, r2, pc
+ ldr r2, [r2]
+#else
+2: ldr r2, [pc, r2]
+#endif
+ str r1, [r0, r2]
+ mvn r0, #0
+ DO_RET(lr)
1: .word errno(gottpoff) + (. - 2b - PC_OFS)
#elif RTLD_PRIVATE_ERRNO
- ldr r1, 1f
-0: str r0, [pc, r1]
- mvn r0, $0
+ LDST_PCREL(str, r0, r1, C_SYMBOL_NAME(rtld_errno))
+ mvn r0, #0
DO_RET(r14)
-
-1: .word C_SYMBOL_NAME(rtld_errno) - 0b - PC_OFS
#else
#error "Unsupported non-TLS case"
#endif
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/alpha/bits/mman.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/alpha/bits/mman.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/alpha/bits/mman.h Thu Mar 7 00:01:57 2013
@@ -51,6 +51,9 @@
# define MAP_FILE 0
# define MAP_ANONYMOUS 0x10 /* Don't use a file. */
# define MAP_ANON MAP_ANONYMOUS
+/* When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. */
+# define MAP_HUGE_SHIFT 26
+# define MAP_HUGE_MASK 0x3f
#endif
/* Not used by Linux, but here to make sure we don't clash with
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/alpha/bits/msq.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/alpha/bits/msq.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/alpha/bits/msq.h Thu Mar 7 00:01:57 2013
@@ -25,6 +25,7 @@
#define MSG_NOERROR 010000 /* no error if message is too big */
#ifdef __USE_GNU
# define MSG_EXCEPT 020000 /* recv any msg except of specified type */
+# define MSG_COPY 040000 /* copy (not remove) all queue messages */
#endif
/* Types used in the structure definition. */
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S Thu Mar 7 00:01:57 2013
@@ -53,7 +53,7 @@
cfi_remember_state; \
cmp sp, reg; \
bls .Lok; \
- str r7, [sp, #-4]!; \
+ push { r7 }; \
cfi_adjust_cfa_offset (4); \
cfi_rel_offset (r7, 0); \
mov r5, r0; \
@@ -79,7 +79,7 @@
.Lfail: \
add sp, sp, #12; \
cfi_adjust_cfa_offset (-12); \
- ldr r7, [sp], #4; \
+ pop { r7 }; \
cfi_adjust_cfa_offset (-4); \
cfi_restore (r7); \
CALL_FAIL \
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/aeabi_read_tp.S Thu Mar 7 00:01:57 2013
@@ -41,6 +41,15 @@
.hidden __aeabi_read_tp
ENTRY (__aeabi_read_tp)
+#ifdef ARCH_HAS_HARD_TP
+ mrc p15, 0, r0, c13, c0, 3
+ bx lr
+#elif defined(__thumb2__)
+ movw r0, #0x0fe0
+ movt r0, #0xffff
+ bx r0
+#else
mov r0, #0xffff0fff
sub pc, r0, #31
+#endif
END (__aeabi_read_tp)
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/bits/mman.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/bits/mman.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/bits/mman.h Thu Mar 7 00:01:57 2013
@@ -23,36 +23,6 @@
/* The following definitions basically come from the kernel headers.
But the kernel header is not namespace clean. */
-
-/* Protections are chosen from these bits, OR'd together. The
- implementation does not necessarily support PROT_EXEC or PROT_WRITE
- without PROT_READ. The only guarantees are that no writing will be
- allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_READ 0x1 /* Page can be read. */
-#define PROT_WRITE 0x2 /* Page can be written. */
-#define PROT_EXEC 0x4 /* Page can be executed. */
-#define PROT_NONE 0x0 /* Page can not be accessed. */
-#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
- growsdown vma (mprotect only). */
-#define PROT_GROWSUP 0x02000000 /* Extend change to start of
- growsup vma (mprotect only). */
-
-/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes are private. */
-#ifdef __USE_MISC
-# define MAP_TYPE 0x0f /* Mask for type of mapping. */
-#endif
-
-/* Other flags. */
-#define MAP_FIXED 0x10 /* Interpret addr exactly. */
-#ifdef __USE_MISC
-# define MAP_FILE 0
-# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
-# define MAP_ANON MAP_ANONYMOUS
-#endif
-
/* These are Linux-specific. */
#ifdef __USE_MISC
# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
@@ -66,47 +36,5 @@
# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
#endif
-/* Flags to `msync'. */
-#define MS_ASYNC 1 /* Sync memory asynchronously. */
-#define MS_SYNC 4 /* Synchronous memory sync. */
-#define MS_INVALIDATE 2 /* Invalidate the caches. */
-
-/* Flags for `mlockall'. */
-#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
-#define MCL_FUTURE 2 /* Lock all additions to address
- space. */
-
-/* Flags for `mremap'. */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE 1
-# define MREMAP_FIXED 2
-#endif
-
-/* Advice to `madvise'. */
-#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-# define MADV_REMOVE 9 /* Remove these pages and resources. */
-# define MADV_DONTFORK 10 /* Do not inherit across fork. */
-# define MADV_DOFORK 11 /* Do inherit across fork. */
-# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
-# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
-# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */
-# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */
-# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump,
- overrides the coredump filter bits. */
-# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */
-# define MADV_HWPOISON 100 /* Poison a page for testing. */
-#endif
-
-/* The POSIX people had to invent similar names for the same things. */
-#ifdef __USE_XOPEN2K
-# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
-#endif
+/* Include generic Linux declarations. */
+#include <bits/mman-linux.h>
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/clone.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/clone.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/clone.S Thu Mar 7 00:01:57 2013
@@ -49,7 +49,7 @@
mov ip, r2
#endif
@ new sp is already in r1
- stmfd sp!, {r4, r7}
+ push {r4, r7}
cfi_adjust_cfa_offset (8)
cfi_rel_offset (r4, 0)
cfi_rel_offset (r7, 4)
@@ -61,7 +61,7 @@
cfi_endproc
cmp r0, #0
beq 1f
- ldmfd sp!, {r4, r7}
+ pop {r4, r7}
blt PLTJMP(C_SYMBOL_NAME(__syscall_error))
RETINSTR(, lr)
@@ -74,17 +74,16 @@
#ifdef RESET_PID
tst ip, #CLONE_THREAD
bne 3f
- mov r0, #0xffff0fff
- mov lr, pc
- sub pc, r0, #31
+ GET_TLS (lr)
mov r1, r0
tst ip, #CLONE_VM
ldr r7, =SYS_ify(getpid)
ite ne
movne r0, #-1
swieq 0x0
- str r0, [r1, #PID_OFFSET]
- str r0, [r1, #TID_OFFSET]
+ NEGOFF_ADJ_BASE (r1, TID_OFFSET)
+ str r0, NEGOFF_OFF1 (r1, TID_OFFSET)
+ str r0, NEGOFF_OFF2 (r1, PID_OFFSET, TID_OFFSET)
3:
#endif
@ pick the function arg and call address off the stack and execute
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/mmap.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/mmap.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/mmap.S Thu Mar 7 00:01:57 2013
@@ -23,11 +23,11 @@
ENTRY (__mmap)
/* shuffle args */
- str r5, [sp, #-4]!
+ push { r5 }
cfi_adjust_cfa_offset (4)
cfi_rel_offset (r5, 0)
ldr r5, [sp, #8]
- str r4, [sp, #-4]!
+ push { r4 }
cfi_adjust_cfa_offset (4)
cfi_rel_offset (r4, 0)
cfi_remember_state
@@ -43,10 +43,10 @@
/* restore registers */
2:
- ldr r4, [sp], #4
+ pop { r4 }
cfi_adjust_cfa_offset (-4)
cfi_restore (r4)
- ldr r5, [sp], #4
+ pop { r5 }
cfi_adjust_cfa_offset (-4)
cfi_restore (r5)
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/mmap64.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/mmap64.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/mmap64.S Thu Mar 7 00:01:57 2013
@@ -34,11 +34,11 @@
.text
ENTRY (__mmap64)
ldr ip, [sp, $LOW_OFFSET]
- str r5, [sp, #-4]!
+ push { r5 }
cfi_adjust_cfa_offset (4)
cfi_rel_offset (r5, 0)
ldr r5, [sp, $HIGH_OFFSET]
- str r4, [sp, #-4]!
+ push { r4 }
cfi_adjust_cfa_offset (4)
cfi_rel_offset (r4, 0)
cfi_remember_state
@@ -51,7 +51,7 @@
orr r5, ip, r5, lsl $20 @ compose page offset
DO_CALL (mmap2, 0)
cmn r0, $4096
- ldmfd sp!, {r4, r5}
+ pop {r4, r5}
cfi_adjust_cfa_offset (-8)
cfi_restore (r4)
cfi_restore (r5)
@@ -62,7 +62,7 @@
cfi_restore_state
.Linval:
mov r0, $-EINVAL
- ldmfd sp!, {r4, r5}
+ pop {r4, r5}
cfi_adjust_cfa_offset (-8)
cfi_restore (r4)
cfi_restore (r5)
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/pt-vfork.S Thu Mar 7 00:01:57 2013
@@ -19,23 +19,16 @@
/* Save the PID value. */
#define SAVE_PID \
- str lr, [sp, #-4]!; /* Save LR. */ \
- cfi_adjust_cfa_offset (4); \
- cfi_rel_offset (lr, 0); \
- mov r0, #0xffff0fff; /* Point to the high page. */ \
- mov lr, pc; /* Save our return address. */ \
- sub pc, r0, #31; /* Jump to the TLS entry. */ \
- ldr lr, [sp], #4; /* Restore LR. */ \
- cfi_adjust_cfa_offset (-4); \
- cfi_restore (lr); \
- mov r2, r0; /* Save the TLS addr in r2. */ \
- ldr r3, [r2, #PID_OFFSET]; /* Load the saved PID. */ \
- rsb r0, r3, #0; /* Negate it. */ \
- str r0, [r2, #PID_OFFSET] /* Store the temporary PID. */
+ GET_TLS (r2); \
+ NEGOFF_ADJ_BASE2 (r2, r0, PID_OFFSET); /* Save the TLS addr in r2. */ \
+ ldr r3, NEGOFF_OFF1 (r2, PID_OFFSET); /* Load the saved PID. */ \
+ rsb r0, r3, #0; /* Negate it. */ \
+ str r0, NEGOFF_OFF1 (r2, PID_OFFSET); /* Store the temp PID. */
/* Restore the old PID value in the parent. */
#define RESTORE_PID \
cmp r0, #0; /* If we are the parent... */ \
- strne r3, [r2, #PID_OFFSET] /* ... restore the saved PID. */
+ it ne; \
+ strne r3, NEGOFF_OFF1 (r2, PID_OFFSET); /* restore the saved PID. */
#include "../vfork.S"
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h Thu Mar 7 00:01:57 2013
@@ -31,7 +31,6 @@
# undef PSEUDO
# define PSEUDO(name, syscall_name, args) \
.text; \
- PSEUDO_PROLOGUE; \
ENTRY (__##syscall_name##_nocancel); \
CFI_SECTIONS; \
DO_CALL (syscall_name, args); \
@@ -77,19 +76,19 @@
# define DOCARGS_0 \
.save {r7}; \
- str lr, [sp, #-4]!; \
+ push {lr}; \
cfi_adjust_cfa_offset (4); \
cfi_rel_offset (lr, 0); \
.save {lr}
# define UNDOCARGS_0
# define RESTORE_LR_0 \
- ldr lr, [sp], #4; \
+ pop {lr}; \
cfi_adjust_cfa_offset (-4); \
cfi_restore (lr)
# define DOCARGS_1 \
.save {r7}; \
- stmfd sp!, {r0, r1, lr}; \
+ push {r0, r1, lr}; \
cfi_adjust_cfa_offset (12); \
cfi_rel_offset (lr, 8); \
.save {lr}; \
@@ -103,13 +102,13 @@
# define DOCARGS_2 \
.save {r7}; \
- stmfd sp!, {r0, r1, lr}; \
+ push {r0, r1, lr}; \
cfi_adjust_cfa_offset (12); \
cfi_rel_offset (lr, 8); \
.save {lr}; \
.pad #8
# define UNDOCARGS_2 \
- ldmfd sp!, {r0, r1}; \
+ pop {r0, r1}; \
cfi_adjust_cfa_offset (-8); \
RESTART_UNWIND
# define RESTORE_LR_2 \
@@ -117,13 +116,13 @@
# define DOCARGS_3 \
.save {r7}; \
- stmfd sp!, {r0, r1, r2, r3, lr}; \
+ push {r0, r1, r2, r3, lr}; \
cfi_adjust_cfa_offset (20); \
cfi_rel_offset (lr, 16); \
.save {lr}; \
.pad #16
# define UNDOCARGS_3 \
- ldmfd sp!, {r0, r1, r2, r3}; \
+ pop {r0, r1, r2, r3}; \
cfi_adjust_cfa_offset (-16); \
RESTART_UNWIND
# define RESTORE_LR_3 \
@@ -131,13 +130,13 @@
# define DOCARGS_4 \
.save {r7}; \
- stmfd sp!, {r0, r1, r2, r3, lr}; \
+ push {r0, r1, r2, r3, lr}; \
cfi_adjust_cfa_offset (20); \
cfi_rel_offset (lr, 16); \
.save {lr}; \
.pad #16
# define UNDOCARGS_4 \
- ldmfd sp!, {r0, r1, r2, r3}; \
+ pop {r0, r1, r2, r3}; \
cfi_adjust_cfa_offset (-16); \
RESTART_UNWIND
# define RESTORE_LR_4 \
@@ -146,13 +145,13 @@
/* r4 is only stmfd'ed for correct stack alignment. */
# define DOCARGS_5 \
.save {r4, r7}; \
- stmfd sp!, {r0, r1, r2, r3, r4, lr}; \
+ push {r0, r1, r2, r3, r4, lr}; \
cfi_adjust_cfa_offset (24); \
cfi_rel_offset (lr, 20); \
.save {lr}; \
.pad #20
# define UNDOCARGS_5 \
- ldmfd sp!, {r0, r1, r2, r3}; \
+ pop {r0, r1, r2, r3}; \
cfi_adjust_cfa_offset (-16); \
.fnend; \
.fnstart; \
@@ -160,20 +159,20 @@
.save {lr}; \
.pad #4
# define RESTORE_LR_5 \
- ldmfd sp!, {r4, lr}; \
+ pop {r4, lr}; \
cfi_adjust_cfa_offset (-8); \
/* r4 will be marked as restored later. */ \
cfi_restore (lr)
# define DOCARGS_6 \
.save {r4, r5, r7}; \
- stmfd sp!, {r0, r1, r2, r3, lr}; \
+ push {r0, r1, r2, r3, lr}; \
cfi_adjust_cfa_offset (20); \
cfi_rel_offset (lr, 16); \
.save {lr}; \
.pad #16
# define UNDOCARGS_6 \
- ldmfd sp!, {r0, r1, r2, r3}; \
+ pop {r0, r1, r2, r3}; \
cfi_adjust_cfa_offset (-16); \
.fnend; \
.fnstart; \
@@ -203,12 +202,8 @@
# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
# else
# define SINGLE_THREAD_P \
- ldr ip, 1b; \
- 2: \
- ldr ip, [pc, ip]; \
- teq ip, #0;
-# define PSEUDO_PROLOGUE \
- 1: .word __local_multiple_threads - 2f - PC_OFS;
+ LDST_PCREL(ldr, ip, ip, __local_multiple_threads); \
+ teq ip, #0
# endif
# else
/* There is no __local_multiple_threads for librt, so use the TCB. */
@@ -217,14 +212,14 @@
__builtin_expect (THREAD_GETMEM (THREAD_SELF, \
header.multiple_threads) == 0, 1)
# else
-# define PSEUDO_PROLOGUE
# define SINGLE_THREAD_P \
- stmfd sp!, {r0, lr}; \
+ push {r0, lr}; \
cfi_adjust_cfa_offset (8); \
cfi_rel_offset (lr, 4); \
- bl __aeabi_read_tp; \
- ldr ip, [r0, #MULTIPLE_THREADS_OFFSET]; \
- ldmfd sp!, {r0, lr}; \
+ GET_TLS (lr); \
+ NEGOFF_ADJ_BASE (r0, MULTIPLE_THREADS_OFFSET); \
+ ldr ip, NEGOFF_OFF1 (r0, MULTIPLE_THREADS_OFFSET); \
+ pop {r0, lr}; \
cfi_adjust_cfa_offset (-8); \
cfi_restore (lr); \
teq ip, #0
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c Thu Mar 7 00:01:57 2013
@@ -93,7 +93,7 @@
"_Unwind_Resume:\n"
" .cfi_sections .debug_frame\n"
" " CFI_STARTPROC "\n"
-" stmfd sp!, {r4, r5, r6, lr}\n"
+" push {r4, r5, r6, lr}\n"
" " CFI_ADJUST_CFA_OFFSET (16)" \n"
" " CFI_REL_OFFSET (r4, 0) "\n"
" " CFI_REL_OFFSET (r5, 4) "\n"
@@ -108,7 +108,7 @@
" cmp r3, #0\n"
" beq 4f\n"
"5: mov r0, r6\n"
-" ldmfd sp!, {r4, r5, r6, lr}\n"
+" pop {r4, r5, r6, lr}\n"
" " CFI_ADJUST_CFA_OFFSET (-16) "\n"
" " CFI_RESTORE (r4) "\n"
" " CFI_RESTORE (r5) "\n"
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c Thu Mar 7 00:01:57 2013
@@ -56,7 +56,7 @@
"_Unwind_Resume:\n"
" .cfi_sections .debug_frame\n"
" " CFI_STARTPROC "\n"
-" stmfd sp!, {r4, r5, r6, lr}\n"
+" push {r4, r5, r6, lr}\n"
" " CFI_ADJUST_CFA_OFFSET (16)" \n"
" " CFI_REL_OFFSET (r4, 0) "\n"
" " CFI_REL_OFFSET (r5, 4) "\n"
@@ -71,7 +71,7 @@
" cmp r3, #0\n"
" beq 4f\n"
"5: mov r0, r6\n"
-" ldmfd sp!, {r4, r5, r6, lr}\n"
+" pop {r4, r5, r6, lr}\n"
" " CFI_ADJUST_CFA_OFFSET (-16) "\n"
" " CFI_RESTORE (r4) "\n"
" " CFI_RESTORE (r5) "\n"
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/vfork.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/vfork.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/nptl/vfork.S Thu Mar 7 00:01:57 2013
@@ -19,24 +19,18 @@
/* Save the PID value. */
#define SAVE_PID \
- str lr, [sp, #-4]!; /* Save LR. */ \
- cfi_adjust_cfa_offset (4); \
- cfi_rel_offset (lr, 0); \
- mov r0, #0xffff0fff; /* Point to the high page. */ \
- mov lr, pc; /* Save our return address. */ \
- sub pc, r0, #31; /* Jump to the TLS entry. */ \
- ldr lr, [sp], #4; /* Restore LR. */ \
- cfi_adjust_cfa_offset (-4); \
- cfi_restore (lr); \
- mov r2, r0; /* Save the TLS addr in r2. */ \
- ldr r3, [r2, #PID_OFFSET]; /* Load the saved PID. */ \
- rsbs r0, r3, #0; /* Negate it. */ \
- moveq r0, #0x80000000; /* Use 0x80000000 if it was 0. */ \
- str r0, [r2, #PID_OFFSET] /* Store the temporary PID. */
+ GET_TLS (r2); \
+ NEGOFF_ADJ_BASE2 (r2, r0, PID_OFFSET); /* Save the TLS addr in r2. */ \
+ ldr r3, NEGOFF_OFF1 (r2, PID_OFFSET); /* Load the saved PID. */ \
+ rsbs r0, r3, #0; /* Negate it. */ \
+ it eq; \
+ moveq r0, #0x80000000; /* Use 0x80000000 if it was 0. */ \
+ str r0, NEGOFF_OFF1 (r2, PID_OFFSET); /* Store the temp PID. */
/* Restore the old PID value in the parent. */
#define RESTORE_PID \
cmp r0, #0; /* If we are the parent... */ \
- strne r3, [r2, #PID_OFFSET] /* ... restore the saved PID. */
+ it ne; \
+ strne r3, NEGOFF_OFF1 (r2, PID_OFFSET); /* restore the saved PID. */
#include "../vfork.S"
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/syscall.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/syscall.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/syscall.S Thu Mar 7 00:01:57 2013
@@ -23,7 +23,7 @@
ENTRY (syscall)
mov ip, sp
- stmfd sp!, {r4, r5, r6, r7}
+ push {r4, r5, r6, r7}
cfi_adjust_cfa_offset (16)
cfi_rel_offset (r4, 0)
cfi_rel_offset (r5, 4)
@@ -35,7 +35,7 @@
mov r2, r3
ldmfd ip, {r3, r4, r5, r6}
swi 0x0
- ldmfd sp!, {r4, r5, r6, r7}
+ pop {r4, r5, r6, r7}
cfi_adjust_cfa_offset (-16)
cfi_restore (r4)
cfi_restore (r5)
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/sysdep.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/sysdep.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/sysdep.h Thu Mar 7 00:01:57 2013
@@ -44,6 +44,38 @@
#include <bits/hwcap.h>
#ifdef __ASSEMBLER__
+
+#ifndef ARCH_HAS_HARD_TP
+/* Internal macro calling the linux kernel kuser_get_tls helper.
+ Note that in thumb mode, a constant pool break is often out of range, so
+ we always expand the constant inline. */
+# ifdef __thumb2__
+# define GET_TLS_BODY \
+ movw r0, #0x0fe0; \
+ movt r0, #0xffff; \
+ blx r0
+# else
+# define GET_TLS_BODY \
+ mov r0, #0xffff0fff; /* Point to the high page. */ \
+ mov lr, pc; /* Save our return address. */ \
+ sub pc, r0, #31 /* Jump to the TLS entry. */
+# endif
+
+/* Helper to get the TLS base pointer. Save LR in TMP, return in R0,
+ and no other registers clobbered. TMP may be LR itself to indicate
+ that no save is necessary. */
+# undef GET_TLS
+# define GET_TLS(TMP) \
+ .ifnc TMP, lr; \
+ mov TMP, lr; \
+ cfi_register (lr, TMP); \
+ GET_TLS_BODY; \
+ mov lr, TMP; \
+ cfi_restore (lr); \
+ .else; \
+ GET_TLS_BODY; \
+ .endif
+#endif /* ARCH_HAS_HARD_TP */
/* Linux uses a negative return value to indicate syscall errors,
unlike most Unices, which use the condition codes' carry flag.
@@ -110,32 +142,29 @@
# if RTLD_PRIVATE_ERRNO
# define SYSCALL_ERROR_HANDLER \
__local_syscall_error: \
- ldr r1, 1f; \
- rsb r0, r0, #0; \
-0: str r0, [pc, r1]; \
- mvn r0, #0; \
- DO_RET(lr); \
-1: .word C_SYMBOL_NAME(rtld_errno) - 0b - PC_OFS;
+ rsb r0, r0, #0; \
+ LDST_PCREL(str, r0, r1, C_SYMBOL_NAME(rtld_errno)); \
+ mvn r0, #0; \
+ DO_RET(lr)
# else
# if defined(__ARM_ARCH_4T__) && defined(__THUMB_INTERWORK__)
# define POP_PC \
- ldr lr, [sp], #4; \
+ pop { lr }; \
cfi_adjust_cfa_offset (-4); \
cfi_restore (lr); \
bx lr
# else
-# define POP_PC \
- ldr pc, [sp], #4
+# define POP_PC pop { pc }
# endif
# define SYSCALL_ERROR_HANDLER \
__local_syscall_error: \
- str lr, [sp, #-4]!; \
+ push { lr }; \
cfi_adjust_cfa_offset (4); \
cfi_rel_offset (lr, 0); \
- str r0, [sp, #-4]!; \
+ push { r0 }; \
cfi_adjust_cfa_offset (4); \
bl PLTJMP(C_SYMBOL_NAME(__errno_location)); \
- ldr r1, [sp], #4; \
+ pop { r1 }; \
cfi_adjust_cfa_offset (-4); \
rsb r1, r1, #0; \
str r1, [r0]; \
@@ -202,7 +231,7 @@
#undef DOARGS_0
#define DOARGS_0 \
.fnstart; \
- str r7, [sp, #-4]!; \
+ push { r7 }; \
cfi_adjust_cfa_offset (4); \
cfi_rel_offset (r7, 0); \
.save { r7 }
@@ -217,7 +246,7 @@
#undef DOARGS_5
#define DOARGS_5 \
.fnstart; \
- stmfd sp!, {r4, r7}; \
+ push {r4, r7}; \
cfi_adjust_cfa_offset (8); \
cfi_rel_offset (r4, 0); \
cfi_rel_offset (r7, 4); \
@@ -227,7 +256,7 @@
#define DOARGS_6 \
.fnstart; \
mov ip, sp; \
- stmfd sp!, {r4, r5, r7}; \
+ push {r4, r5, r7}; \
cfi_adjust_cfa_offset (12); \
cfi_rel_offset (r4, 0); \
cfi_rel_offset (r5, 4); \
@@ -238,7 +267,7 @@
#define DOARGS_7 \
.fnstart; \
mov ip, sp; \
- stmfd sp!, {r4, r5, r6, r7}; \
+ push {r4, r5, r6, r7}; \
cfi_adjust_cfa_offset (16); \
cfi_rel_offset (r4, 0); \
cfi_rel_offset (r5, 4); \
@@ -249,7 +278,7 @@
#undef UNDOARGS_0
#define UNDOARGS_0 \
- ldr r7, [sp], #4; \
+ pop {r7}; \
cfi_adjust_cfa_offset (-4); \
cfi_restore (r7); \
.fnend
@@ -263,14 +292,14 @@
#define UNDOARGS_4 UNDOARGS_0
#undef UNDOARGS_5
#define UNDOARGS_5 \
- ldmfd sp!, {r4, r7}; \
+ pop {r4, r7}; \
cfi_adjust_cfa_offset (-8); \
cfi_restore (r4); \
cfi_restore (r7); \
.fnend
#undef UNDOARGS_6
#define UNDOARGS_6 \
- ldmfd sp!, {r4, r5, r7}; \
+ pop {r4, r5, r7}; \
cfi_adjust_cfa_offset (-12); \
cfi_restore (r4); \
cfi_restore (r5); \
@@ -278,7 +307,7 @@
.fnend
#undef UNDOARGS_7
#define UNDOARGS_7 \
- ldmfd sp!, {r4, r5, r6, r7}; \
+ pop {r4, r5, r6, r7}; \
cfi_adjust_cfa_offset (-16); \
cfi_restore (r4); \
cfi_restore (r5); \
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/vfork.S
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/vfork.S (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/arm/vfork.S Thu Mar 7 00:01:57 2013
@@ -37,7 +37,7 @@
mov ip, r7
cfi_register (r7, ip)
.fnstart
- str r7, [sp, #-4]!
+ push { r7 }
cfi_adjust_cfa_offset (4)
.save { r7 }
ldr r7, =SYS_ify (vfork)
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/generic/bits/msq.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/generic/bits/msq.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/generic/bits/msq.h Thu Mar 7 00:01:57 2013
@@ -27,6 +27,7 @@
#define MSG_NOERROR 010000 /* no error if message is too big */
#ifdef __USE_GNU
# define MSG_EXCEPT 020000 /* recv any msg except of specified type */
+# define MSG_COPY 040000 /* copy (not remove) all queue messages */
#endif
/* Types used in the structure definition. */
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/mman.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/mman.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/mman.h Thu Mar 7 00:01:57 2013
@@ -44,6 +44,9 @@
# define MAP_ANONYMOUS 0x10 /* Don't use a file */
# define MAP_ANON MAP_ANONYMOUS
# define MAP_VARIABLE 0
+/* When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. */
+# define MAP_HUGE_SHIFT 26
+# define MAP_HUGE_MASK 0x3f
#endif
/* These are Linux-specific. */
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/msq.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/msq.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/hppa/bits/msq.h Thu Mar 7 00:01:57 2013
@@ -26,6 +26,7 @@
#define MSG_NOERROR 010000 /* no error if message is too big */
#ifdef __USE_GNU
# define MSG_EXCEPT 020000 /* recv any msg except of specified type */
+# define MSG_COPY 040000 /* copy (not remove) all queue messages */
#endif
/* Types used in the structure definition. */
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/bits/msq.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/bits/msq.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/ia64/bits/msq.h Thu Mar 7 00:01:57 2013
@@ -24,8 +24,10 @@
/* Define options for message queue functions. */
#define MSG_NOERROR 010000 /* no error if message is too big */
-#define MSG_EXCEPT 020000 /* recv any msg except of specified type */
-
+#ifdef __USE_GNU
+# define MSG_EXCEPT 020000 /* recv any msg except of specified type */
+# define MSG_COPY 040000 /* copy (not remove) all queue messages */
+#endif
/* Structure of record for one message inside the kernel.
The type `struct __msg' is opaque. */
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/m68k/bits/mman.h Thu Mar 7 00:01:57 2013
@@ -23,36 +23,6 @@
/* The following definitions basically come from the kernel headers.
But the kernel header is not namespace clean. */
-
-/* Protections are chosen from these bits, OR'd together. The
- implementation does not necessarily support PROT_EXEC or PROT_WRITE
- without PROT_READ. The only guarantees are that no writing will be
- allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_READ 0x1 /* Page can be read. */
-#define PROT_WRITE 0x2 /* Page can be written. */
-#define PROT_EXEC 0x4 /* Page can be executed. */
-#define PROT_NONE 0x0 /* Page can not be accessed. */
-#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
- growsdown vma (mprotect only). */
-#define PROT_GROWSUP 0x02000000 /* Extend change to start of
- growsup vma (mprotect only). */
-
-/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes are private. */
-#ifdef __USE_MISC
-# define MAP_TYPE 0x0f /* Mask for type of mapping. */
-#endif
-
-/* Other flags. */
-#define MAP_FIXED 0x10 /* Interpret addr exactly. */
-#ifdef __USE_MISC
-# define MAP_FILE 0
-# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
-# define MAP_ANON MAP_ANONYMOUS
-#endif
-
/* These are Linux-specific. */
#ifdef __USE_MISC
# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */
@@ -66,47 +36,5 @@
# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */
#endif
-/* Flags to `msync'. */
-#define MS_ASYNC 1 /* Sync memory asynchronously. */
-#define MS_SYNC 4 /* Synchronous memory sync. */
-#define MS_INVALIDATE 2 /* Invalidate the caches. */
-
-/* Flags for `mlockall'. */
-#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
-#define MCL_FUTURE 2 /* Lock all additions to address
- space. */
-
-/* Flags for `mremap'. */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE 1
-# define MREMAP_FIXED 2
-#endif
-
-/* Advice to `madvise'. */
-#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-# define MADV_REMOVE 9 /* Remove these pages and resources. */
-# define MADV_DONTFORK 10 /* Do not inherit across fork. */
-# define MADV_DOFORK 11 /* Do inherit across fork. */
-# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
-# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
-# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */
-# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */
-# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump,
- overrides the coredump filter bits. */
-# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */
-# define MADV_HWPOISON 100 /* Poison a page for testing. */
-#endif
-
-/* The POSIX people had to invent similar names for the same things. */
-#ifdef __USE_XOPEN2K
-# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
-#endif
+/* Include generic Linux declarations. */
+#include <bits/mman-linux.h>
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/bits/mman.h Thu Mar 7 00:01:57 2013
@@ -23,37 +23,6 @@
/* The following definitions basically come from the kernel headers.
But the kernel header is not namespace clean. */
-
-/* Protections are chosen from these bits, OR'd together. The
- implementation does not necessarily support PROT_EXEC or PROT_WRITE
- without PROT_READ. The only guarantees are that no writing will be
- allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */
-
-#define PROT_READ 0x1 /* Page can be read. */
-#define PROT_WRITE 0x2 /* Page can be written. */
-#define PROT_EXEC 0x4 /* Page can be executed. */
-#define PROT_NONE 0x0 /* Page can not be accessed. */
-#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
- growsdown vma (mprotect only). */
-#define PROT_GROWSUP 0x02000000 /* Extend change to start of
- growsup vma (mprotect only). */
-
-/* Sharing types (must choose one and only one of these). */
-#define MAP_SHARED 0x01 /* Share changes. */
-#define MAP_PRIVATE 0x02 /* Changes are private. */
-#ifdef __USE_MISC
-# define MAP_TYPE 0x0f /* Mask for type of mapping. */
-#endif
-
-/* Other flags. */
-#define MAP_FIXED 0x10 /* Interpret addr exactly. */
-#ifdef __USE_MISC
-# define MAP_FILE 0
-# define MAP_ANONYMOUS 0x0800 /* Don't use a file. */
-# define MAP_ANON MAP_ANONYMOUS
-# define MAP_RENAME MAP_ANONYMOUS
-#endif
-
/* These are Linux-specific. */
#ifdef __USE_MISC
# define MAP_NORESERVE 0x0400 /* don't check for reservations */
@@ -68,47 +37,11 @@
# define MAP_HUGETLB 0x80000 /* Create huge page mapping. */
#endif
-/* Flags to `msync'. */
-#define MS_ASYNC 1 /* Sync memory asynchronously. */
-#define MS_SYNC 4 /* Synchronous memory sync. */
-#define MS_INVALIDATE 2 /* Invalidate the caches. */
+#define __MAP_ANONYMOUS 0x0800
-/* Flags for `mlockall'. */
-#define MCL_CURRENT 1 /* Lock all currently mapped pages. */
-#define MCL_FUTURE 2 /* Lock all additions to address
- space. */
+/* Include generic Linux declarations. */
+#include <bits/mman-linux.h>
-/* Flags for `mremap'. */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE 1
-# define MREMAP_FIXED 2
+#ifdef __USE_MISC
+# define MAP_RENAME MAP_ANONYMOUS
#endif
-
-/* Advice to `madvise'. */
-#ifdef __USE_BSD
-# define MADV_NORMAL 0 /* No further special treatment. */
-# define MADV_RANDOM 1 /* Expect random page references. */
-# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define MADV_WILLNEED 3 /* Will need these pages. */
-# define MADV_DONTNEED 4 /* Don't need these pages. */
-# define MADV_REMOVE 9 /* Remove these pages and resources. */
-# define MADV_DONTFORK 10 /* Do not inherit across fork. */
-# define MADV_DOFORK 11 /* Do inherit across fork. */
-# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
-# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
-# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */
-# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */
-# define MADV_DONTDUMP 16 /* Explicity exclude from the core dump,
- overrides the coredump filter bits. */
-# define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */
-# define MADV_HWPOISON 100 /* Poison a page for testing. */
-#endif
-
-/* The POSIX people had to invent similar names for the same things. */
-#ifdef __USE_XOPEN2K
-# define POSIX_MADV_NORMAL 0 /* No further special treatment. */
-# define POSIX_MADV_RANDOM 1 /* Expect random page references. */
-# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */
-# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */
-# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */
-#endif
Modified: fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/bits/msq.h
==============================================================================
--- fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/bits/msq.h (original)
+++ fsf/trunk/libc/ports/sysdeps/unix/sysv/linux/mips/bits/msq.h Thu Mar 7 00:01:57 2013
@@ -25,6 +25,7 @@
#define MSG_NOERROR 010000 /* no error if message is too big */
#ifdef __USE_GNU
# define MSG_EXCEPT 020000 /* recv any msg except of specified type */
+# define MSG_COPY 040000 /* copy (not remove) all queue messages */
#endif
/* Types used in the structure definition. */
Modified: fsf/trunk/libc/stdio-common/vfprintf.c
==============================================================================
--- fsf/trunk/libc/stdio-common/vfprintf.c (original)
+++ fsf/trunk/libc/stdio-common/vfprintf.c Thu Mar 7 00:01:57 2013
@@ -67,7 +67,7 @@
do { \
unsigned int _val = val; \
assert ((unsigned int) done < (unsigned int) INT_MAX); \
- if (__builtin_expect (INT_MAX - done < _val, 0)) \
+ if (__glibc_unlikely (INT_MAX - done < _val)) \
{ \
done = -1; \
__set_errno (EOVERFLOW); \
@@ -91,7 +91,7 @@
if (width > 0) \
{ \
unsigned int d = _IO_padn (s, (Padchar), width); \
- if (__builtin_expect (d == EOF, 0)) \
+ if (__glibc_unlikely (d == EOF)) \
{ \
done = -1; \
goto all_done; \
@@ -120,7 +120,7 @@
if (width > 0) \
{ \
unsigned int d = _IO_wpadn (s, (Padchar), width); \
- if (__builtin_expect (d == EOF, 0)) \
+ if (__glibc_unlikely (d == EOF)) \
{ \
done = -1; \
goto all_done; \
@@ -166,7 +166,7 @@
done = -1; \
goto all_done; \
} \
- if (__builtin_expect (INT_MAX - done < (Len), 0)) \
+ if (__glibc_unlikely (INT_MAX - done < (Len))) \
{ \
done = -1; \
__set_errno (EOVERFLOW); \
@@ -1108,7 +1108,7 @@
outstring (string, len); \
if (left) \
PAD (L' '); \
- if (__builtin_expect (string_malloced, 0)) \
+ if (__glibc_unlikely (string_malloced)) \
free (string); \
} \
break;
@@ -1254,7 +1254,7 @@
outstring (string, len); \
if (left) \
PAD (' '); \
- if (__builtin_expect (string_malloced, 0)) \
+ if (__glibc_unlikely (string_malloced)) \
free (string); \
} \
break;
@@ -1315,9 +1315,9 @@
goto all_done;
/* Use the slow path in case any printf handler is registered. */
- if (__builtin_expect (__printf_function_table != NULL
+ if (__glibc_unlikely (__printf_function_table != NULL
|| __printf_modifier_table != NULL
- || __printf_va_arg_table != NULL, 0))
+ || __printf_va_arg_table != NULL))
goto do_positional;
/* Process whole format string. */
@@ -1452,7 +1452,7 @@
left = 1;
}
- if (__builtin_expect (width >= INT_MAX / sizeof (CHAR_T) - 32, 0))
+ if (__glibc_unlikely (width >= INT_MAX / sizeof (CHAR_T) - 32))
{
__set_errno (EOVERFLOW);
done = -1;
@@ -1484,8 +1484,8 @@
LABEL (width):
width = read_int (&f);
- if (__builtin_expect (width == -1
- || width >= INT_MAX / sizeof (CHAR_T) - 32, 0))
+ if (__glibc_unlikely (width == -1
+ || width >= INT_MAX / sizeof (CHAR_T) - 32))
{
__set_errno (EOVERFLOW);
done = -1;
@@ -1561,7 +1561,7 @@
if (prec > width
&& prec > sizeof (work_buffer) / sizeof (work_buffer[0]) - 32)
{
- if (__builtin_expect (prec >= INT_MAX / sizeof (CHAR_T) - 32, 0))
+ if (__glibc_unlikely (prec >= INT_MAX / sizeof (CHAR_T) - 32))
{
__set_errno (EOVERFLOW);
done = -1;
@@ -1645,7 +1645,7 @@
/* The format is correctly handled. */
++nspecs_done;
- if (__builtin_expect (workstart != NULL, 0))
+ if (__glibc_unlikely (workstart != NULL))
free (workstart);
workstart = NULL;
@@ -1691,7 +1691,7 @@
/* Just a counter. */
size_t cnt;
- if (__builtin_expect (workstart != NULL, 0))
+ if (__glibc_unlikely (workstart != NULL))
free (workstart);
workstart = NULL;
@@ -1737,7 +1737,7 @@
+ sizeof (*args_type));
/* Check for potential integer overflow. */
- if (__builtin_expect (nargs > INT_MAX / bytes_per_arg, 0))
+ if (__glibc_unlikely (nargs > INT_MAX / bytes_per_arg))
{
__set_errno (EOVERFLOW);
done = -1;
@@ -1842,7 +1842,7 @@
default:
if ((args_type[cnt] & PA_FLAG_PTR) != 0)
args_value[cnt].pa_pointer = va_arg (ap_save, void *);
- else if (__builtin_expect (__printf_va_arg_table != NULL, 0)
+ else if (__glibc_unlikely (__printf_va_arg_table != NULL)
&& __printf_va_arg_table[args_type[cnt] - PA_LAST] != NULL)
{
args_value[cnt].pa_user = alloca (args_size[cnt]);
@@ -2027,7 +2027,7 @@
break;
}
- if (__builtin_expect (workstart != NULL, 0))
+ if (__glibc_unlikely (workstart != NULL))
free (workstart);
workstart = NULL;
@@ -2039,9 +2039,9 @@
}
all_done:
- if (__builtin_expect (args_malloced != NULL, 0))
+ if (__glibc_unlikely (args_malloced != NULL))
free (args_malloced);
- if (__builtin_expect (workstart != NULL, 0))
+ if (__glibc_unlikely (workstart != NULL))
free (workstart);
/* Unlock the stream. */
_IO_funlockfile (s);
Removed: fsf/trunk/libc/sysdeps/generic/bp-sym.h
==============================================================================
--- fsf/trunk/libc/sysdeps/generic/bp-sym.h (original)
+++ fsf/trunk/libc/sysdeps/generic/bp-sym.h (removed)
@@ -1,25 +1,0 @@
-/* Bounded-pointer symbol modifier.
- Copyright (C) 2000-2013 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Greg McGary <greg@xxxxxxxxxx>
-
- 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/>. */
-
-#define BP_SYM(name) _BP_SYM (name)
-#if __BOUNDED_POINTERS__
-# define _BP_SYM(name) __BP_##name
-#else
-# define _BP_SYM(name) name
-#endif
Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc64/__longjmp-common.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/__longjmp-common.S (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc64/__longjmp-common.S Thu Mar 7 00:01:57 2013
@@ -24,8 +24,6 @@
#else
# include <jmpbuf-offsets.h>
#endif
-#include <bp-sym.h>
-#include <bp-asm.h>
#ifndef __NO_VMX__
.section ".toc","aw"
@@ -45,9 +43,8 @@
#endif
.machine "altivec"
-ENTRY (BP_SYM (__longjmp))
+ENTRY (__longjmp)
CALL_MCOUNT 2
- CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
#ifndef __NO_VMX__
ld r5,.LC__dl_hwcap@toc(r2)
# ifdef SHARED
@@ -178,4 +175,4 @@
lfd fp31,((JB_FPRS+17)*8)(r3)
mr r3,r4
blr
-END (BP_SYM (__longjmp))
+END (__longjmp)
Modified: fsf/trunk/libc/sysdeps/powerpc/powerpc64/a2/memcpy.S
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/a2/memcpy.S (original)
+++ fsf/trunk/libc/sysdeps/powerpc/powerpc64/a2/memcpy.S Thu Mar 7 00:01:57 2013
@@ -18,8 +18,6 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
#define PREFETCH_AHEAD 4 /* no cache lines SRC prefetching ahead */
#define ZERO_AHEAD 2 /* no cache lines DST zeroing ahead */
@@ -32,7 +30,7 @@
.machine a2
-EALIGN (BP_SYM (memcpy), 5, 0)
+EALIGN (memcpy, 5, 0)
CALL_MCOUNT 3
dcbt 0,r4 /* Prefetch ONE SRC cacheline */
@@ -522,5 +520,5 @@
b L(lessthancacheline)
-END_GEN_TB (BP_SYM (memcpy),TB_TOCLESS)
+END_GEN_TB (memcpy,TB_TOCLESS)
libc_hidden_builtin_def (memcpy)
Removed: fsf/trunk/libc/sysdeps/powerpc/powerpc64/bp-asm.h
==============================================================================
--- fsf/trunk/libc/sysdeps/powerpc/powerpc64/bp-asm.h (original)
[... 1773 lines stripped ...]
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits