about summary refs log tree commit diff
path: root/sysdeps
Commit message (Collapse)AuthorAgeFilesLines
* Group AVX512 functions in .text.avx512 sectionH.J. Lu2016-03-062-2/+2
| | | | | | | * sysdeps/x86_64/multiarch/memcpy-avx512-no-vzeroupper.S: Replace .text with .text.avx512. * sysdeps/x86_64/multiarch/memset-avx512-no-vzeroupper.S: Likewise.
* Add placeholder libnsl.abilist and libutil.abilist filesAurelien Jarno2016-03-072-0/+0
| | | | | | Changelog: * sysdeps/generic/libnsl.abilist: New file. * sysdeps/generic/libutil.abilist: New file.
* Use HAS_ARCH_FEATURE with Fast_Rep_StringH.J. Lu2016-03-069-9/+9
| | | | | | | | | | | | | | | | | | | | | HAS_ARCH_FEATURE, not HAS_CPU_FEATURE, should be used with Fast_Rep_String. [BZ #19762] * sysdeps/i386/i686/multiarch/bcopy.S (bcopy): Use HAS_ARCH_FEATURE with Fast_Rep_String. * sysdeps/i386/i686/multiarch/bzero.S (__bzero): Likewise. * sysdeps/i386/i686/multiarch/memcpy.S (memcpy): Likewise. * sysdeps/i386/i686/multiarch/memcpy_chk.S (__memcpy_chk): Likewise. * sysdeps/i386/i686/multiarch/memmove_chk.S (__memmove_chk): Likewise. * sysdeps/i386/i686/multiarch/mempcpy.S (__mempcpy): Likewise. * sysdeps/i386/i686/multiarch/mempcpy_chk.S (__mempcpy_chk): Likewise. * sysdeps/i386/i686/multiarch/memset.S (memset): Likewise. * sysdeps/i386/i686/multiarch/memset_chk.S (__memset_chk): Likewise.
* Replace PREINIT_FUNCTION@PLT with *%rax in callH.J. Lu2016-03-041-1/+1
| | | | | | | | | Since we have loaded address of PREINIT_FUNCTION into %rax, we can avoid extra branch to PLT slot. [BZ #19745] * sysdeps/x86_64/crti.S (_init): Replace PREINIT_FUNCTION@PLT with *%rax in call.
* Replace @PLT with @GOTPCREL(%rip) in callH.J. Lu2016-03-041-2/+4
| | | | | | | | | Since __libc_start_main is called very early, lazy binding isn't relevant here. Use indirect branch via GOT to avoid extra branch to PLT slot. [BZ #19745] * sysdeps/x86_64/start.S (_start): __libc_start_main@PLT with *__libc_start_main@GOTPCREL(%rip) in call.
* Add a comment in sysdeps/x86_64/MakefileH.J. Lu2016-03-041-0/+3
| | | | | | Mention recursive calls when ENTRY is used in _mcount.S. * sysdeps/x86_64/Makefile (sysdep_noprof): Add a comment.
* x86-64: Fix memcpy IFUNC selectionH.J. Lu2016-03-041-13/+14
| | | | | | | | | | | | | | | | | Chek Fast_Unaligned_Load, instead of Slow_BSF, and also check for Fast_Copy_Backward to enable __memcpy_ssse3_back. Existing selection order is updated with following selection order: 1. __memcpy_avx_unaligned if AVX_Fast_Unaligned_Load bit is set. 2. __memcpy_sse2_unaligned if Fast_Unaligned_Load bit is set. 3. __memcpy_sse2 if SSSE3 isn't available. 4. __memcpy_ssse3_back if Fast_Copy_Backward bit it set. 5. __memcpy_ssse3 [BZ #18880] * sysdeps/x86_64/multiarch/memcpy.S: Check Fast_Unaligned_Load, instead of Slow_BSF, and also check for Fast_Copy_Backward to enable __memcpy_ssse3_back.
* Or bit_Prefer_MAP_32BIT_EXEC in EXTRA_LD_ENVVARSH.J. Lu2016-03-031-1/+1
| | | | | | | | | We should turn on bit_Prefer_MAP_32BIT_EXEC in EXTRA_LD_ENVVARS without overriding other bits. [BZ #19758] * sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h (EXTRA_LD_ENVVARS): Or bit_Prefer_MAP_32BIT_EXEC.
* 2016-03-03 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov2016-03-031-13/+42
| | | | | | [BZ #19490] * sysdeps/x86_64/_mcount.S (_mcount): Add unwind descriptor. (__fentry__): Likewise
* Copy x86_64 _mcount.op from _mcount.oH.J. Lu2016-03-031-0/+1
| | | | | | | | No need to compile x86_64 _mcount.S with -pg. We can just copy the normal static object. * gmon/Makefile (noprof): Add $(sysdep_noprof). * sysdeps/x86_64/Makefile (sysdep_noprof): Add _mcount.
* Call x86-64 __mcount_internal/__sigjmp_save directlyH.J. Lu2016-03-012-12/+0
| | | | | | | | | | | | | | | Since __mcount_internal and __sigjmp_save are internal to x86-64 libc.so: 3532: 0000000000104530 289 FUNC LOCAL DEFAULT 13 __mcount_internal 3391: 0000000000034170 38 FUNC LOCAL DEFAULT 13 __sigjmp_save they can be called directly without PLT. * sysdeps/x86_64/_mcount.S (C_LABEL(_mcount)): Call __mcount_internal directly. (C_LABEL(__fentry__)): Likewise. * sysdeps/x86_64/setjmp.S __sigsetjmp): Call __sigjmp_save directly.
* Call x86-64 __setcontext directlyH.J. Lu2016-03-011-1/+1
| | | | | | | | | | | Since x86-64 __start_context calls the internal __setcontext: 5089: 00000000000417e0 145 FUNC LOCAL DEFAULT 13 __setcontext it should call __setcontext directly. * sysdeps/unix/sysv/linux/x86_64/__start_context.S (__start_context): Call __setcontext directly.
* Remove kernel-features.h conditionals on pre-3.2 kernels.Joseph Myers2016-02-2611-157/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch follows up on the increase in minimum kernel version by removing conditionals in non-x86, non-x86_64 kernel-features.h headers that are now constant for all supported kernel versions. * sysdeps/unix/sysv/linux/alpha/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional. [__LINUX_KERNEL_VERSION >= 0x030200]: Likewise. [__LINUX_KERNEL_VERSION < 0x020621]: Remove conditional code. * sysdeps/unix/sysv/linux/arm/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional. [__LINUX_KERNEL_VERSION >= 0x020624]: Likewise. [__LINUX_KERNEL_VERSION >= 0x030000]: Likewise. * sysdeps/unix/sysv/linux/hppa/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020622]: Likewise. [__LINUX_KERNEL_VERSION >= 0x030100]: Likewise. [__LINUX_KERNEL_VERSION < 0x020625]: Remove conditional code. * sysdeps/unix/sysv/linux/ia64/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional. [__LINUX_KERNEL_VERSION >= 0x030000]: Likewise. * sysdeps/unix/sysv/linux/m68k/kernel-features.h [__LINUX_KERNEL_VERSION < 0x030000]: Remove conditional code. * sysdeps/unix/sysv/linux/microblaze/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional. [__LINUX_KERNEL_VERSION < 0x020621]: Remove conditional code. [__LINUX_KERNEL_VERSION < 0x020625]: Likewise. * sysdeps/unix/sysv/linux/mips/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional. [__LINUX_KERNEL_VERSION >= 0x030100]: Likewise. [_MIPS_SIM == _ABIN32 && __LINUX_KERNEL_VERSION < 0x020623]: Remove conditional code. * sysdeps/unix/sysv/linux/powerpc/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020625]: Make code unconditional. [__LINUX_KERNEL_VERSION >= 0x030000]: Likewise. * sysdeps/unix/sysv/linux/sh/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020625]: Likewise. [__LINUX_KERNEL_VERSION >= 0x030000]: Likewise. [__LINUX_KERNEL_VERSION < 0x020625]: Remove conditional code. * sysdeps/unix/sysv/linux/sparc/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x020621]: Make code unconditional. [__LINUX_KERNEL_VERSION >= 0x030000]: Likewise. * sysdeps/unix/sysv/linux/tile/kernel-features.h [__LINUX_KERNEL_VERSION >= 0x030000]: Likewise.
* Remove linux/fanotify.h configure test.Joseph Myers2016-02-243-62/+0
| | | | | | | | | | | | | | | | Now we require Linux 3.2 or later kernel headers everywhere, the configure test for <linux/fanotify.h> is obsolete; this patch removes it. Tested for x86_64. * sysdeps/unix/sysv/linux/configure.ac (linux/fanotify.h): Do not test for header. * sysdeps/unix/sysv/linux/configure: Regenerated. * config.h.in (HAVE_LINUX_FANOTIFY_H): Remove #undef. * sysdeps/unix/sysv/linux/tst-fanotify.c [!HAVE_LINUX_FANOTIFY_H]: Remove conditional code. [HAVE_LINUX_FANOTIFY_H]: Make code unconditional.
* Require Linux 3.2 except on x86 / x86_64, 3.2 headers everywhere.Joseph Myers2016-02-246-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In <https://sourceware.org/ml/libc-alpha/2016-01/msg00885.html> I proposed a minimum Linux kernel version of 3.2 for glibc 2.24, since Linux 2.6.32 has reached EOL. In the discussion in February, some concerns were expressed about compatibility with OpenVZ containers. It's not clear that these are real issues, given OpenVZ backporting kernel features and faking the kernel version for guest software, as discussed in <https://sourceware.org/ml/libc-alpha/2016-02/msg00278.html>. It's also not clear that supporting running GNU/Linux distributions from late 2016 (at the earliest) on a kernel series from 2009 is a sensible expectation. However, as an interim step, this patch increases the requirement everywhere except x86 / x86_64 (since the controversy was only about those architectures); the special caveats and settings can easily be removed later when we're ready to increase the requirements on x86 / x86_64 (and if someone would like to raise the issue on LWN as suggested in the previous discussion, that would be welcome). 3.2 kernel headers are required everywhere by this patch. (x32 already requires 3.4 or later, so is unaffected by this patch.) As usual for such a change, this patch only changes the configure scripts and associated documentation. The intent is to follow up with removal of dead __LINUX_KERNEL_VERSION conditionals. Each __ASSUME_* or other macro that becomes dead can then be removed independently. Tested for x86_64 and x86. * sysdeps/unix/sysv/linux/configure.ac (LIBC_LINUX_VERSION): Define to 3.2.0. (arch_minimum_kernel): Likewise. * sysdeps/unix/sysv/linux/configure: Regenerated. * sysdeps/unix/sysv/linux/i386/configure.ac (arch_minimum_kernel): Define to 2.6.32. * sysdeps/unix/sysv/linux/i386/configure: Regenerated. * sysdeps/unix/sysv/linux/x86_64/64/configure.ac (arch_minimum_kernel): Define to 2.6.32. * sysdeps/unix/sysv/linux/x86_64/64/configure: Regenerated. * README: Document Linux 3.2 requirement. * manual/install.texi (Linux): Document Linux 3.2 headers requirement. * INSTALL: Regenerated.
* Add fts64_* to sysdeps/arm/nacl/libc.abilistRoland McGrath2016-02-221-0/+6
|
* [x86_64] Set DL_RUNTIME_UNALIGNED_VEC_SIZE to 8H.J. Lu2016-02-192-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58066 __tls_get_addr may be called with 8-byte stack alignment. Although this bug has been fixed in GCC 4.9.4, 5.3 and 6, we can't assume that stack will be always aligned at 16 bytes. Since SSE optimized memory/string functions with aligned SSE register load and store are used in the dynamic linker, we must set DL_RUNTIME_UNALIGNED_VEC_SIZE to 8 so that _dl_runtime_resolve_sse will align the stack before calling _dl_fixup: Dump of assembler code for function _dl_runtime_resolve_sse: 0x00007ffff7deea90 <+0>: push %rbx 0x00007ffff7deea91 <+1>: mov %rsp,%rbx 0x00007ffff7deea94 <+4>: and $0xfffffffffffffff0,%rsp ^^^^^^^^^^^ Align stack to 16 bytes 0x00007ffff7deea98 <+8>: sub $0x100,%rsp 0x00007ffff7deea9f <+15>: mov %rax,0xc0(%rsp) 0x00007ffff7deeaa7 <+23>: mov %rcx,0xc8(%rsp) 0x00007ffff7deeaaf <+31>: mov %rdx,0xd0(%rsp) 0x00007ffff7deeab7 <+39>: mov %rsi,0xd8(%rsp) 0x00007ffff7deeabf <+47>: mov %rdi,0xe0(%rsp) 0x00007ffff7deeac7 <+55>: mov %r8,0xe8(%rsp) 0x00007ffff7deeacf <+63>: mov %r9,0xf0(%rsp) 0x00007ffff7deead7 <+71>: movaps %xmm0,(%rsp) 0x00007ffff7deeadb <+75>: movaps %xmm1,0x10(%rsp) 0x00007ffff7deeae0 <+80>: movaps %xmm2,0x20(%rsp) 0x00007ffff7deeae5 <+85>: movaps %xmm3,0x30(%rsp) 0x00007ffff7deeaea <+90>: movaps %xmm4,0x40(%rsp) 0x00007ffff7deeaef <+95>: movaps %xmm5,0x50(%rsp) 0x00007ffff7deeaf4 <+100>: movaps %xmm6,0x60(%rsp) 0x00007ffff7deeaf9 <+105>: movaps %xmm7,0x70(%rsp) [BZ #19679] * sysdeps/x86_64/dl-trampoline.S (DL_RUNIME_UNALIGNED_VEC_SIZE): Renamed to ... (DL_RUNTIME_UNALIGNED_VEC_SIZE): This. Set to 8. (DL_RUNIME_RESOLVE_REALIGN_STACK): Renamed to ... (DL_RUNTIME_RESOLVE_REALIGN_STACK): This. Updated. (DL_RUNIME_RESOLVE_REALIGN_STACK): Renamed to ... (DL_RUNTIME_RESOLVE_REALIGN_STACK): This. * sysdeps/x86_64/dl-trampoline.h (DL_RUNIME_RESOLVE_REALIGN_STACK): Renamed to ... (DL_RUNTIME_RESOLVE_REALIGN_STACK): This.
* Fix ldbl-128ibm nextafterl, nexttowardl sign of zero result (bug 19678).Joseph Myers2016-02-191-0/+3
| | | | | | | | | | | | | | The ldbl-128ibm implementation of nextafterl / nexttowardl returns -0 in FE_DOWNWARD mode when taking the next value below the least positive subnormal, when it should return +0. This patch fixes it to check explicitly for this case. Tested for powerpc. [BZ #19678] * sysdeps/ieee754/ldbl-128ibm/s_nextafterl.c (__nextafterl): Ensure +0.0 is returned when taking the next value below the least positive value.
* malloc: Remove NO_THREADSFlorian Weimer2016-02-191-19/+0
| | | | | No functional change. It was not possible to build without threading support before.
* Fix ldbl-128ibm powl overflow handling (bug 19674).Joseph Myers2016-02-191-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | The ldbl-128ibm implementation of powl has some problems in the case of overflow or underflow, which are mainly visible in non-default rounding modes. * When overflow or underflow is detected early, the correct sign of an overflowing or underflowing result is not allowed for. This is mostly hidden in the default rounding mode by the errno-setting wrappers recomputing the result (except in non-default error-handling modes such as -lieee), but visible in other rounding modes where a result that is not zero or infinity causes the wrappers not to do the recomputation. * The final scaling is done before the sign is incorporated in the result, but should be done afterwards for correct overflowing and underflowing results in directed rounding modes. This patch fixes those problems. Tested for powerpc. [BZ #19674] * sysdeps/ieee754/ldbl-128ibm/e_powl.c (__ieee754_powl): Include sign in overflowing and underflowing results when overflow or underflow is detected early. Include sign in result before rather than after scaling.
* Fix ldbl-128ibm remainderl, remquol equality tests (bug 19603).Joseph Myers2016-02-192-0/+4
| | | | | | | | | | | | | | | | | | | | | | The ldbl-128ibm implementations of remainderl and remquol have logic resulting in incorrect tests for equality of the absolute values of the arguments. Equality is tested based on the integer representations of the high and low parts, with the sign bit masked off the high part - but when this changes the sign of the high part, the sign of the low part needs to be changed as well, and failure to do this means arguments are wrongly treated as equal when they are not. This patch fixes the logic to adjust signs of low parts as needed. Tested for powerpc. [BZ #19603] * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c (__ieee754_remainderl): Adjust sign of integer version of low part when taking absolute value of high part. * sysdeps/ieee754/ldbl-128ibm/s_remquol.c (__remquol): Likewise. * math/libm-test.inc (remainder_test_data): Add another test. (remquo_test_data): Likewise.
* Fix ldbl-128ibm fmodl handling of equal arguments with low part zero (bug ↵Joseph Myers2016-02-183-0/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 19602). The ldbl-128ibm implementation of fmodl has logic to detect when the first argument has absolute value less than or equal to the second. This logic is only correct for nonzero low parts; if the high parts are equal and the low parts are zero, then the signs of the low parts (which have no semantic effect on the value of the long double number) can result in equal values being wrongly treated as unequal, and an incorrect result being returned from fmodl. This patch fixes this by checking for the case of zero low parts. Although this does show up in tests from libm-test.inc (both tests of fmodl, and, indirectly, of remainderl / dreml), the dependence on non-semantic zero low parts means that test shouldn't be expected to reproduce it reliably; thus, this patch adds a standalone test that sets up affected values using unions. Tested for powerpc. [BZ #19602] * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c (__ieee754_fmodl): Handle equal high parts and both low parts zero specially. * sysdeps/ieee754/ldbl-128ibm/test-fmodl-ldbl-128ibm.c: New test. * sysdeps/ieee754/ldbl-128ibm/Makefile [$(subdir) = math] (tests): Add test-fmodl-ldbl-128ibm.
* Fix ldbl-128ibm fmodl handling of subnormal results (bug 19595).Joseph Myers2016-02-181-9/+5
| | | | | | | | | | | | | | | | | | | | | The ldbl-128ibm implementation of fmodl has completely bogus logic for subnormal results (in this context, that means results for which the result is in the subnormal range for double, not results with absolute value below LDBL_MIN), based on code used for ldbl-128 that is correct in that case but incorrect in the ldbl-128ibm use. This patch fixes it to convert the mantissa into the correct form expected by ldbl_insert_mantissa, removing the other cases of the code that were incorrect and in one case unreachable for ldbl-128ibm. A correct exponent value is then passed to ldbl_insert_mantissa to reflect the shifted result. Tested for powerpc. [BZ #19595] * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c (__ieee754_fmodl): Use common logic for all cases of shifting subnormal results. Do not insert sign bit in shifted mantissa. Always pass -1023 as biased exponent to ldbl_insert_mantissa in subnormal case.
* Fix ldbl-128ibm roundl for non-default rounding modes (bug 19594).Joseph Myers2016-02-181-36/+34
| | | | | | | | | | | | | | | | The ldbl-128ibm implementation of roundl is only correct in round-to-nearest mode (in other modes, there are incorrect results and overflow exceptions in some cases). This patch reimplements it along the lines used for floorl, ceill and truncl, using __round on the high part, and on the low part if the high part is an integer, and then adjusting in the cases where this is incorrect. Tested for powerpc. [BZ #19594] * sysdeps/ieee754/ldbl-128ibm/s_roundl.c (__roundl): Use __round on high and low parts then adjust result and use ldbl_canonicalize_int if needed.
* Fix ldbl-128ibm truncl for non-default rounding modes (bug 19593).Joseph Myers2016-02-181-39/+11
| | | | | | | | | | | | | | | | | | | | The ldbl-128ibm implementation of truncl is only correct in round-to-nearest mode (in other modes, there are incorrect results and overflow exceptions in some cases). It is also unnecessarily complicated, rounding both high and low parts to the nearest integer and then adjusting for the semantics of trunc, when it seems more natural to take the truncation of the high part (__trunc optimized inline versions can be used), and the floor or ceiling of the low part (depending on the sign of the high part) if the high part is an integer, as was done for floorl and ceill. This patch makes it use that simpler approach. Tested for powerpc. [BZ #19593] * sysdeps/ieee754/ldbl-128ibm/s_truncl.c (__truncl): Use __trunc on high part and __floor or __ceil on low part then use ldbl_canonicalize_int if needed.
* Fix ldbl-128ibm ceill for non-default rounding modes (bug 19592).Joseph Myers2016-02-181-36/+16
| | | | | | | | | | | | | | | | | | The ldbl-128ibm implementation of ceill is only correct in round-to-nearest mode (in other modes, there are incorrect results and overflow exceptions in some cases). It is also unnecessarily complicated, rounding both high and low parts to the nearest integer and then adjusting for the semantics of ceil, when it seems more natural to take the ceiling of the high part (__ceil optimized inline versions can be used), and that of the low part if the high part is an integer, as was done for floorl. This patch makes it use that simpler approach. Tested for powerpc. [BZ #19592] * sysdeps/ieee754/ldbl-128ibm/s_ceill.c (__ceill): Use __ceil on high and low parts then use ldbl_canonicalize_int if needed.
* Fix ldbl-128ibm floorl for non-default rounding modes (bug 17899).Joseph Myers2016-02-182-29/+49
| | | | | | | | | | | | | | | | | | | | | | | | The ldbl-128ibm implementation of floorl is only correct in round-to-nearest mode (in other modes, there are incorrect results and overflow exceptions in some cases going beyond the incorrect signs of zero results noted in bug 17899). It is also unnecessarily complicated, rounding both high and low parts to the nearest integer and then adjusting for the semantics of floor, when it seems more natural to take the floor of the high part (__floor optimized inline versions can be used), and that of the low part if the high part is an integer. This patch makes it use that simpler approach, with a canonicalization that works in all rounding modes (given that the only way the result can be noncanonical is if taking the floor of a negative noninteger low part increased its exponent). Tested for powerpc, where over a thousand failures are removed from test-ldouble.out (floorl problems affect many powl tests). [BZ #17899] * sysdeps/ieee754/ldbl-128ibm/math_ldbl.h (ldbl_canonicalize_int): New function. * sysdeps/ieee754/ldbl-128ibm/s_floorl.c (__floorl): Use __floor on high and low parts then use ldbl_canonicalize_int if needed.
* Add _STRING_INLINE_unaligned and string_private.hH.J. Lu2016-02-1810-11/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed in https://sourceware.org/ml/libc-alpha/2015-10/msg00403.html the setting of _STRING_ARCH_unaligned currently controls the external GLIBC ABI as well as selecting the use of unaligned accesses withing GLIBC. Since _STRING_ARCH_unaligned was recently changed for AArch64, this would potentially break the ABI in GLIBC 2.23, so split the uses and add _STRING_INLINE_unaligned to select the string ABI. This setting must be fixed for each target, while _STRING_ARCH_unaligned may be changed from release to release. _STRING_ARCH_unaligned is used unconditionally in glibc. But <bits/string.h>, which defines _STRING_ARCH_unaligned, isn't included with -Os. Since _STRING_ARCH_unaligned is internal to glibc and may change between glibc releases, it should be made private to glibc. _STRING_ARCH_unaligned should defined in the new string_private.h heade file which is included unconditionally from internal <string.h> for glibc build. [BZ #19462] * bits/string.h (_STRING_ARCH_unaligned): Renamed to ... (_STRING_INLINE_unaligned): This. * include/string.h: Include <string_private.h>. * string/bits/string2.h: Replace _STRING_ARCH_unaligned with _STRING_INLINE_unaligned. * sysdeps/aarch64/bits/string.h (_STRING_ARCH_unaligned): Removed. (_STRING_INLINE_unaligned): New. * sysdeps/aarch64/string_private.h: New file. * sysdeps/generic/string_private.h: Likewise. * sysdeps/m68k/m680x0/m68020/string_private.h: Likewise. * sysdeps/s390/string_private.h: Likewise. * sysdeps/x86/string_private.h: Likewise. * sysdeps/m68k/m680x0/m68020/bits/string.h (_STRING_ARCH_unaligned): Renamed to ... (_STRING_INLINE_unaligned): This. * sysdeps/s390/bits/string.h (_STRING_ARCH_unaligned): Renamed to ... (_STRING_INLINE_unaligned): This. * sysdeps/sparc/bits/string.h (_STRING_ARCH_unaligned): Renamed to ... (_STRING_INLINE_unaligned): This. * sysdeps/x86/bits/string.h (_STRING_ARCH_unaligned): Renamed to ... (_STRING_INLINE_unaligned): This.
* Use PIC relocation in ALIAS_IMPLAndrew Senkevich2016-02-171-2/+1
| | | | | | | | | Since libmvec_nonshared.a may be linked into shared objects, ALIAS_IMPL should use PIC relocation. [BZ #19590] * sysdeps/x86_64/fpu/svml_finite_alias.S (ALIAS_IMPL): Use PIC relocation.
* powerpc: Regenerate libm-test-ulpsRajalakshmi Srinivasaraghavan2016-02-041-0/+10
|
* Fix MIPS mmap negative offset handling for consistency (bug 19550).Joseph Myers2016-02-016-2/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The handling of negative offsets in MIPS mmap is inconsistent with other architectures, as shown by failure of the test posix/tst-mmap-offset for o32 and n32. The MIPS mmap syscall uses a signed argument and does a signed arithmetic shift on it, whereas the glibc semantics expected by that test are for the offset to be considered as a large positive offset. This patch makes MIPS consistent with other architectures as far as possible by using the mmap2 syscall on o32 (#including the generic implementation), and making mmap not an alias for mmap64 for n32, with a custom implementation for n32 that zero-extends the offset argument to 64-bit before calling the mmap syscall. Tested for MIPS64 (o32, n32, n64). [BZ #19550] * sysdeps/unix/sysv/linux/mips/mips32/mmap.c: New file. * sysdeps/unix/sysv/linux/mips/mips64/mmap64.c: Move to .... * sysdeps/unix/sysv/linux/mips/mips64/n64/mmap64.c: ... here. * sysdeps/unix/sysv/linux/mips/mips64/n32/mmap.c: New file. * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list (mmap64): New syscall entry. * sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list (mmap): New syscall entry. * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list (mmap): Remove syscall entry.
* Fix MIPS64 memcpy regression.Steve Ellcey2016-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MIPS memcpy optimizations at <https://sourceware.org/ml/libc-alpha/2015-10/msg00597.html> introduced a bug causing many string function tests to fail with segfaults for n32 and n64: FAIL: string/stratcliff FAIL: string/test-bcopy FAIL: string/test-memccpy FAIL: string/test-memcmp FAIL: string/test-memcpy FAIL: string/test-memmove FAIL: string/test-mempcpy FAIL: string/test-stpncpy FAIL: string/test-strncmp FAIL: string/test-strncpy (Some failures in other directories could also be caused by this bug.) The problem is that after the check for whether a word of input is left that can be copied as a word before moving to byte copies, a load can occur in the branch delay slot, resulting in a segfault if we are at the end of a page and the following page is unmapped. I don't see how this would have passed the tests as reported in the original patch posting (different kernel configurations affecting the code setting up unmapped pages, maybe?), since the tests in question don't appear to have changed recently. This patch moves a later instruction into the delay slot, as suggested at <https://sourceware.org/ml/libc-alpha/2016-01/msg00584.html>. Tested for n32 and n64. 2016-01-28 Steve Ellcey <sellcey@imgtec.com> Joseph Myers <joseph@codesourcery.com> * sysdeps/mips/memcpy.S (MEMCPY_NAME) [USE_DOUBLE]: Avoid word load in branch delay slot when less than a word of input left.
* Remove unused variablesAndreas Schwab2016-01-274-6/+0
| | | | They are flagged by -Wunused-const-variable.
* Update localplt.data for 32-bit sparc.David S. Miller2016-01-261-0/+1
| | | | * sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data: Add _Q_cmp.
* Define __sqrtl_finite on sparc 32-bit with correct symbol version.David S. Miller2016-01-253-2/+9
| | | | | | | * sysdeps/sparc/sparc32/Versions (GLIBC_2.23): Add entry for __sqrtl_finite. * sysdeps/sparc/sparc32/fpu/e_sqrtl.c (__sqrtl_finite): Define instead using versioned_symbol. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Fix ordering of entries.
* Adjust sparc 32-bit __sqrtl_finite version tag.David S. Miller2016-01-251-1/+1
| | | | | * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Move __sqrtl_finite to GLIBC_2.23
* Update Alpha libm-test-ulpsRichard Henderson2016-01-251-284/+396
|
* Cleanup ppc bits/ipc.hPaul E. Murphy2016-01-251-24/+0
| | | | | Ages ago (commit e9dcb08) the ipc syscalls were inlined and eventually abstracted away any need for direct __ipc calls.
* Fix missing __sqrtl_finite symbol in libm on sparc 32-bit.David S. Miller2016-01-243-2/+29
| | | | | | * sysdeps/sparc/sparc32/fpu/e_sqrtl.c: New file. * sysdeps/sparc/sparc32/soft-fp/q_sqrt.c (__ieee754_sqrtl): Remove alias. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Add __sqrtl_finite.
* Update sparc ULPS.David S. Miller2016-01-241-208/+228
| | | | * sysdeps/sparc/fpu/libm-test-ulps: Update.
* MIPS: Set the required Linux kernel version to 4.5.0 for 2008 NaNMaciej W. Rozycki2016-01-252-8/+2
| | | | | | | | | | | Complement the addition of the required kernel support, present upstream as from commit 2b5e869ecfcb3112f7e1267cb0328f3ff6d49b18 ("MIPS: ELF: Interpret the NAN2008 file header flag") and released with Linux 4.5-rc1 on Jan 24th, 2016. * sysdeps/unix/sysv/linux/mips/configure.ac: Set `arch_minimum_kernel' to 4.5.0 if 2008 NaN encoding is used. * sysdeps/unix/sysv/linux/mips/configure: Regenerate.
* powerpc: Fix macro usage of htm builtinsPaul E. Murphy2016-01-221-3/+3
| | | | | | Some extraneous semicolons were included in a recent patch which causes a build failure with newer compilers.
* Maintainence patch for nios2: update ULPS file and localplt.data changes.Chung-Lin Tang2016-01-212-20/+29
|
* NaCl: Fix unused variable errors in lowlevellock-futex.h macros.Roland McGrath2016-01-201-2/+5
|
* 2016-01-20 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov2016-01-205-26/+16
| | | | | | | | | [BZ #19490] * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S (pthread_cond_broadcast): Use ENTRY/END * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S (pthread_cond_signal): Likewise * sysdeps/x86_64/nptl/pthread_spin_lock.S (pthread_spin_lock): Likewise * sysdeps/x86_64/nptl/pthread_spin_trylock.S (pthread_spin_trylock): Likewise * sysdeps/x86_64/nptl/pthread_spin_unlock.S (pthread_spin_unlock): Likewise
* Fix __finitel libm compat symbol version.Joseph Myers2016-01-202-4/+4
| | | | | | | | | | | | | | | | | | The changes to restrict implementation-namespace symbol aliases such as __finitel to compat symbols used code for __finitel in libm analogous to that for __finitel in libc. However, the versions for the two symbols are actually different, GLIBC_2.0 in libc and GLIBC_2.1 in libm. This patch fixes the handling of the libm compat symbol. Tested for mips (o32), where it fixes an ABI test failure. * sysdeps/ieee754/dbl-64/s_finite.c [NO_LONG_DOUBLE && LDBL_CLASSIFY_COMPAT] (__finitel): Define compat symbol at version GLIBC_2_1 and use GLIBC_2_1 in SHLIB_COMPAT condition for libm, not GLIBC_2_0. * sysdeps/ieee754/dbl-64/wordsize-64/s_finite.c [NO_LONG_DOUBLE && LDBL_CLASSIFY_COMPAT] (__finitel): Likewise.
* Update localplt.data for powerpc-nofpu.Joseph Myers2016-01-201-2/+2
| | | | | | | | | | | | | | | | | | Testing for powerpc-nofpu showed that localplt.data was out of date. Two new soft-fp functions showed up in the list: __gtsf2 and __unordsf2; this patch adds these as optional. __signbit and __signbitl no longer appear as local PLT entries; given the move to __builtin_signbit* for all GCC versions supported for building glibc (and given the use of the type-generic signbit macro within glibc), those can safely be removed from the list, which this patch does. Tested for powerpc-nofpu. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/localplt.data (__gtsf2): Add as optional for libc.so. (__unordsf2): Likewise. (__signbit): Remove for libc.so. (__signbitl): Likewise.
* Fix ulps regeneration for *-finite tests.Joseph Myers2016-01-194-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On running tests after from-scratch ulps regeneration, I found that some libm tests failed with ulps in excess of those recorded in the from-scratch regeneration, which should never happen unless those ulps exceed the limit on ulps that can go in libm-test-ulps files. Failure: Test: atan2_upward (inf, -inf) Result: is: 2.35619498e+00 0x1.2d97ccp+1 should be: 2.35619450e+00 0x1.2d97c8p+1 difference: 4.76837159e-07 0x1.000000p-21 ulp : 2.0000 max.ulp : 1.0000 Maximal error of `atan2_upward' is : 2 ulp accepted: 1 ulp Failure: Test: carg_upward (-inf + inf i) Result: is: 2.35619498e+00 0x1.2d97ccp+1 should be: 2.35619450e+00 0x1.2d97c8p+1 difference: 4.76837159e-07 0x1.000000p-21 ulp : 2.0000 max.ulp : 1.0000 Maximal error of `carg_upward' is : 2 ulp accepted: 1 ulp The problem comes from the addition of tests for the finite-math-only versions of libm functions. Those tests share ulps with the default function variants. make regen-ulps runs the default tests before the finite-math-only tests, concatenating the resulting ulps before feeding them to gen-libm-test.pl to generate a new libm-test-ulps file. But gen-libm-test.pl always takes the last ulps value given for any (function, type) pair. So, if the largest ulps for a function come from non-finite inputs, a from-scratch regeneration loses those ulps. This patch fixes gen-libm-test.pl, in the case where there are multiple ulps values for a (function, type) pair - which can only happen as part of a regeneration - to take the largest ulps value rather than the last one. Tested for ARM / MIPS / powerpc-nofpu. * math/gen-libm-test.pl (parse_ulps): Do not reduce already-recorded ulps. * sysdeps/arm/libm-test-ulps: Regenerated. * sysdeps/mips/mips32/libm-test-ulps: Likewise. * sysdeps/mips/mips64/libm-test-ulps: Likewise. * sysdeps/powerpc/nofpu/libm-test-ulps: Likewise.
* Fixed build with assembler w/o AVX-512 support.Andrew Senkevich2016-01-191-0/+12
| | | | | * sysdeps/x86_64/multiarch/ifunc-impl-list.c: Fixed build with assembler not supporting AVX-512.
* S390: Regenerate ULPsStefan Liebler2016-01-191-238/+268
| | | | | | | | | I've regenerated ulps from scratch for s390/s390x. All math testcases are passing afterwards. ChangeLog: * sysdeps/s390/fpu/libm-test-ulps: Regenerated.