summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* sparc: M7 optimized memset/bzeroazanella/ifunc-c-sparc-m7Jose E. Marchesi2017-12-117-2/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested in sparcv9-*-* and sparc64-*-* targets in both multi and non-multi arch configurations. Support added to identify Sparc M7/T7/S7/M8/T8 processor capability. Usual "make check" correctness tests run with no regressions. Performance tests run on Sparc S7 using new code and old niagara4 code. Optimizations for memset also apply to bzero as they share code. For memset/bzero, performance comparison with niagara4 code: For memset nonzero data, 256-1023 bytes - 60-90% gain (in cache); 5% gain (out of cache) 1K+ bytes - 80-260% gain (in cache); 40-80% gain (out of cache) For memset zero data (and bzero), 256-1023 bytes - 80-120% gain (in cache), 0% gain (out of cache) 1024+ bytes - 2-4x gain (in cache), 10-35% gain (out of cache) Jose E. Marchesi <jose.marchesi@oracle.com> Adhemerval Zanella <adhemerval.zanella@linaro.org> * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile (sysdeps_routines): Add memset-niagara7. * sysdeps/sparc/sparc64/multiarch/Makefile (sysdes_rotuines): Likewise. * sysdeps/sparc/sparc32/sparcv9/multiarch/memset-niagara7.S: New file. * sysdeps/sparc/sparc64/multiarch/memset-niagara7.S: Likewise. * sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add __bzero_niagara7 and __memset_niagara7. * sysdeps/sparc/sparc64/multiarch/ifunc-memset.h (IFUNC_SELECTOR): Add niagara7 option.
* sparc: M7 optimized memcpy/mempcpy/memmoveJose E. Marchesi2017-12-1113-2/+1091
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested in sparcv9-*-* and sparc64-*-* targets in both multi and non-multi arch configurations. Support added to identify Sparc M7/T7/S7/M8/T8 processor capability. Usual "make check" correctness tests run with no regressions. Performance tests run on Sparc S7 using new code and old niagara4 code. Optimizations for memcpy also apply to mempcpy and memmove where they share code. Optimizations for memset also apply to bzero as they share code. For memcpy/mempcpy/memmove, performance comparison with niagara4 code: Long word aligned data 0-127 bytes - minimal changes 128-1023 bytes - 7-30% gain 1024+ bytes - 1-7% gain (in cache); 30-100% gain (out of cache) Word aligned data 0-127 bytes - 50%+ gain 128-1023 bytes - 10-200% gain 1024+ bytes - 0-15% gain (in cache); 5-50% gain (out of cache) Unaligned data 0-127 bytes - 0-70%+ gain 128-447 bytes - 40-80%+ gain 448-511 bytes - 1-3% loss 512-4096 bytes - 2-3% gain (in cache); 0-20% gain (out of cache) 4096+ bytes - ± 3% (in cache); 20-50% gain (out of cache) Jose E. Marchesi <jose.marchesi@oracle.com> Adhemerval Zanella <adhemerval.zanella@linaro.org> * sysdeps/sparc/sparc32/sparcv9/multiarch/Makefile (sysdeps_routines): Add memcpy-memmove-niagara7 and memmove-ultra1. * sysdeps/sparc/sparc64/multiarch/Makefile (sysdeps_routines): Likewise. * sysdeps/sparc/sparc32/sparcv9/multiarch/memcpy-memmove-niagara7.S: New file. * sysdeps/sparc/sparc32/sparcv9/multiarch/memmove-ultra1.S: Likewise. * sysdeps/sparc/sparc32/sparcv9/multiarch/rtld-memmove.c: Likewise. * sysdeps/sparc/sparc64/multiarch/ifunc-impl-list.c (__libc_ifunc_impl_list): Add __memcpy_niagara7, __mempcpy_niagara7, and __memmove_niagara7. * sysdeps/sparc/sparc64/multiarch/ifunc-memcpy.h (IFUNC_SELECTOR): Add niagara7 option. * sysdeps/sparc/sparc64/multiarch/memmove.c: New file. * sysdeps/sparc/sparc64/multiarch/ifunc-memmove.h: Likewise. * sysdeps/sparc/sparc64/multiarch/memcpy-memmove-niagara7.S: Likewise. * sysdeps/sparc/sparc64/multiarch/memmove-ultra1.S: Likewise. * sysdeps/sparc/sparc64/multiarch/rtld-memmove.c: Likewise.
* sparc: assembly version of memmove for ultra1+Jose E. Marchesi2017-12-115-0/+196
| | | | | | | | | | Tested in sparcv9-*-* and sparc64-*-* targets in both non-multi-arch and multi-arch configurations. * sysdeps/sparc/sparc32/sparcv9/memmove.S: New file. * sysdeps/sparc/sparc32/sparcv9/rtld-memmove.c: Likewise. * sysdeps/sparc/sparc64/memmove.S: Likewise. * sysdeps/sparc/sparc64/rtld-memmove.c: Likewise.
* sparc: support the ADP hw capability.Jose E. Marchesi2017-12-114-3/+11
| | | | | | | | | | | | | This patch adds support for the ADP (also known as adi) hardware capability, as reported by the kernel sparc port when running on M7 machines. Tested in both sparcv9-*-* and sparc64-*-* targets. * sysdeps/sparc/bits/hwcap.h (HWCAP_SPARC_ADP): Defined. * sysdeps/sparc/dl-procinfo.c: Added "adp" to the _dl_sparc_cap_flags array. * sysdeps/sparc/dl-procinfo.h (_DL_HWCAP_COUNT): Increment.
* New generic cosfPaul Clarke2017-12-112-40/+218
| | | | | | | | The same logic used in s_cosf.S version for x86 and powerpc is used to create a generic s_cosf.c, so there is no performance improvement in x86_64 and powerpc64. * sysdeps/ieee754/flt-32/s_cosf.c: New implementation.
* powerpc: POWER8 memcpy optimization for cached memoryAdhemerval Zanella2017-12-1113-13/+344
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On POWER8, unaligned memory accesses to cached memory has little impact on performance as opposed to its ancestors. It is disabled by default and will only be available when the tunable glibc.tune.cached_memopt is set to 1. __memcpy_power8_cached __memcpy_power7 ============================================================ max-size=4096: 33325.70 ( 12.65%) 38153.00 max-size=8192: 32878.20 ( 11.17%) 37012.30 max-size=16384: 33782.20 ( 11.61%) 38219.20 max-size=32768: 33296.20 ( 11.30%) 37538.30 max-size=65536: 33765.60 ( 10.53%) 37738.40 * manual/tunables.texi (Hardware Capability Tunables): Document glibc.tune.cached_memopt. * sysdeps/powerpc/cpu-features.c: New file. * sysdeps/powerpc/cpu-features.h: New file. * sysdeps/powerpc/dl-procinfo.c [!IS_IN(ldconfig)]: Add _dl_powerpc_cpu_features. * sysdeps/powerpc/dl-tunables.list: New file. * sysdeps/powerpc/ldsodefs.h: Include cpu-features.h. * sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h (INIT_ARCH): Initialize use_aligned_memopt. * sysdeps/powerpc/powerpc64/dl-machine.h [defined(SHARED && IS_IN(rtld))]: Restrict dl_platform_init availability and initialize CPU features used by tunables. * sysdeps/powerpc/powerpc64/multiarch/Makefile (sysdep_routines): Add memcpy-power8-cached. * sysdeps/powerpc/powerpc64/multiarch/ifunc-impl-list.c: Add __memcpy_power8_cached. * sysdeps/powerpc/powerpc64/multiarch/memcpy.c: Likewise. * sysdeps/powerpc/powerpc64/multiarch/memcpy-power8-cached.S: New file. Reviewed-by: Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
* string: Replace = with += in CFLAGS-xxx.cH.J. Lu2017-12-112-9/+21
| | | | | | | | | | | | | | | Replace = with += in CFLAGS-xxx.c to allow Makefile under sysdeps to define CFLAGS-xx.c. * string/Makefile (CFLAGS-inl-tester.c): Replace = with +=. (CFLAGS-noinl-tester.c): Likewise. (CFLAGS-tst-strlen.c): Likewise. (CFLAGS-stratcliff.c): Likewise. (CFLAGS-test-ffs.c): Likewise. (CFLAGS-tst-inlcall.c): Likewise. (CFLAGS-tst-xbzero-opt.c): Likewise. (CFLAGS-memcpy.c): Likewise. (CFLAGS-wordcopy.c): Likewise.
* S390: Add CFI rule in _dl_runtime_resolve[_vx] for unwinding.Stefan Liebler2017-12-113-25/+30
| | | | | | | | | | | | | | | | | | | In _dl_runtime_resolve[_vx], unwinding fails after the new stack frame is created as there is no CFI rule for r15. This is also observeable in GDB: Backtrace stopped: previous frame inner to this frame (corrupt stack?) Therefore this patch is now storing r15 on stack and is using cfi_offset rule. The stmg/lmg instruction is used to store/load r14 and r15 with one instruction. On 64bit, the offsets of the fprs have moved to store r15 directly after r14. On 31bit, the r14/r15 is now stored between the other gprs and fprs as the space wasn't used. ChangeLog: * sysdeps/s390/s390-64/dl-trampoline.h (_dl_runtime_resolve): Store r15 on stack and add cfi rule. * sysdeps/s390/s390-32/dl-trampoline.h (_dl_runtime_resolve): Likewise.
* elf/rtld.c (init_tls): Add missing new line to the _dl_fatal_printf call [BZ ↵Aurelien Jarno2017-12-102-1/+7
| | | | | | | | #22577] Changelog: * elf/rtld.c (init_tls): Add missing new line to the _dl_fatal_printf call.
* x86-64: Add sinf with FMAH.J. Lu2017-12-076-3/+47
| | | | | | | | | | | | | | | | On Skylake, bench-sinf reports performance improvement: Before After Improvement max 153.996 100.094 54% min 8.546 6.852 25% mean 18.1223 11.802 54% * sysdeps/x86_64/fpu/multiarch/Makefile (libm-sysdep_routines): Add s_sinf-sse2 and s_sinf-fma. (CFLAGS-s_sinf-fma.c): New. * sysdeps/x86_64/fpu/multiarch/s_sinf-fma.c: New file. * sysdeps/x86_64/fpu/multiarch/s_sinf-sse2.c: Likewise. * sysdeps/x86_64/fpu/multiarch/s_sinf.c: Likewise.
* x86-64: Remove sysdeps/x86_64/fpu/s_sinf.SH.J. Lu2017-12-072-559/+4
| | | | | | | | | | | On Ivy Bridge, bench-sinf reports performance improvement: s_sinf.S s_sinf.c Improvement max 91.521 86.148 6% min 14.061 11.265 25% mean 23.3758 23.3344 0.2% * sysdeps/x86_64/fpu/s_sinf.S: Removed.
* Fix ctanh (0 + i NaN), ctanh (0 + i Inf) (bug 22568, DR#471).Joseph Myers2017-12-075-14/+30
| | | | | | | | | | | | | | | | | | | As per C11 DR#471, ctanh (0 + i NaN) and ctanh (0 + i Inf) should return 0 + i NaN (with "invalid" exception in the second case but not the first), not NaN + i NaN. This has corresponding implications for ctan since its special cases are defined by ctan (z) = -i ctanh (iz). This patch implements these cases for ctanh and ctan, updating tests accordingly. Tested for x86_64. [BZ #22568] * math/s_ctan_template.c (M_DECL_FUNC (__ctan)): Set imaginary part of result to imaginary part of argument if it is zero and the real part of the argument is not finite. * math/s_ctanh_template.c (M_DECL_FUNC (__ctanh)): Set real part of result to real part of argument if it is zero and the imaginary part of the argument is not finite.
* lt_LT locale: Base collation on copy "iso14651_t1" [BZ #22524]Mike FABIAN2017-12-074-2061/+139
| | | | | | | | | [BZ #22524] * localedata/Makefile: Add lt_LT.UTF-8 to test-input and to the list of locales to be built for testing. * localedata/lt_LT.UTF-8.in: New file for testing the collation. * localedata/locales/lt_LT (LC_COLLATE): Use “copy "iso14651_t1"” and build the collation rules upon that.
* Add _Float32 function aliases.Joseph Myers2017-12-0764-122/+3052
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch concludes filling out TS 18661-3 support for different types by adding *f32 function aliases of float functions to support _Float32. As with _Float64 and _Float32x, this is supported for all glibc configurations. As with the previous such patches there are some x86 ulps updates because of inline functions present for float but not for _Float32. The patch also has the usual bits/floatn-common.h update, symbol versions, ABI baselines updates, test enablement and documentation. Tested for x86_64 and x86, and with build-many-glibcs.py, with both GCC 6 and GCC 7. * bits/floatn-common.h (__HAVE_FLOAT32): Define to 1. * manual/math.texi (Mathematics): Document support for _Float32. * math/Makefile (test-types): Add float32. * math/Versions (GLIBC_2.27): Add _Float32 functions. * stdlib/Versions (GLIBC_2.27): Likewise. * wcsmbs/Versions (GLIBC_2.27): Likewise. * sysdeps/unix/sysv/linux/aarch64/libc.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise. * sysdeps/i386/fpu/libm-test-ulps: Likewise. * sysdeps/i386/i686/fpu/multiarch/libm-test-ulps: Likewise.
* Support defining strtof32, wcstof32 aliases.Joseph Myers2017-12-063-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for defining strtof32, wcstof32, strtof32_l and wcstof32_l functions as aliases of the corresponding float functions when _Float32 support is enabled. Tested for x86_64; also tested with build-many-glibcs.py in conjunction with other _Float32 changes. * stdlib/strtof.c: Include <bits/floatn.h> [__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (strtof32): Define and later undefine as macro. Define as weak alias if [!USE_WIDE_CHAR]. [__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (wcstof32): Define and later undefine as macro. Define as weak alias if [USE_WIDE_CHAR]. * stdlib/strtof_l.c: Include <bits/floatn.h> [__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (strtof32_l): Define and later undefine as macro. Define as weak alias if [!USE_WIDE_CHAR]. [__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (wcstof32_l): Define and later undefine as macro. Define as weak alias if [USE_WIDE_CHAR].
* Support defining strfromf32 alias.Joseph Myers2017-12-062-0/+20
| | | | | | | | | | | | This patch adds support for defining strfromf32 as an alias of strfromf when _Float32 support is enabled. Tested for x86_64; also tested with build-many-glibcs.py in conjunction with other _Float32 changes. * stdlib/strfromf.c: Include <bits/floatn.h>. [__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (strfromf32): Define and later undefine as macro and define as weak alias.
* Add header for _Float32 testing.Joseph Myers2017-12-062-0/+39
| | | | | | | | | | | This patch adds the header required for testing _Float32 function aliases, using float ulps. The corresponding makefile support will be included in the main patch that enables those aliases. In conjunction with other _Float32 changes, tested for x86_64 and with build-many-glibcs.py. * math/test-float32.h: New file.
* Support _Float32 in libm_alias_float.Joseph Myers2017-12-062-2/+15
| | | | | | | | | | | | | | This patch makes the libm_alias_float macro support creating _Float32 aliases, in preparation for enabling glibc support for that type. Tested for x86_64; also tested with build-many-glibcs.py in conjunction with other _Float32 changes. * sysdeps/generic/libm-alias-float.h: Include <bits/floatn.h>. [__HAVE_FLOAT32 && !__HAVE_DISTINCT_FLOAT32] (libm_alias_float_other_r): Create f32 alias. (libm_alias_float_r): Use semicolon before call to libm_alias_float_other_r.
* Correct some ia64 libm_alias_float_other calls.Joseph Myers2017-12-064-3/+10
| | | | | | | | | | | | | | | | | This patch corrects three ia64 libm_alias_float_other calls so they generate the intended _Float32 aliases when such aliases are enabled. Tested with build-many-glibcs.py for ia64-linux-gnu (that installed stripped shared libraries are unchanged when applied to current sources, and that this enables compilation tests to pass when used in conjunction with other _Float32 patches). * sysdeps/ia64/fpu/e_exp2f.S (__exp2f): Use exp2 not __exp2 as second argument to libm_alias_float_other. * sysdeps/ia64/fpu/e_log2f.S (__log2f): Use log2 not __log2 as second argument to libm_alias_float_other. * sysdeps/ia64/fpu/e_powf.S (__powf): Use pow not __pow as second argument to libm_alias_float_other.
* Make cacosh (0 + iNaN) return NaN + i pi/2 (bug 22561, DR#471).Joseph Myers2017-12-063-3/+19
| | | | | | | | | | | | | | | | | | As per C11 DR#471 (adjusted resolution accepted for C17), cacosh (0 + iNaN) should return NaN +/- i pi/2, not NaN + iNaN. This patch fixes the code accordingly. The test has hardcoded the result with positive sign of the imaginary part (with an associated comment), since the unspecified sign for a result other than 0 or infinity isn't currently supported by the test infrastructure. Tested for x86_64. [BZ #22561] * math/s_cacosh_template.c (M_DECL_FUNC (__cacosh)): Use pi/2 for real part of result for argument 0 + i * NaN. * math/libm-test-cacosh.inc (cacosh_test_data): Update expected results for tests of 0 + i * NaN.
* Update Alpha libm-test-ulpsAdhemerval Zanella2017-12-062-2/+12
| | | | | | * sysdeps/alpha/fpu/libm-test-ulps: Update. Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Sparc ulp update.David S. Miller2017-12-062-0/+11
| | | | | * sysdeps/sparc/fpu/libm-test-ulps: Update exp_{downward,towardzero,upward} ulps.
* Don't make local variables static in ldbl-96 j1l.Joseph Myers2017-12-062-1/+4
| | | | | | | | | | | | | | | | | | | | | | | The ldbl-96 implementation of j1l has some function-local variables that are declared static for no apparent reason (this dates back to the first addition of that file). Any vaguely recent compiler, probably including any that are supported for building glibc, optimizes away the "static" here, as the values of the variables on entry to the function are dead. So there is not actually a user-visible bug here at present (but with any compilers that didn't optimize away the static at all, possibly building with less or no optimization, so that the function stored intermediate values to and then loaded them from the variables, there would have been a thread-safety issue). But the "static" clearly doesn't belong there and might potentially make things unsafe were compilation without optimization to be supported in future, so this patch removes it. Tested for x86_64. * sysdeps/ieee754/ldbl-96/e_j1l.c (qone): Don't make local variables static.
* Make some ldbl-128, ldbl-128ibm arrays const.Joseph Myers2017-12-065-8/+19
| | | | | | | | | | | | | | | | | | | | I noticed that an x86_64 build of libm unexpectedly contained more non-constant data than an older version (before _Float128 support) did. The problem is non-const arrays in the ldbl-128 j0l and j1l implementations; this patch makes those arrays, and the corresponding ldbl-128ibm ones, const. Tested for x86_64, and tested compilation for powerpc with build-many-glibcs.py. * sysdeps/ieee754/ldbl-128/e_j0l.c (Y0_2N): Make const. (Y0_2D): Likewise. * sysdeps/ieee754/ldbl-128/e_j1l.c (Y0_2N): Likewise. (Y0_2D): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_j0l.c (Y0_2N): Likewise. (Y0_2D): Likewise. * sysdeps/ieee754/ldbl-128ibm/e_j1l.c (Y0_2N): Likewise. (Y0_2D): Likewise.
* hsb_DE locale: Base collation on copy "iso14651_t1" [BZ #22515]Mike FABIAN2017-12-064-2075/+133
| | | | | | | | | [BZ #22515] * localedata/Makefile: Add hsb_DE.UTF-8 to test-input and to the list of locales to be built for testing. * localedata/hsb_DE.UTF-8.in: New file for testing the collation. * localedata/locales/hsb_DE (LC_COLLATE): Use “copy "iso14651_t1"” and build the collation rules upon that.
* Add references to CVE-2017-17426Florian Weimer2017-12-062-0/+6
|
* Update NEWS to add sinf optimizationRajalakshmi Srinivasaraghavan2017-12-062-1/+5
|
* Add _Float64, _Float32x function aliases.Joseph Myers2017-12-0664-23/+5914
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch continues filling out TS 18661-3 support by adding *f64 and *f32x function aliases, supporting _Float64 and _Float32x, as aliases for double functions. These types are supported for all glibc configurations. The API corresponds exactly to that for _Float128 and _Float64x. _Float32 aliases to float functions remain to be added in subsequent patches to complete this process (then there are a few miscellaneous functions in TS 18661-3 to implement that aren't simply versions of existing functions for new types). The patch enables the feature in bits/floatn-common.h, adds symbol versions and documentation with updates to ABI baselines, and arranges for the libm functions for the new types to be tested. As with the _Float64x changes there are some x86 ulps updates because of header inlines not used for the new types (and one other change to the non-multiarch libm-test-ulps, which I suppose comes from using a different compiler version / configuration from when it was last regenerated). Tested for x86_64 and x86, and with build-many-glibcs.py, with both GCC 6 and GCC 7. * bits/floatn-common.h (__HAVE_FLOAT64): Define to 1. (__HAVE_FLOAT32X): Likewise. * manual/math.texi (Mathematics): Document support for _Float64 and _Float32x. * math/Makefile (test-types): Add float64 and float32x. * math/Versions (GLIBC_2.27): Add _Float64 and _Float32x functions. * stdlib/Versions (GLIBC_2.27): Likewise. * wcsmbs/Versions (GLIBC_2.27): Likewise. * sysdeps/unix/sysv/linux/aarch64/libc.abilist: Update. * sysdeps/unix/sysv/linux/aarch64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/alpha/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/arm/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/hppa/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/i386/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/ia64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/m68k/m680x0/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/microblaze/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/nios2/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm-le.abilist: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sh/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/tile/tilepro/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/64/libm.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise. * sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist: Likewise. * sysdeps/i386/fpu/libm-test-ulps: Likewise. * sysdeps/i386/i686/fpu/multiarch/libm-test-ulps: Likewise.
* Use long double not double for _Float64 with old GCC if values the same.Joseph Myers2017-12-052-9/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If double, long double and _Float64 all have the same set of values, TS 18661-3 requires the usual arithmetic conversions on long double and _Float64 to produce _Float64. For this to be the case when building with a compiler without a distinct _Float64 type, _Float64 must be a typedef for long double, not for double. (_Float32x, however, must be double in such a case, not long double, because the usual arithmetic conversions on _Float32x and double must produce double.) This patch adjusts the fallback definition of _Float64 and associated macros accordingly in that case, to fix the build of test-tgmath3 with GCC 6 for such a configuration. Tested in conjunction with _Float64 changes with build-many-glibcs.py for arm-linux-gnueabi, to make sure the issue with test-tgmath3 is fixed. Also tested for x86_64. * bits/floatn-common.h: Include <bits/long-double.h>. [__HAVE_FLOAT64 && (!__GNUC_PREREQ (7, 0) || defined __cplusplus) && __NO_LONG_DOUBLE_MATH] (__f64): Use suffix 'l'. [__HAVE_FLOAT64 && (!__GNUC_PREREQ (7, 0) || defined __cplusplus) && __NO_LONG_DOUBLE_MATH] (__CFLOAT64): Use _Complex long double. [__HAVE_FLOAT64 && (!__GNUC_PREREQ (7, 0) || defined __cplusplus) && __NO_LONG_DOUBLE_MATH] (_Float64): Use long double. [__HAVE_FLOAT64 && !__GNUC_PREREQ (7, 0) && __NO_LONG_DOUBLE_MATH] (__builtin_huge_valf64): Use __builtin_huge_vall. [__HAVE_FLOAT64 && !__GNUC_PREREQ (7, 0) && __NO_LONG_DOUBLE_MATH] (__builtin_inff64): Use __builtin_infl. [__HAVE_FLOAT64 && !__GNUC_PREREQ (7, 0) && __NO_LONG_DOUBLE_MATH] (__builtin_nanf64): Use __builtin_nanl. [__HAVE_FLOAT64 && !__GNUC_PREREQ (7, 0) && __NO_LONG_DOUBLE_MATH] (__builtin_nansf64): Use __builtin_nansl.
* Add elision tunablesRogerio Alves2017-12-0526-94/+357
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds several new tunables to control the behavior of elision on supported platforms[1]. Since elision now depends on tunables, we should always *compile* with elision enabled, and leave the code disabled, but available for runtime selection. This gives us *much* better compile-time testing of the existing code to avoid bit-rot[2]. Tested on ppc, ppc64, ppc64le, s390x and x86_64. [1] This part of the patch was initially proposed by Paul Murphy but was "staled" because the framework have changed since the patch was originally proposed: https://patchwork.sourceware.org/patch/10342/ [2] This part of the patch was inititally proposed as a RFC by Carlos O'Donnell. Make sense to me integrate this on the patch: https://sourceware.org/ml/libc-alpha/2017-05/msg00335.html * elf/dl-tunables.list: Add elision parameters. * manual/tunables.texi: Add entries about elision tunable. * sysdeps/unix/sysv/linux/powerpc/elision-conf.c: Add callback functions to dynamically enable/disable elision. Add multiple callbacks functions to set elision parameters. Deleted __libc_enable_secure check. * sysdeps/unix/sysv/linux/s390/elision-conf.c: Likewise. * sysdeps/unix/sysv/linux/x86/elision-conf.c: Likewise. * configure: Regenerated. * configure.ac: Option enable_lock_elision was deleted. * config.h.in: ENABLE_LOCK_ELISION flag was deleted. * config.make.in: Remove references to enable_lock_elision. * manual/install.texi: Elision configure option was removed. * INSTALL: Regenerated to remove enable_lock_elision. * nptl/Makefile: Disable elision so it can verify error case for destroying a mutex. * sysdeps/powerpc/nptl/elide.h: Cleanup ENABLE_LOCK_ELISION check. Deleted macros for the case when ENABLE_LOCK_ELISION was not defined. * sysdeps/s390/configure: Regenerated. * sysdeps/s390/configure.ac: Remove references to enable_lock_elision.. * nptl/tst-mutex8.c: Deleted all #ifndef ENABLE_LOCK_ELISION from the test. * sysdeps/powerpc/powerpc32/sysdep.h: Deleted all ENABLE_LOCK_ELISION checks. * sysdeps/powerpc/powerpc64/sysdep.h: Likewise. * sysdeps/powerpc/sysdep.h: Likewise. * sysdeps/s390/nptl/bits/pthreadtypes-arch.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/force-elision.h: Likewise. * sysdeps/unix/sysv/linux/s390/elision-conf.h: Likewise. * sysdeps/unix/sysv/linux/s390/force-elision.h: Likewise. * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/s390/Makefile: Remove references to enable-lock-elision. Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
* Support defining strtof64, strtof32x, wcstof64, wcstof32x aliases.Joseph Myers2017-12-053-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for defining strtof64, strtof32x, wcstof64, wcstof32x and the corresponding _l functions as aliases of the corresponding double functions when _Float64 and _Float32x support is enabled. Tested for x86_64; also tested with build-many-glibcs.py in conjunction with other _Float64 / _Float32x changes. * stdlib/strtod.c: Include <bits/floatn.h>. (BUILD_DOUBLE): New macro. [BUILD_DOUBLE && __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64] (strtof64): Define and later undefine as macro. Define as weak alias if [!USE_WIDE_CHAR]. [BUILD_DOUBLE && __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64] (wcstof64): Define and later undefine as macro. Define as weak alias if [USE_WIDE_CHAR]. [BUILD_DOUBLE && __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X] (strtof32x): Define and later undefine as macro. Define as weak alias if [!USE_WIDE_CHAR]. [BUILD_DOUBLE && __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X] (wcstof32x): Define and later undefine as macro. Define as weak alias if [USE_WIDE_CHAR]. * stdlib/strtod_l.c: Include <bits/floatn.h>. (BUILD_DOUBLE): New macro. [BUILD_DOUBLE && __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64] (strtof64_l): Define and later undefine as macro. Define as weak alias if [!USE_WIDE_CHAR]. [BUILD_DOUBLE && __HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64] (wcstof64_l): Define and later undefine as macro. Define as weak alias if [USE_WIDE_CHAR]. [BUILD_DOUBLE && __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X] (strtof32x_l): Define and later undefine as macro. Define as weak alias if [!USE_WIDE_CHAR]. [BUILD_DOUBLE && __HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X] (wcstof32x_l): Define and later undefine as macro. Define as weak alias if [USE_WIDE_CHAR].
* math: Use sign as double for reduced case in sinfAdhemerval Zanella2017-12-052-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch avoid an extra floating point to integer conversion in reduced internal function for generic sinf by defining the sign as double instead of integers. There is no much difference on Haswell with GCC 7.2.1: Before After min 9.11 9.108 mean 21.982 21.9224 However H.J. Lu reported gains on Skylake: Before: "sinf": { "": { "duration": 3.4044e+10, "iterations": 1.9942e+09, "max": 141.106, "min": 7.704, "mean": 17.0715 } } After: "sinf": { "": { "duration": 3.40665e+10, "iterations": 2.03199e+09, "max": 95.994, "min": 7.704, "mean": 16.765 } } Checked on x86_64-linux-gnu. * sysdeps/ieee754/flt-32/s_sinf.c (ones): Define as double. (reduced): Use ones as double instead of integer.
* [PATCH] fix sinf(NAN)Szabolcs Nagy2017-12-052-3/+7
| | | | | | | | | sinf(NAN) should not signal invalid fp exception so use isless instead of < where NAN is compared. this makes the sinf tests pass on aarch64. * sysdeps/ieee754/flt-32/s_sinf.c (sinf): Use isless.
* Support defining strfromf64, strfromf32x aliases.Joseph Myers2017-12-052-0/+31
| | | | | | | | | | | | | | This patch adds support for defining strfromf64 and strfromf32x aliases of strfromd when the corresponding types are enabled. Tested for x86_64; also tested with build-many-glibcs.py in conjunction with other _Float64 / _Float32x changes. * stdlib/strfromd.c: Include <bits/floatn.h>. [__HAVE_FLOAT64 && !__HAVE_DISTINCT_FLOAT64] (strfromf64): Define and later undefine as macro and define as weak alias. [__HAVE_FLOAT32X && !__HAVE_DISTINCT_FLOAT32X] (strfromf32x): Likewise.
* Add headers for _Float64, _Float32x testing.Joseph Myers2017-12-053-0/+77
| | | | | | | | | | | | | | | This patch adds the headers required for testing _Float64 and _Float32x function aliases (using double ulps). The corresponding makefile support will be included in the patch that actually adds those aliases; there doesn't seem much point in adding makefile conditionals for testing something that will be available unconditionally. In conjunction with other _Float64 / _Float32x changes, test for x86_64 and with build-many-glibcs.py. * math/test-float32x.h: New file. * math/test-float64.h: Likewise.
* Support _Float64, _Float32x in libm_alias_double.Joseph Myers2017-12-053-4/+55
| | | | | | | | | | | | | | | | | | | | | | | This patch makes the libm_alias_double macros support creating _Float64 and _Float32x aliases, in preparation for enabling glibc support for those types. Tested for x86_64; also tested with build-many-glibcs.py in conjunction with other _Float64 / _Float32x changes. * sysdeps/generic/libm-alias-double.h: Include <bits/floatn.h>. (libm_alias_double_other_r_f64): New macro. (libm_alias_double_other_r_f32x): Likewise. (libm_alias_double_other_r): Use libm_alias_double_other_r_f64 and libm_alias_double_other_r_f32x. (libm_alias_double_r): Use semicolon before call to libm_alias_double_other_r. * sysdeps/ieee754/ldbl-opt/libm-alias-double.h: Include <bits/floatn.h>. (libm_alias_double_other_r_f64): New macro. (libm_alias_double_other_r_f32x): Likewise. (libm_alias_double_other_r): Use libm_alias_double_other_r_f64 and libm_alias_double_other_r_f32x.
* s_sinf.c: Replace floor with simple castsH.J. Lu2017-12-052-6/+12
| | | | | | | | | | | | | | | | | | | | Since s_sinf.c either assigns the return value of floor to integer or passes double converted from integer to floor, this patch replaces floor with simple casts. Also since long == int for 32-bit targets, we can use long instead of int to avoid 64-bit integer for 64-bit targets. On Skylake, bench-sinf reports performance improvement: Before After Improvement max 130.566 129.564 30% min 7.704 7.706 0% mean 21.8188 19.1363 30% * sysdeps/ieee754/flt-32/s_sinf.c (reduced): Replace long with int. (SINF_FUNC): Likewise. Replace floor with simple casts.
* tilegx: tag __insn_OP builtin issue with gcc bugzilla #Chris Metcalf2017-12-051-1/+2
|
* et_EE locale: Base collation on iso14651_t1 [BZ #22517]Mike FABIAN2017-12-054-2067/+100
| | | | | | | | | [BZ #22517] * localedata/Makefile: Add et_EE.UTF-8 to test-input and to the list of locales to be built for testing. * localedata/et_EE.UTF-8.in: New file for testing the collation. * localedata/locales/et_EE (LC_COLLATE): Use “copy "iso14651_t1"” and build the collation rules upon that.
* tilegx: work around vector insn bug in gccChris Metcalf2017-12-0510-25/+64
| | | | | | | | Avoid an issue in gcc where some of the vector (aka SIMD) ops will sometimes end up getting wrongly optimized out. We use these instructions in many of the string implementations. If/when we have an upstreamed fix for this problem in gcc we can conditionalize the use of the extended assembly workaround in glibc.
* Linux: Implement interfaces for memory protection keysFlorian Weimer2017-12-0550-4/+1179
| | | | | | | | | | | | | | | | This adds system call wrappers for pkey_alloc, pkey_free, pkey_mprotect, and x86-64 implementations of pkey_get and pkey_set, which abstract over the PKRU CPU register and hide the actual number of memory protection keys supported by the CPU. pkey_mprotect with a -1 key is implemented using mprotect, so it will work even if the kernel does not support the pkey_mprotect system call. The system call wrapers use unsigned int instead of unsigned long for parameters, so that no special treatment for x32 is needed. The flags argument is currently unused, and the access rights bit mask is limited to two bits by the current PKRU register layout anyway. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* support/tst-test_compare: Fix 32-bit/64-bit expected output mismatchFlorian Weimer2017-12-052-2/+9
| | | | | | The use of a long type resulted in test output differences between 32-bit and 64-bit architectures, causing the test to fail on 32-bit architectures.
* Use libm_alias_float for powerpc.Joseph Myers2017-12-0575-83/+377
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuing the preparation for additional _FloatN / _FloatNx function aliases, this patch makes powerpc libm function implementations use libm_alias_float to define function aliases. Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged for all its hard-float powerpc configurations. * sysdeps/powerpc/fpu/s_cosf.c: Include <libm-alias-float.h>. (cosf): Define using libm_alias_float. * sysdeps/powerpc/fpu/s_fabs.S: Include <libm-alias-float.h>. (fabsf): Define using libm_alias_float. * sysdeps/powerpc/fpu/s_fmaf.S: Include <libm-alias-float.h>. (fmaf): Define using libm_alias_float. * sysdeps/powerpc/fpu/s_rintf.c: Include <libm-alias-float.h>. (rintf): Define using libm_alias_float. * sysdeps/powerpc/fpu/s_sinf.c: Include <libm-alias-float.h>. (sinf): Define using libm_alias_float. * sysdeps/powerpc/power5+/fpu/s_modff.c: Include <libm-alias-float.h>. (modff): Define using libm_alias_float. * sysdeps/powerpc/power7/fpu/s_logbf.c: Include <libm-alias-float.h>. (logbf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/fpu/s_ceilf.S: Include <libm-alias-float.h>. (ceilf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/fpu/s_copysign.S: Include <libm-alias-float.h>. (copysignf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/fpu/s_floorf.S: Include <libm-alias-float.h>. (floorf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/fpu/s_llrintf.c: Include <libm-alias-float.h>. (llrintf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/fpu/s_llroundf.c: Include <libm-alias-float.h>. (llroundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: Include <libm-alias-float.h>. (lrintf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/fpu/s_lround.S: Include <libm-alias-float.h>. (lroundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/fpu/s_nearbyintf.S: Include <libm-alias-float.h>. (nearbyintf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/fpu/s_rintf.S: Include <libm-alias-float.h>. (rintf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/fpu/s_roundf.S: Include <libm-alias-float.h>. (roundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Include <libm-alias-float.h>. (truncf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_ceilf.c: Include <libm-alias-float.h>. (ceilf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_copysignf.c: Include <libm-alias-float.h>. (copysignf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_floorf.c: Include <libm-alias-float.h>. (floorf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llrintf.c: Include <libm-alias-float.h>. (llrintf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_llroundf.c: Include <libm-alias-float.h>. (llroundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logbf.c: Include <libm-alias-float.h>. (logbf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lrintf.c: Include <libm-alias-float.h>. (lrintf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_lroundf.c: Include <libm-alias-float.h>. (lroundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_modff.c: Include <libm-alias-float.h>. (modff): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_roundf.c: Include <libm-alias-float.h>. (roundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_truncf.c: Include <libm-alias-float.h>. (truncf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power4/fpu/s_llrintf.S: Include <libm-alias-float.h>. (llrintf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S: Include <libm-alias-float.h>. (llroundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power5+/fpu/s_ceilf.S: Include <libm-alias-float.h>. (ceilf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power5+/fpu/s_floorf.S: Include <libm-alias-float.h>. (floorf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power5+/fpu/s_llround.S: Include <libm-alias-float.h>. (llroundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power5+/fpu/s_lround.S: Include <libm-alias-float.h>. (lroundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power5+/fpu/s_roundf.S: Include <libm-alias-float.h>. (roundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power5+/fpu/s_truncf.S: Include <libm-alias-float.h>. (truncf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power6/fpu/s_copysign.S: Include <libm-alias-float.h>. (copysignf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power6/fpu/s_llrintf.S: Include <libm-alias-float.h>. (llrintf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power6/fpu/s_llround.S: Include <libm-alias-float.h>. (llroundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power6x/fpu/s_lrint.S: Include <libm-alias-float.h>. (lrintf): Define using libm_alias_float. * sysdeps/powerpc/powerpc32/power6x/fpu/s_lround.S: Include <libm-alias-float.h>. (lroundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_ceilf.c: Include <libm-alias-float.h>. (ceilf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_copysignf.c: Include <libm-alias-float.h>. (copysignf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_cosf.c: Include <libm-alias-float.h>. (cosf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_floorf.c: Include <libm-alias-float.h>. (floorf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_llrintf.c: Include <libm-alias-float.h>. (llrintf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_llroundf.c: Include <libm-alias-float.h>. (llroundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_logbf.c: Include <libm-alias-float.h>. (logbf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_modff.c: Include <libm-alias-float.h>. (modff): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_roundf.c: Include <libm-alias-float.h>. (roundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_sinf.c: Include <libm-alias-float.h>. (sinf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_truncf.c: Include <libm-alias-float.h>. (truncf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: Include <libm-alias-float.h>. (ceilf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Include <libm-alias-float.h>. (copysignf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/s_floorf.S: Include <libm-alias-float.h>. (floorf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Include <libm-alias-float.h>. (llrintf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Include <libm-alias-float.h>. (llroundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S: Include <libm-alias-float.h>. (nearbyintf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/s_rintf.S: Include <libm-alias-float.h>. (rintf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/s_roundf.S: Include <libm-alias-float.h>. (roundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Include <libm-alias-float.h>. (truncf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S: Include <libm-alias-float.h>. (ceilf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/power5+/fpu/s_floorf.S: Include <libm-alias-float.h>. (floorf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/power5+/fpu/s_llround.S: Include <libm-alias-float.h>. (llroundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/power5+/fpu/s_roundf.S: Include <libm-alias-float.h>. (roundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/power5+/fpu/s_truncf.S: Include <libm-alias-float.h>. (truncf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S: Include <libm-alias-float.h>. (copysignf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S: Include <libm-alias-float.h>. (llrintf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/power6x/fpu/s_llround.S: Include <libm-alias-float.h>. (llroundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/power8/fpu/s_cosf.S: Include <libm-alias-float.h>. (cosf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S: Include <libm-alias-float.h>. (llrintf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S: Include <libm-alias-float.h>. (llroundf): Define using libm_alias_float. * sysdeps/powerpc/powerpc64/power8/fpu/s_sinf.S: Include <libm-alias-float.h>. (sinf): Define using libm_alias_float.
* support: Add TEST_COMPARE macroFlorian Weimer2017-12-045-0/+226
|
* tr_TR locale: Base collation on iso14651_t1 [BZ #22527]Mike FABIAN2017-12-042-2054/+56
| | | | | | | | [BZ #22527] * localedata/locales/tr_TR (LC_COLLATE): Base collation rules on iso14651_t1. A test file localedata/tr_TR.UTF-8.in is already available, this rewrite of the collation rules does reproduce the test file in the same order.
* hr_HR locale: Don’t use single code points for the digraphs in LC_TIMEMike FABIAN2017-12-042-9/+21
| | | | | | | | | | | | [BZ #10580] * localedata/locales/hr_HR (LC_TIME): Use two letters for the digraphs in the month and day names. Using single code points for digraphs is deprecated. While there are dedicated Unicode codepoints, for the digraphs, these are included for backwards compatibility and modern texts use a sequence of Basic Latin characters. See: https://www.unicode.org/faq/ligature_digraph.html This makes the month and day names agree exactly with CLDR now, CLDR does not use the single code points for the digraphs either.
* tile: update ca{cos,sin,tan}{,h} double ULPsChris Metcalf2017-12-042-8/+16
|
* Use __floor not floor in sinf.Joseph Myers2017-12-042-2/+7
| | | | | | | | | | | | | | | | | | | | | | | The new sinf implementation introduced localplt failures for all platforms where the compiler did not inline the calls to floor (converted to trunc by machine-independent optimizations). This patch changes the calls to use __floor as normal in libm. We can't use the public function names floor / floorf / floorl / floorf128 in libm code in the absence of appropriate asms to redirect floor/trunc calls, if not inlined, to use the internal names instead (while avoiding breaking code building the floor functions themselves) - while having such asms and then calling the public functions unconditionally would be desirable for optimization (few architectures have __floor inlines in math_private.h, and once the built-in function is used you don't need them), using __floor is the minimum safe fix for the present test regressions. Tested with build-many-glibcs.py that this fixes the localplt test failure for arm-linux-gnueabi. * sysdeps/ieee754/flt-32/s_sinf.c (SINF_FUNC): Use __floor instead of floor.
* aarch64: Avoid hidden symbols for memcpy/memmove into static binariesSiddhesh Poyarekar2017-12-042-0/+7
| | | | | | | | | | | The __GI_* symbol aliases for __memcpy_generic are unnecessary since they're never used. Add them only for libc.so to avoid PLT. Maybe some time in future we need to evaluate the relative cost of PLT vs gains from multiarch memcpy implementations and take a call on whether to drop this completely. * sysdeps/aarch64/multiarch/memcpy_generic.S (__GI_memcpy): Define only for libc.so.
* S390: Fix backtrace in vdso functions.Stefan Liebler2017-12-043-72/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On s390, GDB fails to show the complete backtrace from within vdso functions. The macro INTERNAL_VSYSCALL_CALL saves the return address in r14 to r10 before branching to the vdso function. The branch-instruction updates r14 in order to let the vdso function return. Then the original address in r14 is restored from r10. Unfortunately, there are no cfi-rules and GDB fails. Furthermore the call of the vdso function does not comply with the s390 ABI as no stack-frame for the vdso-function is generated. This patch removes the s390 specific macro INTERNAL_VSYSCALL_CALL and the common implementation in sysdeps/unix/sysv/linux/sysdep-vdso.h is used. Then the vdso function is called via function-pointer and GCC generates a new stack-frame and emits all needed cfi-rules. The defines CLOBBER_[0-6] are removed as they were only used in macro INTERNAL_VSYSCALL_CALL. The macro INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK is not used on s390. The only user is power. Thus it is removed from s390 sysdep.h. ChangeLog: * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (INTERNAL_VSYSCALL_CALL, CLOBBER_0, CLOBBER_1, CLOBBER_2, CLOBBER_3, CLOBBER_4, CLOBBER_5, CLOBBER_6, INTERNAL_VSYSCALL_NO_SYSCALL_FALLBACK): Remove. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise.