about summary refs log tree commit diff
path: root/sysdeps
Commit message (Collapse)AuthorAgeFilesLines
* Update libm-test-ulps for MIPS.Joseph Myers2015-09-112-182/+182
| | | | | * sysdeps/mips/mips32/libm-test-ulps: Update. * sysdeps/mips/mips64/libm-test-ulps: Likewise.
* Fix ldbl-128/ldbl-128ibm lgamma spurious "invalid", incorrect signgam (bug ↵Joseph Myers2015-09-111-2/+2
| | | | | | | | | | | | | | | | | | | | 18952). The ldbl-128 / ldbl-128ibm implementation of lgammal converts (the floor of minus) non-integer negative arguments to int to determine the value of signgam. When those values are outside the range of int, this produces spurious "invalid" exceptions and incorrect values of signgam. This patch fixes this by instead determining signgam through comparing half the integer in question to floor of half the integer. Tested for mips64, x86_64 and x86. [BZ #18952] * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgammal_r): Do not convert non-integer negative arguments to int to determine the value of signgam. * math/auto-libm-test-in: Add more tests of lgamma. * math/auto-libm-test-out: Regenerated.
* Add more randomly-generated libm tests.Joseph Myers2015-09-112-39/+39
| | | | | | | | | | | | | This patch adds more libm test inputs found through random test generation to increase observed ulps on x86_64. Tested for x86_64 and x86. * math/auto-libm-test-in: Add more tests of acosh, atanh, cbrt, cosh, csqrt, erfc, expm1 and lgamma. * math/auto-libm-test-out: Regenerated. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
* Fix lgamma (negative) inaccuracy (bug 2542, bug 2543, bug 2558).Joseph Myers2015-09-1018-96/+2631
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing implementations of lgamma functions (except for the ia64 versions) use the reflection formula for negative arguments. This suffers large inaccuracy from cancellation near zeros of lgamma (near where the gamma function is +/- 1). This patch fixes this inaccuracy. For arguments above -2, there are no zeros and no large cancellation, while for sufficiently large negative arguments the zeros are so close to integers that even for integers +/- 1ulp the log(gamma(1-x)) term dominates and cancellation is not significant. Thus, it is only necessary to take special care about cancellation for arguments around a limited number of zeros. Accordingly, this patch uses precomputed tables of relevant zeros, expressed as the sum of two floating-point values. The log of the ratio of two sines can be computed accurately using log1p in cases where log would lose accuracy. The log of the ratio of two gamma(1-x) values can be computed using Stirling's approximation (the difference between two values of that approximation to lgamma being computable without computing the two values and then subtracting), with appropriate adjustments (which don't reduce accuracy too much) in cases where 1-x is too small to use Stirling's approximation directly. In the interval from -3 to -2, using the ratios of sines and of gamma(1-x) can still produce too much cancellation between those two parts of the computation (and that interval is also the worst interval for computing the ratio between gamma(1-x) values, which computation becomes more accurate, while being less critical for the final result, for larger 1-x). Because this can result in errors slightly above those accepted in glibc, this interval is instead dealt with by polynomial approximations. Separate polynomial approximations to (|gamma(x)|-1)(x-n)/(x-x0) are used for each interval of length 1/8 from -3 to -2, where n (-3 or -2) is the nearest integer to the 1/8-interval and x0 is the zero of lgamma in the relevant half-integer interval (-3 to -2.5 or -2.5 to -2). Together, the two approaches are intended to give sufficient accuracy for all negative arguments in the problem range. Outside that range, the previous implementation continues to be used. Tested for x86_64, x86, mips64 and powerpc. The mips64 and powerpc testing shows up pre-existing problems for ldbl-128 and ldbl-128ibm with large negative arguments giving spurious "invalid" exceptions (exposed by newly added tests for cases this patch doesn't affect the logic for); I'll address those problems separately. [BZ #2542] [BZ #2543] [BZ #2558] * sysdeps/ieee754/dbl-64/e_lgamma_r.c (__ieee754_lgamma_r): Call __lgamma_neg for arguments from -28.0 to -2.0. * sysdeps/ieee754/flt-32/e_lgammaf_r.c (__ieee754_lgammaf_r): Call __lgamma_negf for arguments from -15.0 to -2.0. * sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgammal_r): Call __lgamma_negl for arguments from -48.0 or -50.0 to -2.0. * sysdeps/ieee754/ldbl-96/e_lgammal_r.c (__ieee754_lgammal_r): Call __lgamma_negl for arguments from -33.0 to -2.0. * sysdeps/ieee754/dbl-64/lgamma_neg.c: New file. * sysdeps/ieee754/dbl-64/lgamma_product.c: Likewise. * sysdeps/ieee754/flt-32/lgamma_negf.c: Likewise. * sysdeps/ieee754/flt-32/lgamma_productf.c: Likewise. * sysdeps/ieee754/ldbl-128/lgamma_negl.c: Likewise. * sysdeps/ieee754/ldbl-128/lgamma_productl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/lgamma_negl.c: Likewise. * sysdeps/ieee754/ldbl-128ibm/lgamma_productl.c: Likewise. * sysdeps/ieee754/ldbl-96/lgamma_negl.c: Likewise. * sysdeps/ieee754/ldbl-96/lgamma_product.c: Likewise. * sysdeps/ieee754/ldbl-96/lgamma_productl.c: Likewise. * sysdeps/generic/math_private.h (__lgamma_negf): New prototype. (__lgamma_neg): Likewise. (__lgamma_negl): Likewise. (__lgamma_product): Likewise. (__lgamma_productl): Likewise. * math/Makefile (libm-calls): Add lgamma_neg and lgamma_product. * math/auto-libm-test-in: Add more tests of lgamma. * math/auto-libm-test-out: Regenerated. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
* To fix BZ #18675, use __fstatvfs64 in __fpathconf.Paul Pluzhnikov2015-09-091-11/+3
|
* Move bits/libc-lock.h and bits/libc-lockP.h out of bits/ (bug 14912).Joseph Myers2015-09-0831-39/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was noted in <https://sourceware.org/ml/libc-alpha/2012-09/msg00305.html> that the bits/*.h naming scheme should only be used for installed headers. This patch renames bits/libc-lock.h to plain libc-lock.h and bits/libc-lockP.h to plain libc-lockP.h to follow that convention. Note that I don't know where libc-lockP.h comes from for Hurd (the Hurd libc-lock.h includes libc-lockP.h, but the only libc-lockP.h in the glibc source tree is for NPTL) - some unmerged patch? - but I updated the #include in the Hurd libc-lock.h anyway. Tested for x86_64 (testsuite, and that installed stripped shared libraries are unchanged by the patch). [BZ #14912] * bits/libc-lock.h: Move to ... * sysdeps/generic/libc-lock.h: ...here. (_BITS_LIBC_LOCK_H): Rename macro to _LIBC_LOCK_H. * sysdeps/mach/hurd/bits/libc-lock.h: Move to ... * sysdeps/mach/hurd/libc-lock.h: ...here. (_BITS_LIBC_LOCK_H): Rename macro to _LIBC_LOCK_H. [_LIBC]: Include <libc-lockP.h> instead of <bits/libc-lockP.h>. * sysdeps/mach/bits/libc-lock.h: Move to ... * sysdeps/mach/libc-lock.h: ...here. (_BITS_LIBC_LOCK_H): Rename macro to _LIBC_LOCK_H. * sysdeps/nptl/bits/libc-lock.h: Move to ... * sysdeps/nptl/libc-lock.h: ...here. (_BITS_LIBC_LOCK_H): Rename macro to _LIBC_LOCK_H. * sysdeps/nptl/bits/libc-lockP.h: Move to ... * sysdeps/nptl/libc-lockP.h: ...here. (_BITS_LIBC_LOCKP_H): Rename macro to _LIBC_LOCKP_H. * crypt/crypt_util.c: Include <libc-lock.h> instead of <bits/libc-lock.h>. * dirent/scandir-tail.c: Likewise. * dlfcn/dlerror.c: Likewise. * elf/dl-close.c: Likewise. * elf/dl-iteratephdr.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-support.c: Likewise. * elf/dl-writev.h: Likewise. * elf/rtld.c: Likewise. * grp/fgetgrent.c: Likewise. * gshadow/fgetsgent.c: Likewise. * gshadow/sgetsgent.c: Likewise. * iconv/gconv_conf.c: Likewise. * iconv/gconv_db.c: Likewise. * iconv/gconv_dl.c: Likewise. * iconv/gconv_int.h: Likewise. * iconv/gconv_trans.c: Likewise. * include/link.h: Likewise. * inet/getnameinfo.c: Likewise. * inet/getnetgrent.c: Likewise. * inet/getnetgrent_r.c: Likewise. * intl/bindtextdom.c: Likewise. * intl/dcigettext.c: Likewise. * intl/finddomain.c: Likewise. * intl/gettextP.h: Likewise. * intl/loadmsgcat.c: Likewise. * intl/localealias.c: Likewise. * intl/textdomain.c: Likewise. * libidn/idn-stub.c: Likewise. * libio/libioP.h: Likewise. * locale/duplocale.c: Likewise. * locale/freelocale.c: Likewise. * locale/newlocale.c: Likewise. * locale/setlocale.c: Likewise. * login/getutent_r.c: Likewise. * login/getutid_r.c: Likewise. * login/getutline_r.c: Likewise. * login/utmp-private.h: Likewise. * login/utmpname.c: Likewise. * malloc/mtrace.c: Likewise. * misc/efgcvt.c: Likewise. * misc/error.c: Likewise. * misc/fstab.c: Likewise. * misc/getpass.c: Likewise. * misc/mntent.c: Likewise. * misc/syslog.c: Likewise. * nis/nis_call.c: Likewise. * nis/nis_callback.c: Likewise. * nis/nss-default.c: Likewise. * nis/nss_compat/compat-grp.c: Likewise. * nis/nss_compat/compat-initgroups.c: Likewise. * nis/nss_compat/compat-pwd.c: Likewise. * nis/nss_compat/compat-spwd.c: Likewise. * nis/nss_nis/nis-alias.c: Likewise. * nis/nss_nis/nis-ethers.c: Likewise. * nis/nss_nis/nis-grp.c: Likewise. * nis/nss_nis/nis-hosts.c: Likewise. * nis/nss_nis/nis-network.c: Likewise. * nis/nss_nis/nis-proto.c: Likewise. * nis/nss_nis/nis-pwd.c: Likewise. * nis/nss_nis/nis-rpc.c: Likewise. * nis/nss_nis/nis-service.c: Likewise. * nis/nss_nis/nis-spwd.c: Likewise. * nis/nss_nisplus/nisplus-alias.c: Likewise. * nis/nss_nisplus/nisplus-ethers.c: Likewise. * nis/nss_nisplus/nisplus-grp.c: Likewise. * nis/nss_nisplus/nisplus-hosts.c: Likewise. * nis/nss_nisplus/nisplus-initgroups.c: Likewise. * nis/nss_nisplus/nisplus-network.c: Likewise. * nis/nss_nisplus/nisplus-proto.c: Likewise. * nis/nss_nisplus/nisplus-pwd.c: Likewise. * nis/nss_nisplus/nisplus-rpc.c: Likewise. * nis/nss_nisplus/nisplus-service.c: Likewise. * nis/nss_nisplus/nisplus-spwd.c: Likewise. * nis/ypclnt.c: Likewise. * nptl/libc_pthread_init.c: Likewise. * nss/getXXbyYY.c: Likewise. * nss/getXXent.c: Likewise. * nss/getXXent_r.c: Likewise. * nss/nss_db/db-XXX.c: Likewise. * nss/nss_db/db-netgrp.c: Likewise. * nss/nss_db/nss_db.h: Likewise. * nss/nss_files/files-XXX.c: Likewise. * nss/nss_files/files-alias.c: Likewise. * nss/nsswitch.c: Likewise. * posix/regex_internal.h: Likewise. * posix/wordexp.c: Likewise. * pwd/fgetpwent.c: Likewise. * resolv/res_hconf.c: Likewise. * resolv/res_libc.c: Likewise. * shadow/fgetspent.c: Likewise. * shadow/lckpwdf.c: Likewise. * shadow/sgetspent.c: Likewise. * socket/opensock.c: Likewise. * stdio-common/reg-modifier.c: Likewise. * stdio-common/reg-printf.c: Likewise. * stdio-common/reg-type.c: Likewise. * stdio-common/vfprintf.c: Likewise. * stdio-common/vfscanf.c: Likewise. * stdlib/abort.c: Likewise. * stdlib/cxa_atexit.c: Likewise. * stdlib/fmtmsg.c: Likewise. * stdlib/random.c: Likewise. * stdlib/setenv.c: Likewise. * string/strsignal.c: Likewise. * sunrpc/auth_none.c: Likewise. * sunrpc/bindrsvprt.c: Likewise. * sunrpc/create_xid.c: Likewise. * sunrpc/key_call.c: Likewise. * sunrpc/rpc_thread.c: Likewise. * sysdeps/arm/backtrace.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/generic/stdio-lock.h: Likewise. * sysdeps/generic/unwind-dw2-fde.c: Likewise. * sysdeps/i386/backtrace.c: Likewise. * sysdeps/ieee754/ldbl-opt/nldbl-compat.c: Likewise. * sysdeps/m68k/backtrace.c: Likewise. * sysdeps/mach/hurd/cthreads.c: Likewise. * sysdeps/mach/hurd/dirstream.h: Likewise. * sysdeps/mach/hurd/malloc-machine.h: Likewise. * sysdeps/nptl/malloc-machine.h: Likewise. * sysdeps/nptl/stdio-lock.h: Likewise. * sysdeps/posix/dirstream.h: Likewise. * sysdeps/posix/getaddrinfo.c: Likewise. * sysdeps/posix/system.c: Likewise. * sysdeps/pthread/aio_suspend.c: Likewise. * sysdeps/s390/s390-32/backtrace.c: Likewise. * sysdeps/s390/s390-64/backtrace.c: Likewise. * sysdeps/unix/sysv/linux/check_pf.c: Likewise. * sysdeps/unix/sysv/linux/if_index.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getutid_r.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c: Likewise. * sysdeps/unix/sysv/linux/shm-directory.c: Likewise. * sysdeps/unix/sysv/linux/system.c: Likewise. * sysdeps/x86_64/backtrace.c: Likewise. * time/alt_digit.c: Likewise. * time/era.c: Likewise. * time/tzset.c: Likewise. * wcsmbs/wcsmbsload.c: Likewise. * nptl/tst-initializers1.c (do_test): Refer to <libc-lock.h> instead of <bits/libc-lock.h> in comment.
* MIPS: Only use .set mips* assembler directives when necessaryAndrew Bennett2015-09-085-23/+40
| | | | | | | | | | | | | | | | | | | | | | There are a few .set mips* assembler directives used in the MIPS specific sysdep code that force an instruction to be assembled for a specific ISA. The reason for these is to allow an instruction to be encoded when it might not be supported in the current ISA (when the code is run the Linux kernel will trap and emulate any unsupported instructions). Unfortunately forcing a specific ISA means that when assembling for a newer ISA, where the instruction has a different encoding, the wrong encoding will be used. * sysdeps/mips/bits/atomic.h [_MIPS_SIM == _ABIO32] (MIPS_PUSH_MIPS2): Only use .set mips2 if the current ISA is below mips2. * sysdeps/mips/sys/tas.h [_MIPS_SIM == _ABIO32] (_test_and_set): Likewise. * sysdeps/mips/nptl/tls.h (READ_THREAD_POINTER): Only use .set mips32r2 if the current ISA is below mips32r2. * sysdeps/mips/tls-macros.h (TLS_RDHWR): New define. (TLS_IE): Updated to use the TLD_RDHWR macro. (TLS_LE): Likewise. * sysdeps/unix/mips/sysdep.h (__mips_isa_rev): Moved out of #ifdef __ASSEMBLER__ condition.
* Fix parallel build of before-compile targets.Samuel Thibault2015-09-082-3/+6
| | | | | | | | * sysdeps/mach/Makefile ($(patsubst mach%,m\%h%,$(mach-before-compile))): Move rule to dedicated mach-before-compile target. * sysdeps/mach/hurd/Makefile ($(patsubst %,$(hurd-objpfx)hurd/%.%,auth io fs process)): Move rule to dedicated hurd-before-compile target.
* Fix rules generating headers in hurd/ and mach/Samuel Thibault2015-09-062-3/+3
| | | | | | | | | | | | when initial make call has subdir= explicitly set. * sysdeps/mach/Makefile ($(patsubst mach%,m\%h%,$(mach-before-compile))): Force subdir to mach when calling $(MAKE). * sysdeps/mach/hurd/Makefile ($(patsubst %,$(hurd-objpfx)hurd/%.%,auth io fs process)): Force subdir to hurd when calling $(MAKE). ($(common-objpfx)hurd/../mach/RPC_task_get_sampled_pcs.c): Force subdir to mach when calling $(MAKE).
* Check sysheaders when looking for Mach and Hurd headersManolis Ragkousis2015-09-064-0/+36
| | | | | | | * sysdeps/mach/configure.ac: Add sysheaders check. * sysdeps/mach/configure: Regenerate. * sysdeps/mach/hurd/configure.ac: Add sysheaders check. * sysdeps/mach/hurd/configure: Regenerate.
* BZ#18921: Fix opendir inverted o_directory_works test.Roland McGrath2015-09-041-1/+1
|
* Rename bits/linkmap.h to linkmap.h (bug 14912).Joseph Myers2015-09-049-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was noted in <https://sourceware.org/ml/libc-alpha/2012-09/msg00305.html> that the bits/*.h naming scheme should only be used for installed headers. This patch renames bits/linkmap.h to plain linkmap.h to follow that convention. Tested for x86_64 (testsuite, and that installed stripped shared libraries are unchanged by the patch). [BZ #14912] * bits/linkmap.h: Move to ... * sysdeps/generic/linkmap.h: ...here. * sysdeps/aarch64/bits/linkmap.h: Move to ... * sysdeps/aarch64/linkmap.h: ...here. * sysdeps/arm/bits/linkmap.h: Move to ... * sysdeps/arm/linkmap.h: ...here. * sysdeps/hppa/bits/linkmap.h: Move to ... * sysdeps/hppa/linkmap.h: ...here. * sysdeps/ia64/bits/linkmap.h: Move to ... * sysdeps/ia64/linkmap.h: ...here. * sysdeps/mips/bits/linkmap.h: Move to ... * sysdeps/mips/linkmap.h: ...here. * sysdeps/s390/bits/linkmap.h: Move to ... * sysdeps/s390/linkmap.h: ...here. * sysdeps/sh/bits/linkmap.h: Move to ... * sysdeps/sh/linkmap.h: ...here. * sysdeps/x86/bits/linkmap.h: Move to ... * sysdeps/x86/linkmap.h: ...here. * include/link.h: Include <linkmap.h> instead of <bits/linkmap.h>.
* Terminate FDE before return trampoline in makecontext for powerpc (bug 18635)Andreas Schwab2015-09-041-0/+6
| | | | | | | | | This fixes tst-makecontext for PowerPC. [BZ #18635] * sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S (__makecontext): Terminate FDE before return label. (__novec_makecontext): Likewise.
* powerpc: Fix compiler warning in some syscalls.Carlos Eduardo Seo2015-09-041-1/+1
| | | | | | | | | Commit f4491417cc80b4a01e72e9d218af137765ee5918 introduced some warnings when building GLIBC with GCC 5.x. similar to those fixed by commit dd6e8af6ba1b8a95a7f1dc7422e5ea4ccc7fbd93. This patch fixes those warnings. * sysdeps/unix/sysv/linux/socketpair.c: Use the address of the first member of struct sv in syscall macro.
* Rename bits/stdio-lock.h to stdio-lock.h (bug 14912).Joseph Myers2015-09-046-7/+64
| | | | | | | | | | | | | | | | | | | | | | | | | It was noted in <https://sourceware.org/ml/libc-alpha/2012-09/msg00305.html> that the bits/*.h naming scheme should only be used for installed headers. This patch renames bits/stdio-lock.h to plain stdio-lock.h to follow that convention. Tested for x86_64 (testsuite, and that installed stripped shared libraries are unchanged by the patch). [BZ #14912] * bits/stdio-lock.h: Move to ... * sysdeps/generic/stdio-lock.h: ...here. (_BITS_STDIO_LOCK_H): Rename macro to _STDIO_LOCK_H. * sysdeps/nptl/bits/stdio-lock.h: Move to ... * sysdeps/nptl/stdio-lock.h: ...here. (_BITS_STDIO_LOCK_H): Rename macro to _STDIO_LOCK_H. * include/libio.h: Include <stdio-lock.h> instead of <bits/stdio-lock.h>. * sysdeps/nptl/fork.c: Likewise. * sysdeps/pthread/flockfile.c: Likewise. * sysdeps/pthread/ftrylockfile.c: Likewise. * sysdeps/pthread/funlockfile.c: Likewise.
* Rename bits/m68k-vdso.h to m68k-vdso.h (bug 14912).Joseph Myers2015-09-045-4/+4
| | | | | | | | | | | | | | | | | It was noted in <https://sourceware.org/ml/libc-alpha/2012-09/msg00305.html> that the bits/*.h naming scheme should only be used for installed headers. This patch renames bits/m68k-vdso.h to plain m68k-vdso.h to follow that convention. [BZ #14912] * sysdeps/unix/sysv/linux/m68k/bits/m68k-vdso.h: Move to ... * sysdeps/unix/sysv/linux/m68k/m68k-vdso.h: ...here. * sysdeps/unix/sysv/linux/m68k/coldfire/bits/atomic.h: Include <m68k-vdso.h> instead of <bits/m68k-vdso.h>. * sysdeps/unix/sysv/linux/m68k/init-first.c: Likewise. * sysdeps/unix/sysv/linux/m68k/m68k-helpers.S: Likewise. * sysdeps/unix/sysv/linux/m68k/m68k-vdso.c: Likewise.
* Rename bits/libc-tsd.h to libc-tsd.h (bug 14912).Joseph Myers2015-09-034-5/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | It was noted in <https://sourceware.org/ml/libc-alpha/2012-09/msg00305.html> that the bits/*.h naming scheme should only be used for installed headers. This patch renames bits/libc-tsd.h to plain libc-tsd.h to follow that convention. Tested for x86_64 (testing, and that installed stripped shared libraries are unchanged by the patch). [BZ #14912] * bits/libc-tsd.h: Move to ... * sysdeps/generic/libc-tsd.h: ...here. (_GENERIC_BITS_LIBC_TSD_H): Rename macro to _GENERIC_LIBC_TSD_H. * sysdeps/mach/hurd/bits/libc-tsd.h: Move to ... * sysdeps/mach/hurd/libc-tsd.h: ...here. (_BITS_LIBC_TSD_H): Rename macro to _LIBC_TSD_H. * include/ctype.h: Include <libc-tsd.h> instead of <bits/libc-tsd.h>. * include/rpc/rpc.h: Likewise. * locale/localeinfo.h: Likewise. * sunrpc/rpc_thread.c: Likewise. * sysdeps/mach/hurd/malloc-machine.h: Likewise. * sysdeps/nptl/malloc-machine.h: Likewise.
* Add netinet/in.h values from Linux 4.2.Joseph Myers2015-09-011-0/+1
| | | | | | | | | | | | | | This patch adds new constants from Linux 4.2 to netinet/in.h: IPPROTO_MPLS and IP_BIND_ADDRESS_NO_PORT (both in include/uapi/linux/in.h in Linux; one directly in netinet/in.h, one in bits/in.h in glibc). Tested for x86_64 (testsuite, and that installed stripped shared libraries are unchanged by the patch). * inet/netinet/in.h (IPPROTO_MPLS): New enum value and macro. * sysdeps/unix/sysv/linux/bits/in.h (IP_BIND_ADDRESS_NO_PORT): New macro.
* Add more TCP_* values to netinet/tcp.h.Joseph Myers2015-09-011-0/+8
| | | | | | | | | | | | | | | | | This patch adds move TCP_* values to sysdeps/gnu/netinet/tcp.h to bring it up to date with Linux 4.2. TCP_SAVE_SYN and TCP_SAVED_SYN are new in 4.2, TCP_NOTSENT_LOWAT and TCP_CC_INFO are older (Szabolcs previously noted in <https://sourceware.org/ml/libc-alpha/2015-06/msg00938.html> that this header was out of date in glibc). Tested for x86_64 (testsuite, and that installed stripped shared libraries are unchanged by the patch). * sysdeps/gnu/netinet/tcp.h (TCP_NOTSENT_LOWAT): New macro. (TCP_CC_INFO): Likewise. (TCP_SAVE_SYN): Likewise. (TCP_SAVED_SYN): Likewise.
* Fix non-v9 32-bit sparc build.Brett Neumeier2015-08-311-0/+1
| | | | | [BZ #18870] * sysdeps/sparc/sparc32/sem_open.c: Add missing #include
* Fix broken overflow check in posix_fallocate [BZ 18873]Paul Eggert2015-08-312-2/+2
| | | | | | * sysdeps/posix/posix_fallocate.c (posix_fallocate): * sysdeps/posix/posix_fallocate64.c (__posix_fallocate64_l64): Fix parenthesization typo.
* Fix wordsize-32 mmap offset for negative value (BZ#18877)Adhemerval Zanella2015-08-281-4/+4
| | | | | | | | | | | | | | | | This patch fixes the default wordsize-32 mmap implementation offset calculation for negative values. Current code uses signed shift operation to calculate the multiple size to use with syscall and it is implementation defined. Change it to use a division base on mmap page size (default being as before, 4096). Tested on armv7hf. [BZ #18877] * posix/Makefile (tests): Add tst-mmap-offset. * posix/tst-mmap.c: New file. * sysdeps/unix/sysv/linux/generic/wordsize-32/mmap.c (__mmap): Fix offset calculation for negative values.
* Detect and select i586/i686 implementation at run-time fedora/masterH.J. Lu2015-08-276-3/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We detect i586 and i686 features at run-time by checking CX8 and CMOV CPUID features bits. We can use these information to select the best implementation in ix86 multiarch. HAS_I586/HAS_I686 is true if i586/i686 instructions are available on the processor. Due to the reordering and the other nifty extensions in i686, it is not really good to use heavily i586 optimized code on an i686. It's better to use i486 code if it isn't an i586. USE_I586/USE_I686 is true if i586/i686 implementation should be used for the processor. USE_I586 is true only if i686 instructions aren't available. If i686 instructions are available, we always choose i686 or i486 implementation, in that order, and we never choose i586 implementation for i686-class processors. * sysdeps/i386/init-arch.h: New file. * sysdeps/i386/i586/init-arch.h: Likewise. * sysdeps/i386/i686/init-arch.h: Likewise. * sysdeps/x86/cpu-features.c (init_cpu_features): Set bit_I586 bit if CX8 is available. Set bit_I686 bit if CMOV is available. * sysdeps/x86/cpu-features.h (bit_I586): New. (bit_I686): Likewise. (bit_CX8): Likewise. (bit_CMOV): Likewise. (index_CX8): Likewise. (index_CMOV): Likewise. (index_I586): Likewise. (index_I686): Likewise. (reg_CX8): Likewise. (reg_CMOV): Likewise. (HAS_I586): Defined as HAS_ARCH_FEATURE (I586) if i586 isn't available at compile-time. (HAS_I686): Defined as HAS_ARCH_FEATURE (I686) if i686 isn't available at compile-time. * sysdeps/x86/init-arch.h (USE_I586): New macro. (USE_I686): Likewise.
* Add i386 memset and memcpy assembly functionsH.J. Lu2015-08-2715-198/+208
| | | | | | | | | | | | | | | | | | | | | | | | | Add i386 memset and memcpy assembly functions with REP MOVSB/STOSB instructions. * sysdeps/i386/bcopy.S: New file. * sysdeps/i386/bzero.S: Likewise. * sysdeps/i386/memcpy.S: Likewise. * sysdeps/i386/memmove.S: Likewise. * sysdeps/i386/mempcpy.S: Likewise. * sysdeps/i386/memset.S: Likewise. * sysdeps/i386/bzero.c: Removed. * sysdeps/i386/memset.c: Likewise. * sysdeps/i386/i586/memcpy_chk.S: Likewise. * sysdeps/i386/i586/mempcpy_chk.S: Likewise. * sysdeps/i386/i586/memset_chk.S: Likewise. * sysdeps/i386/i686/memcpy_chk.S: Moved to ... * sysdeps/i386/memcpy_chk.S: Here. * sysdeps/i386/i686/memmove_chk.S: Moved to ... * sysdeps/i386/memmove_chk.S: Here. * sysdeps/i386/i686/mempcpy_chk.S: Moved to ... * sysdeps/i386/mempcpy_chk.S: Likewise. * sysdeps/i386/i686/memset_chk.S: Moved to ... * sysdeps/i386/memset_chk.S: Likewise.
* Remove i486 subdirectoryH.J. Lu2015-08-272-6/+0
| | | | | | | Since glibc doesn't support i386 any more, we can remove i486 subdirectory. * sysdeps/i386/i586/Implies: Removed. * sysdeps/i386/i686/Implies: Likewise.
* Move i486/strlen.S to strlen.SH.J. Lu2015-08-271-0/+0
| | | | | | | | Since glibc doesn't support i386 any more, we can move i486/strlen.S to strlen.S. * sysdeps/i386/i486/strlen.S: Moved to ... * sysdeps/i386/strlen.S: Here.
* Move i486/strcat.S to strcat.SH.J. Lu2015-08-272-1/+1
| | | | | | | | | Since glibc doesn't support i386 any more, we can move i486/strcat.S to strcat.S. * sysdeps/i386/i486/strcat.S: Moved to ... * sysdeps/i386/strcat.S: Here. * sysdeps/i386/i686/multiarch/strcat.S: Updated.
* Move i486/pthread_spin_trylock.S to pthread_spin_trylock.SH.J. Lu2015-08-273-2/+1
| | | | | | | | | | Since glibc doesn't support i386 any more, we can move i486/pthread_spin_trylock.S to pthread_spin_trylock.S * sysdeps/i386/i486/pthread_spin_trylock.S: Moved to ... * sysdeps/i386/pthread_spin_trylock.S: Here. * sysdeps/i386/i586/pthread_spin_trylock.S: Removed. * sysdeps/i386/i686/pthread_spin_trylock.S: Updated.
* Move i486/string-inlines.c to string-inlines.cH.J. Lu2015-08-272-204/+16
| | | | | | | | Since glibc doesn't support i386 any more, we can move i486/string-inlines.c to string-inlines.c. * sysdeps/i386/i486/string-inlines.c: Moved to ... * sysdeps/i386/string-inlines.c: Here.
* Move i486/htonl.S to htonl.SH.J. Lu2015-08-272-38/+2
| | | | | | | | Since glibc doesn't support i386 any more, we can move i486/htonl.S to htonl.S. * sysdeps/i386/i486/htonl.S: Moved ... * sysdeps/i386/htonl.S: here.
* Move i486/bits/atomic.h to bits/atomic.hH.J. Lu2015-08-271-0/+0
| | | | | | | | Since glibc doesn't support i386 any more, we can move i486/bits/atomic.h to bits/atomic.h. * sysdeps/i386/i486/bits/atomic.h: Moved to ... * sysdeps/i386/bits/atomic.h: Here.
* Remove sysdeps/i386/i486/VersionsH.J. Lu2015-08-271-13/+0
| | | | | | | sysdeps/i386/i486/Versions isn't needed since it duplicates contents in sysdeps/i386/Versions. * sysdeps/i386/i486/Versions: Removed.
* Disable uninitialized warning with GCC 4.8Stan Shebs2015-08-261-0/+12
| | | | | | | | | As with other spots in the code, GCC 4.8 unnecessarily complains about an uninitialized variable in tanl calcs, so this patch disables. With it, the library and sees the usual set of test passes. * sysdeps/ieee754/ldbl-96/k_tanl.c: Include <libc-internal.h>. (__kernel_tanl): Ignore uninitialized warnings around use of SIGN.
* powerpc: Sync hwcap.h with kernelCarlos Eduardo Seo2015-08-262-1/+3
| | | | | | | | | | | | | | Linux commit b4b56f9ecab40f3b4ef53e130c9f6663be491894 introduced a new HWCAP2 bit to indicate that the kernel now aborts a memory transaction when a syscall is made. This patch adds that bit to sysdeps/powerpc/bits/hwcap.h. 2015-08-26 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com> * sysdeps/powerpc/bits/hwcap.h: Add PPC_FEATURE2_HTM_NOSC. * sysdeps/powerpc/dl-procinfo.c: (_dl_powerpc_cap_flags): Added descriptor for this hwcap feature so it shows when LD_SHOW_AUXV=1.
* powerpc: Revert to default atomic ops in elision codePaul E. Murphy2015-08-261-21/+0
| | | | | | | | | | | Power ISA 2.07B section B.5.5 relaxed the barrier requirement around a TLE enabled lock. It is now identical to a traditional lock. 2015-08-26 Paul E. Murphy <murphyp@linux.vnet.ibm.com> * sysdeps/unix/sysv/linux/powerpc/elision-lock.c (__arch_compare_and_exchange_val_32_acq): Remove and use common definition. ISA 2.07B no longer requires full sync.
* mips: siginfo.h: add SIGSYS details [BZ #18863]Mike Frysinger2015-08-261-0/+11
| | | | | Linux 3.13 added SIGSYS details to siginfo_t; update glibc's copy to keep in sync with it.
* Replace BZERO_P/PIC with USE_AS_BZERO/SHAREDH.J. Lu2015-08-264-24/+20
| | | | | | | | | | | | | | | | Replace BZERO_P with USE_AS_BZERO in i586/i686 memset.S to support i386 multi-arch memset. Also we should check SHARED not PIC for libc.so since libc.a may be compiled with PIC. * sysdeps/i386/i586/bzero.S (USE_AS_BZERO): New. * sysdeps/i386/i686/bzero.S (USE_AS_BZERO): Likewise. * sysdeps/i386/i586/memset.S (BZERO_P): Removed. Check USE_AS_BZERO/SHARED instead of BZERO_P/PIC. (__memset_zero_constant_len_parameter): New. * sysdeps/i386/i686/memset.S (BZERO_P): Removed. Check USE_AS_BZERO/SHARED instead of BZERO_P/PIC. (__memset_zero_constant_len_parameter): Don't define if __memset_chk or USE_AS_BZERO are defined.
* Replace MEMPCPY_P/PIC with USE_AS_MEMPCPY/SHAREDH.J. Lu2015-08-262-8/+4
| | | | | | | | | | Replace MEMPCPY_P with USE_AS_MEMPCPY in i586 memcpy.S to support i386 multi-arch memcpy. Also we should check SHARED not PIC for libc.so since libc.a may be compiled with PIC. * sysdeps/i386/i586/memcpy.S (MEMPCPY_P): Removed. Check USE_AS_MEMPCPY/SHARED instead of MEMPCPY_P/PIC. * sysdeps/i386/i586/mempcpy.S (USE_AS_MEMPCPY): New.
* Don't disable SSE in x86-64 ld.soH.J. Lu2015-08-264-12/+19
| | | | | | | | | | | | | | | | Since x86-64 ld.so preserves vector registers now, we can use SSE in x86-64 ld.so. We should run tst-ld-sse-use.sh only on i386. * sysdeps/x86/Makefile [$(subdir) == elf] (CFLAGS-.os, tests-special, $(objpfx)tst-ld-sse-use.out): Moved to ... * sysdeps/i386/Makefile [$(subdir) == elf] (CFLAGS-.os, tests-special, $(objpfx)tst-ld-sse-use.out): Here. Update comments. * sysdeps/x86_64/Makefile [$(subdir) == elf] (CFLAGS-.os): Add -mno-mmx for $(all-rtld-routines). * sysdeps/x86/tst-ld-sse-use.sh: Moved to ... * sysdeps/i386/tst-ld-sse-use.sh: Here. Replace x86-64 with i386.
* Adjust _Unwind_Word in unwind.h to version in libgcc.Stefan Liebler2015-08-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Building glibc on s390-32 with gcc option -mzarch produces the error due to sysdeps/s390/jmpbuf-unwind.h:37:10: (void *) (_Unwind_GetCFA (_context): cast to pointer from integer of different size [-Werror=int-to-pointer-cast] Building on s390-32 in esa-mode or s390-64 is fine. _Unwind_GetCFA returns an _Unwind_Word which is an unsigned with a size of 4 bytes on s390-32 (esa-mode) and 8 bytes on s390-64. On s390-32 (zarch-mode), _Unwind_Word has a size of 8 bytes, too. _Unwind_Word is defined in sysdeps/generic/unwind.h as typedef unsigned _Unwind_Word __attribute__((__mode__(__word__))); In libgcc unwind header (<gcc-src>/libgcc/unwind-generic.h) this typedef has changed to "typedef unsigned _Unwind_Word __attribute__((__mode__(__unwind_word__)));" in June 2008. With this mode, _Unwind_Word has a size of 4 bytes on s390-32 (zarch-mode). The same change applies to _Unwind_Sword. Thus this patch updates the unwind header according to these changes. Afterwards, the int-to-pointer-cast-warning is gone away on s390-32 (zarch-mode) and the testsuite runs with the same test-failures as s390-32 (esa-mode) plus FAIL: c++-types-check. Here register_t is expected to has a size of 4 bytes, but it has a size of 8 bytes due to: posix/sys/types.h:205:typedef int register_t __attribute__ ((__mode__ (__word__))); The libgcc-patch for gcc 4.4 can be found here: "[PATCH, spu, unwind] Remove attribute ((mode (word))) from unwind.h" https://gcc.gnu.org/ml/gcc-patches/2008-06/msg00969.html ChangeLog: * sysdeps/generic/unwind.h (_Unwind_Word): Use __mode__(__unwind_word__) instead of __mode__(__word__). (_Unwind_Sword): Likewise.
* S390: Fix build error with gcc6 in utf8_utf16-z9.c.Stefan Liebler2015-08-261-0/+2
| | | | | | | | | | | | | | | | | | This patch fixes the build error with gcc6: array subscript is above array bounds [-Werror=array-bounds] While including loop.c to construct the SINGLE(LOOPFCT) method for converting from UTF-16 to UTF-8, the bytebuf array with length MAX_NEEDED_INPUT is used as inptr. MAX_NEEDED_INPUT defaults to MIN_NEEDED_INPUT if not defined before including loop.c. Thus bytebuf has a length of 2. This patch defines MAX_NEEDED_INPUT to MAX_NEEDED_TO, which is 4. ChangeLog: * sysdeps/s390/s390-64/utf8-utf16-z9.c (MAX_NEEDED_INPUT): New define. (MAX_NEEDED_OUTPUT): New define.
* S390: Optimize memrchr.Stefan Liebler2015-08-265-1/+217
| | | | | | | | | | | | | | | This patch provides optimized version of memrchr with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/memrchr-c.c: New File. * sysdeps/s390/multiarch/memrchr-vx.S: Likewise. * sysdeps/s390/multiarch/memrchr.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add memrchr functions. * sysdeps/s390/multiarch/ifunc-impl-list-common.c (__libc_ifunc_impl_list_common): Add ifunc test for memrchr.
* S390: Optimize wmemcmp.Stefan Liebler2015-08-265-1/+207
| | | | | | | | | | | | | | | | | This patch provides optimized version of wmemcmp with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/wmemcmp-c.c: New File. * sysdeps/s390/multiarch/wmemcmp-vx.S: Likewise. * sysdeps/s390/multiarch/wmemcmp.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add wmemcmp functions. * sysdeps/s390/multiarch/ifunc-impl-list-common.c (__libc_ifunc_impl_list_common): Add ifunc test for wmemcmp. * benchtests/bench-wmemcmp.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wmemcmp.
* S390: Optimize wmemset.Stefan Liebler2015-08-265-1/+211
| | | | | | | | | | | | | | | | | | | | | | This patch provides optimized version of wmemset with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/wmemset-c.c: New File. * sysdeps/s390/multiarch/wmemset-vx.S: Likewise. * sysdeps/s390/multiarch/wmemset.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add wmemset functions. * sysdeps/s390/multiarch/ifunc-impl-list-common.c (__libc_ifunc_impl_list_common): Add ifunc test for wmemset. * wcsmbs/wmemset.c: Use WMEMSET if defined. * string/test-memset.c: Add wmemset support. * wcsmbs/test-wmemset.c: New File. * wcsmbs/Makefile (strop-tests): Add wmemset. * benchtests/bench-memset.c: Add wmemset support. * benchtests/bench-wmemset.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wmemset.
* S390: Optimize memccpy.Stefan Liebler2015-08-265-1/+213
| | | | | | | | | | | | | | | | This patch provides optimized versions of memccpy with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/memccpy-c.c: New File. * sysdeps/s390/multiarch/memccpy-vx.S: Likewise. * sysdeps/s390/multiarch/memccpy.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add memccpy functions. * sysdeps/s390/multiarch/ifunc-impl-list-common.c (__libc_ifunc_impl_list_common): Add ifunc test for memccpy. * string/memccpy.c: Use MEMCCPY if defined.
* S390: Optimize memchr, rawmemchr and wmemchr.Stefan Liebler2015-08-2612-2/+620
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides optimized versions of memchr, rawmemchr and wmemchr with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/memchr-vx.S: New File. * sysdeps/s390/multiarch/memchr.c: Likewise. * sysdeps/s390/multiarch/rawmemchr-c.c: Likewise. * sysdeps/s390/multiarch/rawmemchr-vx.S: Likewise. * sysdeps/s390/multiarch/rawmemchr.c: Likewise. * sysdeps/s390/multiarch/wmemchr-c.c: Likewise. * sysdeps/s390/multiarch/wmemchr-vx.S: Likewise. * sysdeps/s390/multiarch/wmemchr.c: Likewise. * sysdeps/s390/s390-32/multiarch/memchr.c: Likewise. * sysdeps/s390/s390-64/multiarch/memchr.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add memchr, wmemchr and rawmemchr functions. * sysdeps/s390/multiarch/ifunc-impl-list-common.c (__libc_ifunc_impl_list_common): Add ifunc test for memchr, rawmemchr and wmemchr. * wcsmbs/wmemchr.c: Use WMEMCHR if defined. * string/test-memchr.c: Add wmemchr support. * wcsmbs/test-wmemchr.c: New File. * wcsmbs/Makefile (strop-tests): Add wmemchr. * benchtests/bench-memchr.c: Add wmemchr support. * benchtests/bench-wmemchr.c: New File. * benchtests/Makefile (wcsmbs-bench): wmemchr.
* S390: Optimize strcspn and wcscspn.Stefan Liebler2015-08-268-2/+689
| | | | | | | | | | | | | | | | | | | | | | | | | This patch provides optimized versions of strcspn and wcscspn with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strcspn-c.c: New File. * sysdeps/s390/multiarch/strcspn-vx.S: Likewise. * sysdeps/s390/multiarch/strcspn.c: Likewise. * sysdeps/s390/multiarch/wcscspn-c.c: Likewise. * sysdeps/s390/multiarch/wcscspn-vx.S: Likewise. * sysdeps/s390/multiarch/wcscspn.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strcspn and wcscspn functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strcspn, wcscspn. * wcsmbs/wcscspn.c: Use WCSCSPN if defined. * string/test-strcspn.c: Add wcscspn support. * wcsmbs/test-wcscspn.c: New File. * wcsmbs/Makefile (strop-tests): Add wcscspn. * benchtests/bench-strcspn.c: Add wcscspn support. * benchtests/bench-wcscspn.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcscspn.
* S390: Optimize strpbrk and wcspbrk.Stefan Liebler2015-08-268-2/+737
| | | | | | | | | | | | | | | | | | | | | | | | | This patch provides optimized versions of strpbrk and wcspbrk with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strpbrk-c.c: New File. * sysdeps/s390/multiarch/strpbrk-vx.S: Likewise. * sysdeps/s390/multiarch/strpbrk.c: Likewise. * sysdeps/s390/multiarch/wcspbrk-c.c: Likewise. * sysdeps/s390/multiarch/wcspbrk-vx.S: Likewise. * sysdeps/s390/multiarch/wcspbrk.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strpbrk and wcspbrk functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strpbrk, wcspbrk. * wcsmbs/wcspbrk.c: Use WCSPBRK if defined. * string/test-strpbrk.c: Add wcspbrk support. * wcsmbs/test-wcspbrk.c: New File. * wcsmbs/Makefile (strop-tests): Add wcspbrk. * benchtests/bench-strpbrk.c: Add wcspbrk support. * benchtests/bench-wcspbrk.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcspbrk.
* S390: Optimize strspn and wcsspn.Stefan Liebler2015-08-268-2/+646
| | | | | | | | | | | | | | | | | | | | | | | | | This patch provides optimized versions of strspn and wcsspn with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strspn-c.c: New File. * sysdeps/s390/multiarch/strspn-vx.S: Likewise. * sysdeps/s390/multiarch/strspn.c: Likewise. * sysdeps/s390/multiarch/wcsspn-c.c: Likewise. * sysdeps/s390/multiarch/wcsspn-vx.S: Likewise. * sysdeps/s390/multiarch/wcsspn.c: Likewise. * wcsmbs/wcsspn.c: Use WCSSPN if defined. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strspn and wcsspn functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strspn, wcsspn. * string/test-strspn.c: Add wcsspn support. * wcsmbs/test-wcsspn.c: New File. * wcsmbs/Makefile (strop-tests): Add wcsspn. * benchtests/bench-strspn.c: Add wcsspn support. * benchtests/bench-wcsspn.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcsspn.
* S390: Optimize strrchr and wcsrchr.Stefan Liebler2015-08-268-2/+486
| | | | | | | | | | | | | | | | | | | | This patch provides optimized versions of strrchr and wcsrchr with the z13 vector instructions. ChangeLog: * sysdeps/s390/multiarch/strrchr-c.c: New File. * sysdeps/s390/multiarch/strrchr-vx.S: Likewise. * sysdeps/s390/multiarch/strrchr.c: Likewise. * sysdeps/s390/multiarch/wcsrchr-c.c: Likewise. * sysdeps/s390/multiarch/wcsrchr-vx.S: Likewise. * sysdeps/s390/multiarch/wcsrchr.c: Likewise. * sysdeps/s390/multiarch/Makefile (sysdep_routines): Add strrchr and wcsrchr functions. * sysdeps/s390/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add ifunc test for strrchr, wcsrchr. * benchtests/bench-wcsrchr.c: New File. * benchtests/Makefile (wcsmbs-bench): Add wcsrchr.