aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-05-24Correctly compute ulp near zero.Carlos O'Donell2-48/+103
The current value used for ulp near zero is wrong, and this commit fixes it such that ulp(0) is the smallest subnormal value nearest to zero, which makes the most sense for testing values near zero. Note that this is not what Java does; they use the nearest normal value, which is less accurate than what we want for glibc. Note that there is no correct implementation of ulp since there is no strict mathmatical definition that is accepted by all groups using IEEE 754. Previously with the large ulp values near zero there were tests that previously passed, but were in fact billions of ulp away from the precise answer. With this commit we now need to disable one of the cpow tests which is revealed to be inaccurate (bug 14473). --- 2013-05-24 Carlos O'Donell <carlos@redhat.com> * math/libm-test.inc (MAX_EXP): Define. (ULPDIFF): Define. (ulp): New function. (check_float_internal): Use ULPDIFF. (cpow_test): Disable failing test. (check_ulp): Test ulp() implemetnation. (main): Call check_ulp before starting tests.
2013-05-24tile: improve detection for missing -mcmodel=large supportChris Metcalf4-4/+41
The existing test avoided passing -mcmodel=large if the compiler didn't support it. However, we need to test not just the compiler support, but also the toolchain (as and ld) support, so make the test more complete. In addition, we have to avoid using the hwN_plt() assembly operators if that support is missing, so guard the uses with #ifdef NO_PLT_PCREL. This allows us to properly build glibc with the current community binutils, which doesn't yet have the PC-relative PLT operator support. The -mcmodel=large support is in gcc 4.8, but the toolchain support won't be present in the community until binutils 2.24.
2013-05-24Remove libm-test START_DATA and END_DATA.Joseph Myers3-347/+172
2013-05-24Make libm-test START and END into ordinary macros.Joseph Myers3-197/+352
2013-05-24Initialize wide struct info.Ondrej Bilka3-3/+12
Fixes 15381. Using wide character function is on byte oriented memstream is undefined behaviour. This behaviour was masked by not initializing wide struct info. We now initialize it to cause a predictable crash.
2013-05-23Add BZ # to ChangeLog for commit 9323d39baea2fb0cca3735136abe263eff405133Ryan S. Arnold1-0/+1
2013-05-23PowerPC: Add functions for shared resources hints.Edjunior Machado3-0/+63
2013-05-23[AArch64] Fix up ChangeLog formatting for last commit.Marcus Shawcroft1-1/+1
2013-05-23[AArch64] Use generic "mcount" routine for profiling.Marcus Shawcroft2-25/+4
2013-05-22Update comments in ldconfig.c and dl-hwcaps.c.Carlos O'Donell3-8/+16
In dl-hwcaps.c the comment read that rounding was done to ElfW(Addr), but it's actually rounded to ElfW(Word). In ldconfig.c we make each comment a sentence and mention that the "tls" pseudo-hwcap is just for legacy installations where TLS was optional. --- 2013-05-22 Carlos O'Donell <carlos@redhat.com> * elf/ldconfig.c (is_hwcap_platform): Make comments full setences. (main): Mention "tls" pseudo-hwcap is legacy. * elf/dl-hwcaps.c (_dl_important_hwcaps): Correct rounding comment.
2013-05-22Don't include function names in test data in generated libm-test.c.Joseph Myers3-132/+327
2013-05-22Update bits/siginfo.h with Linux hwpoison SIGBUS changesEdjunior Barbosa Machado12-8/+89
Adds new SIGBUS error codes for hardware poison signals, syncing with the current kernel headers (v3.9). It also adds si_trapno field for alpha.
2013-05-22Fix _nl_find_msg malloc failure case, and callers.Carlos O'Donell4-7/+36
This patch fixes two issues, and perhaps should be two distinct commits, but I present it here as one for the sake of completeness. Commit 006dd86111c44572dbd3b26e9c63dd0f834d7762 fails to check malloc's return in intl/dcigettext.c (_nl_find_msg): ~~~ freemem_size = INITIAL_BLOCK_SIZE; newmem = (transmem_block_t *) malloc (freemem_size); ... newmem->next = transmem_list; transmem_list = newmem; ~~~ If malloc fails then newmem is NULL then newmem->next results in a fault. The fix is easy enough, check for newmem != NULL, and fall through to the error condition below which returns (char *) -1 e.g. resource error. The problem is that returning (char *) -1 will break all sorts of other code, so while what we did is correct, the real failure case fix is slightly broader. There are 4 other places where _nl_find_msg is called, one is OK, the other three are fixed to handle -1 error return value. No regressions on x86-64 or x86. However, no regressions isn't really a useful metric for this code. The change was tested as documented here: http://sourceware.org/glibc/wiki/Testing/WhiteBox using SystemTap for fault injection to simulate malloc failure. --- 2013-05-03 Carlos O'Donell <carlos at redhat.com> [BZ #15441] * intl/dcigettext.c (DCIGETTEXT): Skip translating if _nl_find_msg returns -1. (_nl_find_msg): Return -1 if recursive call returned -1. If newmem is null return -1. * intl/loadmsgcat.c (_nl_load_domain): If _nl_find_msg returns -1 abort loading the domain.
2013-05-22Don't include expected results in libm-test test names.Joseph Myers30-18536/+18569
2013-05-22Sort benchmark functionsSiddhesh Poyarekar2-41/+44
2013-05-22Add benchmark inputs for math functionsSiddhesh Poyarekar11-1/+97
Add benchmark inputs for inverse and hyperbolic trigonometric functions and log.
2013-05-21Fix MIPS n32 cancellation in static libc (bug 15506).Joseph Myers5-17/+96
2013-05-21Test getaddrinfo return valueDmitry V. Levin3-1/+74
This helps testing for regression of BZ#15339. Creation of network isolated environments is a privileged operation and therefore is not included to the test.
2013-05-21Set EAI_SYSTEM only when h_errno is NETDB_INTERNALSiddhesh Poyarekar4-10/+26
Fixes BZ #15339. NSS_STATUS_UNAVAIL may mean that a necessary input resource is not available. This could occur in a number of cases including when the network is down, system runs out of file descriptors, etc. The correct differentiator in such a case is the h_errno, which gives the nature of failure. In case of failures other than a simple 'not found', we set h_errno as NETDB_INTERNAL and let errno be the identifier for the exact error.
2013-05-21Fix parsing of numeric hosts in gethostbyname_rAndreas Schwab6-61/+83
2013-05-21Add a README for benchtestsSiddhesh Poyarekar3-20/+81
Move instructions from the Makefile here and expand on them.
2013-05-21AArch64: Don't clobber argument for tail call to __sigjmp_save in sigsetjmpAndreas Schwab6-4/+68
2013-05-21[AArch64] Update libm-test-ulps.Marcus Shawcroft2-32/+6051
2013-05-20PowerPC: update missing CL/NEWS bug referenceAdhemerval Zanella2-1/+2
Update ChangLog bugzilla number and NEWS for commit 13d3b41a36c4f28d171a144f8a9baad3a8835981 (PowerPC: fix hypot/hypotf check for -INF).
2013-05-20Faster memset on x64Ondrej Bilka2-1315/+96
This implementation speed up memset in several ways. First is avoiding expensive computed jump. Second is using fact that arguments of memset are most of time aligned to 8 bytes. Benchmark results on: kam.mff.cuni.cz/~ondra/benchmark_string/memset_profile_result27_04_13.tar.bz2
2013-05-20Faster memcpy on x64.Ondrej Bilka5-8/+195
We add new memcpy version that uses unaligned loads which are fast on modern processors. This allows second improvement which is avoiding computed jump which is relatively expensive operation. Tests available here: http://kam.mff.cuni.cz/~ondra/memcpy_profile_result27_04_13.tar.bz2
2013-05-19Fix nearbyint scheduling of arithmetic past fesetenv (bug 15490).Joseph Myers7-1/+26
2013-05-19Handle sincos with generic libm-test logic.Joseph Myers32-217/+252
2013-05-19Simplify gen-libm-test.pl handling of tests with extra outputs.Joseph Myers2-65/+24
2013-05-18Don't disable CMPLXL macro for __NO_LONG_DOUBLE_MATH (bug 15488).Joseph Myers5-10/+13
2013-05-18Make libm-test look up ulps by name at runtime.Joseph Myers3-228/+315
2013-05-17Fix remainder exceptions and directed-rounding results (bugs 15480, 15485).Joseph Myers4-8/+181
2013-05-17Simplify libm-test extra-output initialization.Joseph Myers3-37/+49
2013-05-17Don't handle ulps for integer tests in libm-test.inc.Joseph Myers2-15/+8
2013-05-17Test more cases of "inexact" exceptions in libm-test.inc.Joseph Myers2-1119/+1205
2013-05-17Prevent optimizing out of benchmark function callSiddhesh Poyarekar4-3/+10
Resolves: #15424 The compiler would optimize the benchmark function call out of the loop and call it only once, resulting in blazingly fast times for some benchmarks (notably atan, sin and cos). Mark the inputs as volatile so that the code is forced to read again from the input for each iteration.
2013-05-17PowerPC: fix hypot/hypotf check for -INFAdhemerval Zanella3-6/+12
2013-05-16MIPS: soft-fp NaN representation correctionsMaciej W. Rozycki15-18/+124
[BZ #15442] This adds support for the inverse interpretation of the quiet bit of IEEE 754 floating-point NaN data that some processors use. This includes in particular MIPS architecture processors; the payload used for the canonical qNaN encoding is updated accordingly so as not to interfere with the quiet bit.
2013-05-16Test for errno setting in more pole error cases.Joseph Myers2-15/+24
2013-05-16Remove ENOSYS tests in libm-test.inc.Joseph Myers2-649/+104
2013-05-16Remove libm-test support for TEST_* inside functions.Joseph Myers3-90/+53
2013-05-16Add #include <stdint.h> for uint[32|64]_t usage (except installed headers).Ryan S. Arnold220-12/+528
2013-05-16Convert TEST_extra tests from code to data.Joseph Myers2-48/+82
2013-05-16De-stringify constants in math/atest-exp2.c.Richard Henderson2-42/+44
2013-05-16Support testing "inexact" exceptions in libm-test.inc.Joseph Myers2-392/+421
2013-05-16Test for errno setting in more overflow error cases.Joseph Myers2-81/+89
2013-05-16Convert TEST_cc_c tests from code to data.Joseph Myers2-14/+41
2013-05-16Convert TEST_f_L tests from code to data.Joseph Myers2-769/+797
2013-05-15Remove const attribute on get_log2Peter Collingbourne2-1/+4
This function is not const, as it can modify log2_m and log2_m_inited.
2013-05-15hppa: Cleanup libm-test-ulps.Carlos O'Donell2-420/+3
Joseph Myers noted that there were several old and really very incorrect values in the hppa libm-test-ulps. This patch removes all of the ulps values for ceil, floor, rint, round, trun, llrint, and llround, all of which were previously incorreclty added (including some negative values which are really wrong). --- ports/ 2013-05-15 Carlos O'Donell <carlos@redhat.com> * sysdeps/hppa/fpu/libm-test-ulps: Remove old values for ceil, floor, rint, round, trunc, llrint, and llround.