aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-04-28This is infrastructure update for configure, build and install of vectorandros/libmvecAndrew Senkevich
math library. Installation of libm.so as linker script only in case of libmvec.so build. 2015-04-28 Andrew Senkevich <andrew.n.senkevich@gmail.com> * Makeconfig (rpath-dirs, all-subdirs): Added mathvec folder. (libmvec): New variable. * configure.ac: Added option for mathvec build. * configure: Regenerated. * mathvec/Depend: New file. * mathvec/Makefile: New file. * shlib-versions: Added libmvec. * math/Makefile: Added rule for libm.so installation.
2015-04-28This patch adds infrastructure for addition of SIMDAndrew Senkevich
declarations for math functions in math.h. Added new headers math-vector.h only generic version for now and libm-simd-decl-stubs.h with empty definitions required for proper unfolding of new macros __MATHCALL_VEC which will be used for declaration of vector math functions. 2015-04-28 Andrew Senkevich <andrew.senkevich@intel.com> * bits/math-vector.h: New file. * bits/libm-simd-decl-stubs.h: New header. * math/Makefile (headers): Added new header libm-simd-decl-stubs.h. * math/math.h (__MATHCALL_VEC): New macro.
2015-04-28Last part of changes regarding to libm-test.inc:Andrew Senkevich
addition of method for separation which exactly testing function needed to run with help of generated during make check header with series of conditional definitions. 2015-04-28 Andrew Senkevich <andrew.senkevich@intel.com> * math/gen-libm-have-vector-test.sh: Script generates series of macros for conditions in testing functions. * math/Makefile: Added call of libm-have-vector-test.sh. * math/libm-test.inc (HAVE_VECTOR): New macros.
2015-04-28Refactoring of START for conditions in individual testsAndrew Senkevich
and addition of macros used for runtime architecture check. 2015-04-28 Andrew Senkevich <andrew.senkevich@intel.com> * math/libm-test.inc: START refactored. * math/test-double.c (TEST_MATHVEC): Add define. * math/test-float.c: Likewise. * math/test-idouble.c: Likewise. * math/test-ifloat.c: Likewise. * math/test-ildoubl.c: Likewise. * math/test-ldouble.c: Likewise. * sysdeps/generic/math-tests-arch.h (INIT_ARCH_EXT, CHECK_ARCH_EXT): New helper macros for runtime architecture check.
2015-04-28This is the beginning of series of patches with addition ofAndrew Senkevich
vector math functions infrastructure. This patch is preparatory change in libm-test.c - splitting of macros which form name of tested functions for ability to use separate name for tested functions and for functions used in test suite infrastructure. 2015-04-28 Andrew Senkevich <andrew.senkevich@intel.com> * math/test-double.c (FUNC_TEST): New macro. * math/test-float.c: Likewise. * math/test-idouble.c: Likewise. * math/test-ifloat.c: Likewise. * math/test-ildoubl.c: Likewise. * math/test-ldouble.c: Likewise. * math/libm-test.inc: Use FUNC_TEST for name of tested functions.
2015-04-27Update sparc localplt.dataDavid S. Miller
* sysdeps/unix/sysv/linux/sparc/sparc32/localplt.data: Remove __tls_get_addr. * sysdeps/unix/sysv/linux/sparc/sparc64/localplt.data: Likewise.
2015-04-27Check tzspec_len == 0 in __tzfile_readH.J. Lu
[BZ#18333] * time/tzset.c (__tzfile_read): Check tzspec_len == 0.
2015-04-27test-skeleton: Support temporary files without memory leaks [BZ#18333]Florian Weimer
add_temp_file now makes a copy which is freed by delete_temp_files. Callers to create_temp_file can now free the returned file name to avoid the memory leak. These changes do not affect the leak behavior of existing code. Also address a NULL pointer derefence in tzset after a memoru allocation failure, found during testing.
2015-04-24posix_fallocate, posix_fallocate64 stub: Do not set errnoFlorian Weimer
These functions return an error code.
2015-04-24ARM: Define PI_STATIC_AND_HIDDEN.Roland McGrath
2015-04-24Make time zone file parser more robust [BZ #17715]Florian Weimer
2015-04-24Do not build with -WinlineFlorian Weimer
-Winline causes architecture- and optimization-dependent build failures due to -Werror. -Winline warns about inlining decisions based on branch hints, in effect preventing the use of inline functions in header files (because they might be called on unlikely branches, leading to a decision not to inline). The option was apparently added to the glibc build at a time when GCC did not support the always_inline attribute. With current GCC versions, inlining failure for functions declared always_inline will receive a warning under -Wattributes, which is enabled by default, so -Winline appears unnecessary.
2015-04-24S/390: Regenerate ULPsStefan Liebler
2015-04-24S/390: Get cache information via sysconfStefan Liebler
This patch adds support to query cache information on s390 via sysconf() function - e.g. with _SC_LEVEL1_ICACHE_SIZE. The attributes size, linesize and assoc can be queried for cache level 1 - 4 via "extract cpu attribute" instruction, which was first available with z10. * NEWS: Mention sysconf() cache information support for s390. * sysdeps/unix/sysv/linux/s390/sysconf.c: New File.
2015-04-22Use __copysign rather than copysign.Wilco Dijkstra
2015-04-21CVE-2015-1781: resolv/nss_dns/dns-host.c buffer overflow [BZ#18287]Arjun Shankar
2015-04-20libc-vdso.h place consolidationAdhemerval Zanella
This patch moves the libc-vdso.h internal header from bits folder to default architecture one and also corrects the remaning includes in the files.
2015-04-19Better fix for setenv (..., NULL, ...)Paul Eggert
* stdlib/setenv.c (__add_to_environ): Dump core quickly if setenv (..., NULL, ...) is called. This time, do it the right way, and pacify GCC with a pragma.
2015-04-17Avoid confusing compiler with dynamically impossible statically invalid ↵Roland McGrath
dereference in _dl_close_worker.
2015-04-17Fuller check for invalid NSID in _dl_open.Roland McGrath
2015-04-17Sparc memchr/memcmp/strncmp fixes from Il'ya Malakhov.David S. Miller
[BZ #17825] * sysdeps/sparc/sparc64/memchr.S: Fix signedness handling of length. * sysdeps/sparc/sparc64/memcmp.S: Likewise. * sysdeps/sparc/sparc64/strncmp.S: Likewise.
2015-04-17Add arm-nacl port.Roland McGrath
2015-04-16Convert sparc over to lowlevellock-futex.hDavid S. Miller
* sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Make use of lowlevellock-futex.h
2015-04-16tile: Enable PI_STATIC_AND_HIDDENChris Metcalf
This does make ld.so very slightly larger (0.3%) and doesn't seem to actually improve performance; in fact, my limited testing suggested a slight (0.1%) performance decrease (running fork/exec of a no-op program in a loop), but I didn't do enough testing to establish statistical significance. However, Roland agrees that it makes sense to switch tile to using this path, since it's the more standard way.
2015-04-15powerpc: Fix __wcschr static buildAdhemerval Zanella
This patch fix the static build for strftime, which uses __wcschr. Current powerpc32 implementation defines the __wcschr be an alias to __wcschr_ppc32 and current implementation misses the correct alias for static build. It also changes the default wcschr.c logic so a IFUNC implementation should just define WCSCHR and undefine the required alias/internal definitions.
2015-04-15Rebuilt fresh sparc ULPS to get rid of removed tests.David S. Miller
* sysdeps/sparc/fpu/libm-test-ulps: Regenerate from scratch.
2015-04-13Use correct signedness in wcsncmpStefan Liebler
[BZ #18206] * wcsmbs/wcsncmp.c (wcsncmp): Compare as wchar_t, not wint_t. Use signed comparision instead of substraction to avoid overflow bug. * localedata/tests-mbwc/tst_wcsncmp.c (tst_wcsncmp): Take the sign of ret. * localedata/tests-mbwc/dat_wcsncmp.c (tst_wcsncmp_loc): Do not expect precise return values. Only the sign matters. * wcsmbs/Makefile (strop-tests): Add wcsncmp. * wcsmbs/test-wcsncmp.c: New File. * string/test-strncmp.c: Add wcsncmp support.
2015-04-13Set errno for log1p on pole/domain error.Stefan Liebler
According to bug 6792, errno is not set to ERANGE/EDOM by calling log1p/log1pf/log1pl with x = -1 or x < -1. This patch adds a wrapper which sets errno in those cases and returns the value of the existing __log1p function. The log1p is now an alias to the wrapper function instead of __log1p. The files in sysdeps are reflecting these changes. The ia64 implementation sets errno by itself, thus the wrapper-file is empty. The libm-test is adjusted for log1p-tests to check errno. [BZ #6792] * math/w_log1p.c: New file. * math/w_log1pf.c: Likewise. * math/w_log1pl.c: Likewise. * math/Makefile (libm-calls): Add w_log1p. * math/s_log1pl.c (log1pl): Remove weak_alias. * sysdeps/i386/fpu/s_log1p.S (log1p): Likewise. * sysdeps/i386/fpu/s_log1pf.S (log1pf): Likewise. * sysdeps/i386/fpu/s_log1pl.S (log1pl): Likewise. * sysdeps/x86_64/fpu/s_log1pl.S (log1pl): Likewise. * sysdeps/ieee754/dbl-64/s_log1p.c (log1p): Likewise. [NO_LONG_DOUBLE] (log1pl): Likewise. * sysdeps/ieee754/flt-32/s_log1pf.c (log1pf): Likewise. * sysdeps/ieee754/ldbl-128/s_log1pl.c (log1pl): Likewise. * sysdeps/ieee754/ldbl-64-128/s_log1pl.c (log1p): Remove long_double_symbol. * sysdeps/ieee754/ldbl-128ibm/s_log1pl.c (log1pl): Likewise. * sysdeps/ieee754/ldbl-64-128/w_log1pl.c: New file. * sysdeps/ieee754/ldbl-128ibm/w_log1pl.c: Likewise. * sysdeps/m68k/m680x0/fpu/s_log1p.c: Define empty weak_alias to remove weak_alias for corresponding log1p function. * sysdeps/m68k/m680x0/fpu/s_log1pf.c: Likewise. * sysdeps/m68k/m680x0/fpu/s_log1pl.c: Likewise. * sysdeps/ia64/fpu/w_log1p.c: New file. * sysdeps/ia64/fpu/w_log1pf.c: Likewise. * sysdeps/ia64/fpu/w_log1pl.c: Likewise. * math/libm-test.inc (log1p_test_data): Add errno expectations.
2015-04-10Update tst_mbrlen/tst_mbrtowc for mblen changeStefan Liebler
commit 9781a370023952383028e07399fd196a889bb2be changed the expected results for mbrlen in case of passing n=0 to -2. The initialization of tst_mbrlen_loc and tst_mbrtowc should be updated accordingly. * tests-mbwc/dat_mbrlen.c (tst_mbrlen_loc): Change expected result to -2 in case of n == 0. * tests-mbwc/tst_mbrtowc.c (tst_mbrtowc): Check result against -2 instead of 0.
2015-04-10Fix strtof decimal rounding close to half least subnormal (bug 18247).Joseph Myers
Bug 18247 is an off-by-one error in strtof's determination of a decimal exponent such that any value with that decimal exponent is at most half the least subnormal and so the appropriate underflowing value for the rounding mode can be determined with no multiple-precision computations. (Whether the value is in fact safe despite the off-by-one depends on the floating-point format in question. It's wrong for float and for m68k ldbl-96 but not for other supported formats.) This patch corrects the computation of the exponent in question to be safe in general, adding a comment explaining the new computation. Tested for x86_64. [BZ #18247] * stdlib/strtod_l.c (____STRTOF_INTERNAL): Decrease minimum decimal exponent by 1. * stdlib/tst-strtod-round-data: Add more tests. * stdlib/tst-strtod-round.c (tests): Regenerated.
2015-04-09Add more tests of clog and clog10.Joseph Myers
This patch adds some randomly-generated tests of clog and clog10 that are observed to increase ulps on x86_64. Tested for x86_64 and x86 and ulps updated accordingly. * math/auto-libm-test-in: Add more tests of clog and clog10. * math/auto-libm-test-out: Regenerated. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2015-04-09Omit libc-modules.h for all .v.i files.Roland McGrath
2015-04-09Let non-add-on preconfigure scripts set libc_config_ok.Roland McGrath
2015-04-09Make test-skeleton.c grok TEST_DIRECT magic environment variable.Roland McGrath
2015-04-09scratch_buffer: Suppress truncation warning on 32-bitFlorian Weimer
2015-04-08Update SPARC ulps.David S. Miller
* sysdeps/sparc/fpu/libm-test-ulps: Update.
2015-04-08Add more tests of atanh.Joseph Myers
This patch adds some randomly-generated tests of atanh that are observed to increase ulps on x86_64. Tested for x86_64 and x86 and ulps updated accordingly. * math/auto-libm-test-in: Add more tests of atanh. * math/auto-libm-test-out: Regenerated. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2015-04-08Add more tests of atan.Joseph Myers
This patch adds some randomly-generated tests of atan that are observed to increase ulps on x86_64. Tested for x86_64 and x86 and ulps updated accordingly. * math/auto-libm-test-in: Add more tests of atan. * math/auto-libm-test-out: Regenerated. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2015-04-08nscd_getgr_r: Use struct scratch_buffer instead of extend_allocaFlorian Weimer
The lack of alloca accounting means that the old code could run out of stack space if multiple retries are needed.
2015-04-08getnameinfo: Use struct scratch_buffer instead of extend_allocaFlorian Weimer
This patch adjusts the internal function nrl_domainname, too.
2015-04-08_nss_compat_initgroups_dyn: Use struct scratch_buffer instead of extend_allocaFlorian Weimer
2015-04-08grp: Rewrite to use struct scratch_buffer instead of extend_allocaFlorian Weimer
grp/compat-initgroups.c is included from nscd/initgrcache.c, which is why the #include directive has to be added there as well.
2015-04-08pldd: Use struct scratch_buffer instead of extend_allocaFlorian Weimer
2015-04-08Add more tests of cbrt.Joseph Myers
This patch adds some randomly-generated tests of cbrt that are observed to increase ulps on x86_64. Tested for x86_64 and x86 and ulps updated accordingly. * math/auto-libm-test-in: Add more tests of cbrt. * math/auto-libm-test-out: Regenerated. * sysdeps/x86_64/fpu/libm-test-ulps: Update.
2015-04-08Add more tests of cabs.Joseph Myers
This patch adds some randomly-generated tests of cabs that are observed to increase ulps on x86_64. Tested for x86_64 and x86 and ulps updated accordingly. * math/auto-libm-test-in: Add more tests of cabs. * math/auto-libm-test-out: Regenerated. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2015-04-08Fix dbl-64 atan2 in non-default rounding modes (bug 18210, bug 18211).Joseph Myers
The dbl-64 implementation of atan2 does computations that expect to run in round-to-nearest mode, and in other modes the errors can accumulate to more than the maximum accepted 9ulp. This patch makes it use FE_TONEAREST internally, similar to other functions with such issues. Tests that previously produced large errors are added for atan2 and the closely related carg, clog and clog10 functions. Tested for x86_64 and x86 and ulps updated accordingly. [BZ #18210] [BZ #18211] * sysdeps/ieee754/dbl-64/e_atan2.c: Include <fenv.h>. (__ieee754_atan2): Set FE_TONEAREST mode for internal computations. * math/auto-libm-test-in: Add more tests of atan2, carg, clog and clog10. * math/auto-libm-test-out: Regenerated. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2015-04-08Fix dbl-64 atan in non-default rounding modes (bug 18197).Joseph Myers
The dbl-64 implementation of atan does computations that expect to run in round-to-nearest mode, and in other modes the errors can accumulate to more than the maximum accepted 9ulp. This patch makes it use FE_TONEAREST internally, similar to other functions with such issues. Tested for x86_64 and x86; no ulps updates needed. [BZ #18197] * sysdeps/ieee754/dbl-64/s_atan.c: Include <fenv.h>. (atan): Set FE_TONEAREST mode for internal computations. * math/auto-libm-test-in: Add more tests of atan. * math/auto-libm-test-out: Regenerated.
2015-04-07[BZ #17930] MIPS: Define SHM_NORESERVE.James Cowgill
[BZ #17930] * sysdeps/unix/sysv/linux/mips/bits/shm.h (SHM_NORESERVE): Define.
2015-04-07scratch_buffer_grow_preserve: Add missing #include <string.h>Florian Weimer
2015-04-07Add struct scratch_buffer and its internal helper functionsFlorian Weimer
These will be used from NSS modules, so they have to be exported.