summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-12-19Move tests of cabs and carg from libm-test.inc to auto-libm-test-in.reviewedJoseph Myers
This patch moves tests of cabs and carg to auto-libm-test-in, adding the required support to gen-auto-libm-tests. Tested x86_64 and x86; no ulps updates needed. * math/auto-libm-test-in: Add tests of cabs and carg. * math/auto-libm-test-out: Regenerated. * math/libm-test.inc (cabs_test_data): Use AUTO_TESTS_c_f. (carg_test_data): Likewise. * math/gen-auto-libm-tests.c (func_calc_method): Add value mpc_c_f. (func_calc_desc): Add mpc_c_f union field. (test_functions): Add cabs and carg. (calc_generic_results): Handle mpc_c_f.
2013-12-19Don't make soft-fp symbols compat symbols for powerpc-nofpu.Joseph Myers
sysdeps/powerpc/powerpc32/libgcc-compat.S makes certain symbols that glibc once accidentally reexported from libgcc into compat symbols. Where the exports were purely accidental, this is the right thing to do. However, for powerpc-nofpu the soft-fp symbols are deliberately exported from libc, given public versions in sysdeps/powerpc/nofpu/Versions and used by libm in preference to the libgcc versions that do not support the software exceptions and rounding modes. The libc versions should also be usable by user programs, though normally libgcc gets linked in first (meaning, effectively, that the <fenv.h> functions are broken as regards their expected effects on user arithmetic). A longstanding todo item is to remove the functions in question from libgcc (when built with recent enough glibc) - that is, remove them from static libgcc and make them compat symbols in shared libgcc - so that this works properly (this is one of the items mentioned at <http://gcc.gnu.org/wiki/Software_floating_point> - parts of that page are obviously out of date, but this item still applies). Doing this requires first that the functions are actually available from libc for new links, not just as compat symbols. This patch stops the symbols in question being compat symbols for powerpc-nofpu. The nofpu Versions entries for them are removed (the symbols never were exported at GLIBC_2.3.2, only GLIBC_2.0, because the compat symbols took precedence). Tested powerpc-nofpu. The symbols are no longer compat symbols and libm.so now properly gets undefined references to them (resolved to libc.so) instead of the libgcc copies getting linked into libm as before. * sysdeps/powerpc/powerpc32/libgcc-compat.S [_SOFT_FLOAT || __NO_FPRS__] (__fixdfdi_v_glibc20): Do not define as a macro and a compat symbol. [_SOFT_FLOAT || __NO_FPRS__] (__fixsfdi_v_glibc20): Likewise. [_SOFT_FLOAT || __NO_FPRS__] (__fixunsdfdi_v_glibc20): Likewise. [_SOFT_FLOAT || __NO_FPRS__] (__fixunssfdi_v_glibc20): Likewise. [_SOFT_FLOAT || __NO_FPRS__] (__floatdidf_v_glibc20): Likewise. [_SOFT_FLOAT || __NO_FPRS__] (__floaddisf_v_glibc20): Likewise. [HAVE_DOT_HIDDEN && (_SOFT_FLOAT || __NO_FPRS__)] (__fixdfdi): Do not use .hidden. [HAVE_DOT_HIDDEN && (_SOFT_FLOAT || __NO_FPRS__)] (__fixsfdi): Likewise. [HAVE_DOT_HIDDEN && (_SOFT_FLOAT || __NO_FPRS__)] (__fixunsdfdi): Likewise. [HAVE_DOT_HIDDEN && (_SOFT_FLOAT || __NO_FPRS__)] (__fixunssfdi): Likewise. [HAVE_DOT_HIDDEN && (_SOFT_FLOAT || __NO_FPRS__)] (__floaddidf): Likewise. [HAVE_DOT_HIDDEN && (_SOFT_FLOAT || __NO_FPRS__)] (__floaddisf): Likewise. * sysdeps/powerpc/nofpu/Versions (libc): Remove __fixdfdi, __fixsfdi, __fixunsdfdi, __fixunssfdi, __floatdidf and __floatdisf from GLIBC_2.3.2.
2013-12-19Update powerpc-fpu ULPs.Adhemerval Zanella
2013-12-19Fix white space as well.Paul Pluzhnikov
2013-12-19Fix incorrect power of 2 check in last commit.Paul Pluzhnikov
2013-12-19Cleanup compile warnings.Paul Pluzhnikov
2013-12-19 Paul Pluzhnikov <ppluzhnikov@google.com> * elf/dl-misc.c (ptr_to_signal_safe_allocator_header): New function. (__signal_safe_memalign, __signal_safe_free): Use it. (__signal_safe_realloc): Likewise.
2013-12-19Update texinfo.tex, config.guess, config.sub from upstream.Joseph Myers
This patch updates various miscellaneous files we take from upstream GNU sources (texinfo.texi, config.guess, config.sub - various others haven't changed upstream since we last updated them) to their current upstream versions. Tested x86_64. * manual/texinfo.tex: Update to version 2013-11-26.10 with trailing whitespace removed. * scripts/config.guess: Update to version 2013-11-29. * scripts/config.sub: Update to version 2013-10-01.
2013-12-19Move tests of sincos from libm-test.inc to auto-libm-test-in.Joseph Myers
This patch moves tests of sincos to auto-libm-test-in, adding the required support to gen-auto-libm-tests. Tested x86_64 and x86 and ulps updated accordingly. (auto-libm-test-out diffs omitted below.) * math/auto-libm-test-in: Add tests of sincos. * math/auto-libm-test-out: Regenerated. * math/libm-test.inc (sincos_test_data): Use AUTO_TESTS_fFF_11. * math/gen-auto-libm-tests.c (func_calc_method): Add value mpfr_f_11. (func_calc_desc): Add mpfr_f_11 union field. (test_functions): Add sincos. (calc_generic_results): Handle mpfr_f_11. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2013-12-19Fix uses of CALL_MCOUNT in ppc64 assembler sourcesAndreas Schwab
2013-12-19Disable libm-test test name beautification for M_* constants.Joseph Myers
math/gen-libm-test.pl has code to beautify names of various constants, transforming the source form in libm-test.inc into the version appearing in test names in libm-test-ulps files. This has become decreasingly relevant over time for the M_* constants, first as I changed the test names so only the arguments and not the expected results appeared in them, then as tests have moved to auto-libm-test-* so that automatically generated hex float constants get used instead of M_* in test inputs. This patch removes the beautification for all M_* constants. Tested x86_64 and x86 and ulps updated accordingly. Even the one case where this affected the name in the ulps files will disappear once complex function tests are moved to auto-libm-test-*. * math/gen-libm-test.pl (%beautify): Remove M_* constants. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2013-12-19Fix x86/x86_64 expm1 inaccuracy near 0 in directed rounding modes (bug 16293).Joseph Myers
Bug 16293 is inaccuracy of x86/x86_64 versions of expm1, near 0 in directed rounding modes, that arises from frndint rounding the exponent to 1 or -1 instead of 0, resulting in large cancellation error. This inaccuracy in turn affects other functions such as sinh that use expm1. This patch fixes the problem by setting round-to-nearest mode temporarily around the affected calls to frndint. I don't think this is needed for other uses of frndint, such as in exp itself, as only for expm1 is the cancellation error significant. Tested x86_64 and x86 and ulps updated accordingly. * sysdeps/i386/fpu/e_expl.S (IEEE754_EXPL) [USE_AS_EXPM1L]: Set round-to-nearest mode when using frndint. * sysdeps/i386/fpu/s_expm1.S (__expm1): Likewise. * sysdeps/i386/fpu/s_expm1f.S (__expm1f): Likewise. * sysdeps/x86_64/fpu/e_expl.S (IEEE754_EXPL) [USE_AS_EXPM1L]: Likewise. * math/auto-libm-test-in: Add more tests of expm1. Do not expect sinh test to fail. * math/auto-libm-test-out: Regenerated. * math/libm-test.inc (TEST_COND_x86_64): Remove macro. (TEST_COND_x86): Likewise. (expm1_tonearest_test_data): New array. (expm1_test_tonearest): New function. (expm1_towardzero_test_data): New array. (expm1_test_towardzero): New function. (expm1_downward_test_data): New array. (expm1_test_downward): New function. (expm1_upward_test_data): New array. (expm1_test_upward): New function. (main): Run the new test functions. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2013-12-19Add _DEFAULT_SOURCE feature test macro.Joseph Myers
This patch adds a feature test macro _DEFAULT_SOURCE to enable the default set of header declarations. The intention is: if _DEFAULT_SOURCE is not used there is no change to the set of __USE_* macros glibc defines; if it's used on its own, and without compiler options such as -std=c99 that define __STRICT_ANSI__, again, there is no change; if it's used together with the macros it approximately (i.e., apart from __USE_POSIX_IMPLICITLY) implies (-D_BSD_SOURCE -D_SVID_SOURCE -D_POSIX_C_SOURCE=200809L), again, there is no change. Otherwise, it causes the relevant features to be enabled, even if __STRICT_ANSI__, or another feature test macro, would cause them to be disabled. This macro deliberately bundles the POSIX.1-2008 (non-X/Open) functionality with the BSD/SVID/"misc" functionality, rather than defining a macro that gives just the latter, as many of the header cleanups resulting from removing _BSD_SOURCE and _SVID_SOURCE support are only possible when BSD/SVID/"misc" is always bundled with POSIX.1-2008. Tested x86_64. * include/features.h: Update comment documenting feature test macros. Mention _DEFAULT_SOURCE in comment. [_GNU_SOURCE] (_DEFAULT_SOURCE): Undefine and redefine. [_DEFAULT_SOURCE]: Undefine and redefine _DEFAULT_SOURCE, _BSD_SOURCE and _SVID_SOURCE. [!__STRICT_ANSI__ && !_ISOC99_SOURCE && !_POSIX_SOURCE && !_POSIX_C_SOURCE && !_XOPEN_SOURCE && !_BSD_SOURCE && !_SVID_SOURCE]: Likewise. [_DEFAULT_SOURCE && !_POSIX_SOURCE && !_POSIX_C_SOURCE] (__USE_POSIX_IMPLICITLY): Define. [_DEFAULT_SOURCE && !_POSIX_SOURCE && !_POSIX_C_SOURCE] (_POSIX_SOURCE): Undefine and redefine. [_DEFAULT_SOURCE && !_POSIX_SOURCE && !_POSIX_C_SOURCE] (_POSIX_C_SOURCE): Likewise. * manual/creature.texi (_DEFAULT_SOURCE): Document. (Feature Test Macros): Update documentation of default features.
2013-12-19benchtests: Add strtok benchmarkRajalakshmi Srinivasaraghavan
2013-12-19Stop partial menu generation in INSTALL fileAllan McRae
The commit d136c6dc resulted in menu text for the "Top" node being added to the INSTALL file on regeneration. As the full menu is not displayed in the plain text file anyway, suppress the menu section completely to avoid the additional text. Also regenerate the INSTALL file to commit a small formatting change introduced in the same commit.
2013-12-18Patch 2/4 of the effort to make TLS access async-signal-safe.Paul Pluzhnikov
Add a signal-safe malloc replacement. 2013-12-18 Andrew Hunter <ahh@google.com> * sysdeps/generic/ldsodefs.h (__signal_safe_memalign): New prototype. (__signal_safe_malloc, __signal_safe_free): Likewise. (__signal_safe_realloc, __signal_safe_calloc): Likewise. * elf/dl-misc.c (__signal_safe_allocator_header): New struct. (__signal_safe_memalign, __signal_safe_malloc): New function. (__signal_safe_free, __signal_safe_realloc): Likewise. (__signal_safe_calloc): Likewise. * elf/dl-tls.c (allocate_dtv, _dl_clear_dtv): Call signal-safe functions. (_dl_deallocate_tls, _dl_update_slotinfo): Likewise.
2013-12-18Patch 3/4 of the effort to make TLS access async-signal-safe.Paul Pluzhnikov
Factor out _dl_clear_dtv. 2013-12-18 Andrew Hunter <ahh@google.com> * elf/Versions (ld): Add _dl_clear_dtv. * sysdeps/generic/ldsodefs.h (_dl_clear_dtv): New prototype. * elf/dl-tls.c (_dl_clear_dtv): New function. * nptl/allocatestack.c (get_cached_stack): Call _dl_clear_dtv.
2013-12-18Patch [1/4] async-signal safe TLS.Paul Pluzhnikov
2013-12-18 Andrew Hunter <ahh@google.com> * sysdeps/generic/ldsodefs.h (_dl_mask_all_signals): New prototype. (_dl_unmask_signals): Likewise. * sysdeps/mach/hurd/dl-sysdep.h (_dl_mask_all_signals): New stub. (_dl_unmask_all_signals): Likewise. * sysdeps/unix/sysv/linux/dl-sysdep.h (_dl_mask_all_signals): New prototype. (_dl_unmask_all_signals): Likewise. * sysdeps/unix/sysv/linux/dl-sysdep.c (_dl_mask_all_signals): New function. (_dl_unmask_signals): Likewise.
2013-12-18Updated NEWS to mention resolution of bug 15846.Brooks Moses
2013-12-18Add error reporting (via errno) to getauxval().Brooks Moses
[BZ 15846] As discussed in the recent thread on my $EXEC_ORIGIN patch and in BZ 15846, getauxval() presently has no unambiguous way of reporting an error condition. It currently returns zero on error, but this may also be a valid result for some auxv entries. As there is no clear invalid result for all current and future auxv entries, this patch sets errno (following a suggestion in the BZ entry). This version of the patch also adds documentation and tests for the value-not-found conditions in getauxval().
2013-12-18Move tests of jn and yn from libm-test.inc to auto-libm-test-in.Joseph Myers
This patch moves tests of jn and yn to auto-libm-test-in, adding the required support for gen-auto-libm-tests (and adding a missing assertion there and fixing logic that was broken for functions with integer arguments). Tested x86_64 and x86 and ulps updated accordingly. * math/auto-libm-test-in: Add tests of jn and yn. * math/auto-libm-test-out: Regenerated. * math/libm-test.inc (jn_test_data): Use AUTO_TESTS_if_f. (yn_test_data): Likewise. * math/gen-auto-libm-tests.c (func_calc_method): Add value mpfr_if_f. (func_calc_desc): Add mpfr_if_f union field. (FUNC_mpfr_if_f): New macro. (test_functions): Add jn and yn. (calc_generic_results): Assert type of second input for mpfr_ff_f. Handle mpfr_if_f. (output_for_one_input_case): Disable all checking for arguments fitting floating-point types in case of an integer argument. * sysdeps/i386/fpu/libm-test-ulps: Update. * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2013-12-18Update powerpc-nofpu localplt.data for fegetround hidden_proto / hidden_def.Joseph Myers
My recent changes that added libm_hidden_proto / libm_hidden_def for fegetround had the side effect of removing the need for a localplt.data entry for fegetround for powerpc-nofpu. This patch removes that entry. Tested powerpc-nofpu. * sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/nptl/localplt.data: Don't expect fegetround reference in libm.so.
2013-12-18Add missing deftp to fix commit 4d84e6addd62bdc256627af.Ondřej Bílka
2013-12-18Compile e_sqrt.c with -ffp-contract=off.Marcus Shawcroft
2013-12-18[AArch64] Save and restore q0-q7 on entry to dynamic linker.Marcus Shawcroft
[BZ #15128] Ensure all argument passing registers are saved and restored on entry to dynamic linker.
2013-12-18Mark some hypot tests no-test-inline.Joseph Myers
As needed on x86. * math/auto-libm-test-in: Mark some hypot tests no-test-inline. * math/auto-libm-test-out: Regenerated.
2013-12-18Fix ldbl-128 logl for subnormals (bug 16338).Joseph Myers
This patch fixes bug 16338, ldbl-128 logl not handling subnormals (with consequent inaccuracy for lgammal as well). The fix is simply to use __frexpl when determining the exponent, as done already in log2l and log10l. Given the lack of testing of small arguments to any of the log* functions, appropriate tests are added for all of them. Tested x86_64 and x86 and ulps updated accordingly, and spot tests also run for mips64 to confirm the ldbl-128 fix. Note that while this fixes lgammal inaccuracy for small positive arguments, I suspect that there will still be problems with spurious underflows in that case. * sysdeps/ieee754/ldbl-128/e_logl.c (__ieee754_logl): Use __frexpl to determine exponent and adjust argument to have exponent of -1. * math/auto-libm-test-in: Add more tests of log, log10, log1p and log2. * math/auto-libm-test-out: Regenerated. * sysdeps/x86_64/fpu/libm-test-ulps: Update.
2013-12-18Update documentation after dropping PER_THREAD conditional.Ondřej Bílka
In probes documentation we described what happens when PER_THREAD is disabled which is now not relevant.
2013-12-18Remove use of SSE4.2 functions for strstr on i686Andreas Schwab
The SSE4.2 have been removed from x86_64 by commit 584b18eb. This patch fixes the build on i686, which attempts to use the removed files.
2013-12-17Remove unused files from sysdeps/unix/bsd/bsd4.4/bits/.Joseph Myers
2013-12-17Support TZ transition times < 00:00:00.Paul Eggert
This is needed for version-3 tz-format files; it supports time stamps past 2037 for America/Godthab (the only entry in the tz database for which this change is relevant). * manual/time.texi (TZ Variable): Document transition times from -167:59:59 through -00:00:01. * time/tzset.c (tz_rule): Time of day is now signed. (__tzset_parse_tz): Parse negative time of day.
2013-12-17Document TZ transition times >= 25:00:00.Paul Eggert
* manual/time.texi (TZ Variable): Document transition times from 25:00:00 through 167:59:59. These are already supported, and this support will help with version-3 tz-format files.
2013-12-17* manual/time.texi (TZ Variable): Modernize North America examplePaul Eggert
to reflect current (i.e., 2007-and-later) daylight saving rules.
2013-12-17* manual/time.texi (TZ Variable): POSIX.1 hour can be 24.Paul Eggert
2013-12-17Remove various unused files from sysdeps/unix/bsd/.Joseph Myers
2013-12-17Remove libbsd-compat dummy library.Joseph Myers
2013-12-17Remove __FAVOR_BSD.Joseph Myers
2013-12-17[AArch64] Implement FUTEX_*_REQUEUE_PIMarcus Shawcroft
2013-12-17Update powerpc-fpu ULPs.Adhemerval Zanella
2013-12-17Fix dbl-64 hypot spurious underflows (bug 16314).Joseph Myers
2013-12-17Fix hypot handling of subnormals (bug 16316, bug 16330).Joseph Myers
2013-12-17[AArch64] libm-test-ulps regenerated from scratch.Marcus Shawcroft
2013-12-17[AArch64] Back out sqrt() addition to libm-test-ulps.Marcus Shawcroft
2013-12-17Make soft-float sh use soft-fp fma/fmaf.Kaz Kojima
2013-12-16Clean up setjmp use in dl-error.c.Roland McGrath
2013-12-16Move tests of atan2, hypot and pow from libm-test.inc to auto-libm-test-in.Joseph Myers
2013-12-16Add missing bug number to NEWS.Joseph Myers
2013-12-16manual/memory.texi: Document aligned_alloc.Will Newton
ChangeLog: 2013-12-16 Will Newton <will.newton@linaro.org> * manual/memory.texi (Malloc Examples): Mention aligned_alloc. (Aligned Memory Blocks): Add documentation for aligned_alloc and suggest it as an alternative to posix_memalign. (Hooks for Malloc): Document __memalign_hook is also called for aligned_alloc. (Summary of Malloc): Add summary for aligned alloc. Document __memalign_hook is also called for aligned_alloc.
2013-12-16manual/memory.texi: Bring aligned allocation docs up to date.Will Newton
The current documentation suggests using memalign and valloc which are now considered obsolete, so suggest using posix_memalign instead. Also document the possible error return and errno values for memalign and posix_memalign and improve documentation of __memalign_hook. ChangeLog: 2013-12-16 Will Newton <will.newton@linaro.org> * manual/memory.texi (Malloc Examples): Clarify default alignment documentation. Suggest posix_memalign rather than memalign or valloc. (Aligned Memory Blocks): Remove suggestion to use memalign or valloc. Remove obsolete comment about BSD. Document memalign errno values and mark the function obsolete. Document posix_memalign returned error codes. Mark valloc as obsolete. (Hooks for Malloc): __memalign_hook is also called for posix_memalign and valloc. (Summary of Malloc): Add posix_memalign to function summary. __memalign_hook is also called for posix_memalign and valloc.
2013-12-16Minor code cleanup in s_sin.cSiddhesh Poyarekar
- Remove redundant mynumber union definitions - Clean up a clumsy ternary operator - Rename TAYLOR_SINCOS to TAYLOR_SIN since we're only expanding the sin Taylor series in it.
2013-12-16Set AUTOCONF variable when maintainer-mode is not usedAllan McRae
Fixes build issue introduced in 8894bad3 when configure.ac is altered and maintainer-mode is not enabled.