jlayton/glibc.git
10 years agoUpdate Esperanto translations
Allan McRae [Fri, 10 Jan 2014 02:22:47 +0000 (12:22 +1000)]
Update Esperanto translations

10 years agoUpdate Czech translations
Allan McRae [Fri, 10 Jan 2014 02:21:14 +0000 (12:21 +1000)]
Update Czech translations

10 years agoUpdate Dutch translations
Allan McRae [Fri, 10 Jan 2014 02:19:01 +0000 (12:19 +1000)]
Update Dutch translations

10 years agoUpdate Polish translations
Allan McRae [Fri, 10 Jan 2014 02:16:23 +0000 (12:16 +1000)]
Update Polish translations

10 years agoUpdate Russian translations
Allan McRae [Fri, 10 Jan 2014 02:15:25 +0000 (12:15 +1000)]
Update Russian translations

10 years agoUpdate Ukrainian translations
Allan McRae [Fri, 10 Jan 2014 02:13:43 +0000 (12:13 +1000)]
Update Ukrainian translations

10 years agoObvious comment typo fix ("openened") in elf/dl-load.c.
Brooks Moses [Thu, 9 Jan 2014 02:46:53 +0000 (18:46 -0800)]
Obvious comment typo fix ("openened") in elf/dl-load.c.

10 years agoRename header.pot to pot.header.
Carlos O'Donell [Wed, 8 Jan 2014 22:09:48 +0000 (17:09 -0500)]
Rename header.pot to pot.header.

The Translation Project has asked us to rename the
pot header file `header.pot' to something else. Their
scripts automatically look for pot files and the
file `header.pot' is not actually a pot file but a
header that we use when regenerating `libc.pot.'
This commit renames `header.pot' to `pot.header' to
avoid causing errors or complicating the TP project
scripts.

10 years agoFix a thinko/typo in i686's memmove (aka __memmove_ia32).
Yuriy Kaminskiy [Wed, 8 Jan 2014 20:49:54 +0000 (09:49 +1300)]
Fix a thinko/typo in i686's memmove (aka __memmove_ia32).

* sysdeps/i386/i686/memmove.S (memmove): Compare distance between
SRC and DEST against LEN.

10 years agoPowerPC: remove wrong truncl implementation for PowerPC64
Adhemerval Zanella [Wed, 8 Jan 2014 11:10:41 +0000 (05:10 -0600)]
PowerPC: remove wrong truncl implementation for PowerPC64

The truncl assembly implementation (sysdeps/powerpc/powerpc64/fpu/s_truncl.S)
returns wrong results for some inputs where first double is a exact integer
and the precision is determined by second long double.

Checking on implementation comments and history, I am very confident the
assembly implementation was based on a version before commit
5c68d401698a58cf7da150d9cce769fa6679ba5f that fixes BZ#2423 (Errors in
long double (ldbl-128ibm) rounding functions in glibc-2.4).

By just removing the implementation and make the build select
sysdeps/ieee754/ldbl-128ibm/s_truncl.c instead it fixes tgammal
issues regarding wrong result sign.

10 years agoUpdate powerpc-fpu ULPs.
Adhemerval Zanella [Wed, 8 Jan 2014 13:45:54 +0000 (07:45 -0600)]
Update powerpc-fpu ULPs.

10 years agoFix ldbl-128ibm expm1l on large arguments (bug 16408).
Joseph Myers [Wed, 8 Jan 2014 13:32:39 +0000 (13:32 +0000)]
Fix ldbl-128ibm expm1l on large arguments (bug 16408).

This patch fixes bug 16408, ldbl-128ibm expm1l returning NaN for some
large arguments.

The basic problem is that the approach of converting the exponent to
the form n * log(2) + y, where -0.5 <= y <= 0.5, then computing 2^n *
expm1(y) + (2^n - 1) falls over when 2^n overflows (starting slightly
before the point where expm1 overflows, when y is negative and n is
the least integer for which 2^n overflows).  The ldbl-128 code, and
the x86/x86_64 code, make expm1l fall back to expl for large positive
arguments to avoid this issue.  This patch makes the ldbl-128ibm code
do the same.  (The problem appears for the particular argument in the
testsuite because the ldbl-128ibm code also uses an overflow threshold
that's for ldbl-128 and is too big for ldbl-128ibm, but the problem
described applies for large non-overflowing cases as well, although
during the freeze is not a suitable time for making the expm1 tests
cover cases close to overflow more thoroughly.)

This leaves some code for large positive arguments in expm1l that is
now dead.  To keep the code for ldbl-128 and ldbl-128ibm similar, and
to avoid unnecessary changes during the freeze, the patch doesn't
remove it; instead I propose to file a bug in Bugzilla as a reminder
that this code (for overflow, including errno setting, and for
arguments of +Inf) is no longer needed and should be removed from both
those expm1l implementations.

Tested powerpc32.

* sysdeps/ieee754/ldbl-128ibm/s_expm1l.c (__expm1l): Use __expl
for large positive arguments.

10 years agoUse separate libc.abilist for MIPS o32 soft float.
Joseph Myers [Tue, 7 Jan 2014 23:58:45 +0000 (23:58 +0000)]
Use separate libc.abilist for MIPS o32 soft float.

Examining MIPS test results showed an ABI test failure that I must
have missed in 2.18 testing: hard-float and soft-float o32 no longer
have the same set of symbols (because of the __mips_fpu_getcw and
__mips_fpu_setcw functions, present for hard-float only, used by
fpu_control.h for hard-float MIPS16) and so need separate ABI test
baselines (they always were ABI-incompatible - the function-calling
interface is different - but previously had the same set of symbols
and versions so didn't need separate baselines).

Tested for hard-float and soft-float o32.

* sysdeps/unix/sysv/linux/mips/mips32/nptl/libc.abilist: Move to
....
* sysdeps/unix/sysv/linux/mips/mips32/fpu/nptl/libc.abilist:
... here.
* sysdeps/unix/sysv/linux/mips/mips32/nofpu/nptl/libc.abilist: New
file.

10 years agoRegenerate powerpc-nofpu ulps (again).
Joseph Myers [Tue, 7 Jan 2014 23:32:04 +0000 (23:32 +0000)]
Regenerate powerpc-nofpu ulps (again).

10 years agoMark more libm tests with xfail-rounding:ldbl-128ibm.
Joseph Myers [Tue, 7 Jan 2014 22:41:58 +0000 (22:41 +0000)]
Mark more libm tests with xfail-rounding:ldbl-128ibm.

This patch marks more libm tests as expected to fail for ldbl-128ibm
in non-default rounding modes.  Given this, my expm1l fix
<https://sourceware.org/ml/libc-alpha/2014-01/msg00135.html> and my
libgcc fix <http://gcc.gnu.org/ml/gcc-patches/2014-01/msg00157.html>
for spurious overflows, the remaining failures in test-ldouble.out
(for powerpc32 hard float) are small ulps, spurious underflow and
inexact exceptions (the former probably arising from libgcc bugs
though I haven't checked each case; the latter are barely meaningful
for this format anyway when basic arithmetic isn't correctly rounding,
though most of them are probably GCC bug 59412 which doesn't actually
involve long double), missing underflow exceptions from clog, ctan and
ctanh (probably one of the known bugs for another function), and logb
in round-downward mode (bug 887, though it's really a GCC bug that
we're not currently working around).

Tested for powerpc32 hard float.

* math/auto-libm-test-in: Mark various tests with
xfail-rounding:ldbl-128ibm.
* math/auto-libm-test-out: Regenerated.

10 years agoFix ldbl-128ibm coshl spurious overflows (bug 16407).
Joseph Myers [Tue, 7 Jan 2014 22:00:04 +0000 (22:00 +0000)]
Fix ldbl-128ibm coshl spurious overflows (bug 16407).

This patch fixes bug 16407, spurious overflows from ldbl-128ibm coshl.
The implementation assumed that a high part (reinterpreted as an
integer) of the absolute value of the argument of 0x408633ce8fb9f87dLL
or more meant overflow, but the actual threshold has high part
0x408633ce8fb9f87eLL (and a negative low part).  The patch adjusts the
threshold accordingly.

sinhl probably has the same issue, but I didn't get that far in adding
tests of special cases (such as just below and above overflow) before
the freeze and during the freeze is not a suitable time to add them
(as they'd require ulps to be regenerated again), so I'm not changing
that function for now; when I add more tests of special cases, we'll
discover whether sinhl indeed has this problem.

Tested powerpc32.

* sysdeps/ieee754/ldbl-128ibm/e_coshl.c (__ieee754_coshl):
Increase overflow threshold.

10 years ago[AArch64] Fix FP_ROUNDMODE.
Marcus Shawcroft [Tue, 7 Jan 2014 16:16:35 +0000 (16:16 +0000)]
[AArch64] Fix FP_ROUNDMODE.

[BZ #16387] Fix FP_ROUNDMODE to extract the correct bits from FPCR.

10 years ago[AArch64] Remove sqrt from libm-test-ulps
Marcus Shawcroft [Wed, 1 Jan 2014 23:25:32 +0000 (23:25 +0000)]
[AArch64] Remove sqrt from libm-test-ulps

10 years agoFix integer overflow in vfwprintf. Fixes bug 14286.
Ondřej Bílka [Tue, 7 Jan 2014 11:02:15 +0000 (12:02 +0100)]
Fix integer overflow in vfwprintf. Fixes bug 14286.

10 years ago[AArch64] Fix CFA adjustment on dynamic linker entry.
Marcus Shawcroft [Tue, 7 Jan 2014 10:12:35 +0000 (10:12 +0000)]
[AArch64] Fix CFA adjustment on dynamic linker entry.

10 years agoS/390: Remove __tls_get_addr argument cast.
Andreas Krebbel [Tue, 7 Jan 2014 08:40:39 +0000 (09:40 +0100)]
S/390: Remove __tls_get_addr argument cast.

10 years agoS/390: Get rid of unused variable warning in dl-machine.h
Andreas Krebbel [Tue, 7 Jan 2014 08:40:00 +0000 (09:40 +0100)]
S/390: Get rid of unused variable warning in dl-machine.h

10 years agoS/390: Make ucontext_t extendible.
Andreas Krebbel [Tue, 7 Jan 2014 08:37:31 +0000 (09:37 +0100)]
S/390: Make ucontext_t extendible.

10 years agoS/390: Make jmp_buf extendible.
Andreas Krebbel [Tue, 7 Jan 2014 08:36:31 +0000 (09:36 +0100)]
S/390: Make jmp_buf extendible.

10 years agoia64: regen libm-test-ulps from scratch
Mike Frysinger [Tue, 7 Jan 2014 01:36:26 +0000 (20:36 -0500)]
ia64: regen libm-test-ulps from scratch

Truncate the file first so as to delete old entries and to lower ULPs
for tests that have improved.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agoia64: drop large results from libm-test-ulps [BZ #16401]
Mike Frysinger [Tue, 7 Jan 2014 01:31:11 +0000 (20:31 -0500)]
ia64: drop large results from libm-test-ulps [BZ #16401]

We don't want to record these test results as a good thing.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agoFix ldbl-128 / ldbl-128ibm lgammal spurious underflow (bug 16400).
Joseph Myers [Mon, 6 Jan 2014 18:20:20 +0000 (18:20 +0000)]
Fix ldbl-128 / ldbl-128ibm lgammal spurious underflow (bug 16400).

This patch fixes bug 16400, spurious underflow exceptions for ldbl-128
/ ldbl-128ibm lgammal with small positive arguments, by just using
-__logl (x) as the result in the problem cases (similar to the
previous fix for problems with small negative arguments).

Tested powerpc32, and also tested on mips64 that this does not require
ulps regeneration for the ldbl-128 case.

* sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgammal_r):
Return -__logl (x) for small positive arguments without evaluating
a polynomial.

10 years agoia64: regenerate libm-test-ulps
Mike Frysinger [Mon, 6 Jan 2014 13:21:46 +0000 (08:21 -0500)]
ia64: regenerate libm-test-ulps

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agoia64: add __ prefix to pt_all_user_regs/ia64_fpreg [BZ #762]
Mike Frysinger [Sun, 5 Jan 2014 21:23:42 +0000 (16:23 -0500)]
ia64: add __ prefix to pt_all_user_regs/ia64_fpreg [BZ #762]

This addresses a long standing collision between userspace headers and
kernel headers only on ia64 systems.  All other types have a __ prefix
in the ptrace headers except these two.  Let's finally namespace these.

Verified that at least strace still builds after this change, as well
as after deleting all the struct hacks it has specifically for ia64.

URL: https://sourceware.org/bugzilla/show_bug.cgi?id=762
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agoptrace.h: add __ prefix to ptrace_peeksiginfo_args
Mike Frysinger [Sun, 5 Jan 2014 21:07:13 +0000 (16:07 -0500)]
ptrace.h: add __ prefix to ptrace_peeksiginfo_args

All the other ptrace structures in this file have a __ prefix except this
new one.  This in turn causes build problems for most packages that try to
use ptrace such as strace:

gcc -DHAVE_CONFIG_H -I. -I../..  -I../../linux/x86_64 -I../../linux \
-I./linux  -Wall -Wwrite-strings -g -O2 -MT process.o -MD -MP \
-MF .deps/process.Tpo -c -o process.o ../../process.c
In file included from ../../process.c:63:0:
/usr/include/linux/ptrace.h:58:8: error: redefinition of 'struct ptrace_peeksiginfo_args'
 struct ptrace_peeksiginfo_args {
        ^
In file included from ../../defs.h:159:0,
                 from ../../process.c:37:
/usr/include/sys/ptrace.h:191:8: note: originally defined here
 struct ptrace_peeksiginfo_args
        ^

Since this struct was introduced in glibc-2.18, there shouldn't be any
real regressions with adding the __ prefix.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agoFix typo in inet/netinet/in.h comment
Allan McRae [Mon, 6 Jan 2014 01:27:43 +0000 (11:27 +1000)]
Fix typo in inet/netinet/in.h comment

10 years agoUpdate ULPs for i386
Andreas Jaeger [Sun, 5 Jan 2014 20:48:54 +0000 (21:48 +0100)]
Update ULPs for i386

Update based on testing with GCC 4.8.1 on Intel i7

10 years agoRegenerate libc.po
Allan McRae [Sun, 5 Jan 2014 07:47:49 +0000 (17:47 +1000)]
Regenerate libc.po

10 years agoFix gettext call formatting
Allan McRae [Sun, 5 Jan 2014 07:39:45 +0000 (17:39 +1000)]
Fix gettext call formatting

10 years agoia64: fix build failure after async tls updates
Mike Frysinger [Sat, 4 Jan 2014 13:55:03 +0000 (08:55 -0500)]
ia64: fix build failure after async tls updates

The recent commit 7f507ee17aee720fa423fa38502bc3caa0dd03d7 added a new
local variable "offset" to tls_get_addr_tail.  This conflicts with the
ia64 code which also declares an offset code inline in this func.  So
have the ia64 code rename its local vars with a prefix that shouldn't
collide with anything else in the future.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agonscd: list all tables in usage()
Sami Kerola [Fri, 3 Jan 2014 21:00:56 +0000 (21:00 +0000)]
nscd: list all tables in usage()

Usage output for option --invalidate=TABLE is not helpful without
list of tables.  The list is also missing from nscd(8) manual which
made it pretty difficult to know what are the tables.

10 years agotst-fanotify: switch to AC_DEFINE
Mike Frysinger [Tue, 31 Dec 2013 16:36:54 +0000 (11:36 -0500)]
tst-fanotify: switch to AC_DEFINE

Reported-by: Joseph S. Myers <joseph@codesourcery.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agoFix soft-float ldbl-128ibm atan2l signs of zero results (bug 16390).
Joseph Myers [Fri, 3 Jan 2014 20:56:18 +0000 (20:56 +0000)]
Fix soft-float ldbl-128ibm atan2l signs of zero results (bug 16390).

This patch fixes bug 16390, incorrect signs of zero results from
ldbl-128ibm atan2l, soft-float only.  The problem is a longstanding
GCC bug with fabsl not being correct for signed zero for soft float,
and the fix is using -fno-builtin-fabsl as a workaround, as already
done for various other source files.  Tested powerpc-nofpu.

* sysdeps/powerpc/nofpu/Makefile [$(subdir) = math]
(CFLAGS-e_atan2l.c): Use -fno-builtin-fabsl.

10 years agoFix ChangeLog entry.
Paul Pluzhnikov [Fri, 3 Jan 2014 19:59:26 +0000 (11:59 -0800)]
Fix ChangeLog entry.

10 years agoPowerPC: Fix compiler warnings
Adhemerval Zanella [Fri, 3 Jan 2014 19:22:19 +0000 (13:22 -0600)]
PowerPC: Fix compiler warnings

This patch fixes some compile warnings related to extra tokens at
end of #undef directive from multilib patchset.

10 years agoMerge branch 'master' of ssh://sourceware.org/git/glibc
Paul Pluzhnikov [Fri, 3 Jan 2014 19:23:16 +0000 (11:23 -0800)]
Merge branch 'master' of ssh://sourceware.org/git/glibc

10 years agoAsync-signal safe TLS.
Andrew Hunter [Fri, 3 Jan 2014 19:22:26 +0000 (11:22 -0800)]
Async-signal safe TLS.

ChangeLog:

2014-01-03  Andrew Hunter  <ahh@google.com>

* elf/dl-open.c (): New comment.
* elf/dl-reloc.c (_dl_try_allocate_static_tls): Use
atomic_compare_and_exchange_bool_acq
(_dl_allocate_static_tls): Block signals.
* elf/dl-tls.c (allocate_and_init): Return void.
(_dl_update_slotinfo): Block signals, use atomic update.

nptl/ChangeLog:

2014-01-03  Andrew Hunter  <ahh@google.com>

* nptl/Makefile (tst-tls7): New test.
* nptl/tst-tls7.c: New file.
* nptl/tst-tls7mod.c: New file.
* nptl/allocatestack.c (init_one_static_tls): Use atomic barrier.

10 years agoRegenerate powerpc-nofpu ulps.
Joseph Myers [Fri, 3 Jan 2014 18:09:05 +0000 (18:09 +0000)]
Regenerate powerpc-nofpu ulps.

10 years agoMark various libm tests with xfail-rounding:ldbl-128ibm.
Joseph Myers [Fri, 3 Jan 2014 17:08:10 +0000 (17:08 +0000)]
Mark various libm tests with xfail-rounding:ldbl-128ibm.

This patch marks various libm tests with xfail-rounding:ldbl-128ibm,
where the failures appear to relate to GCC bug 59666 (bad libgcc
handling of directed rounding), so as to allow clean libm-test-ulps
regeneration without needing to edit out large ulps for various
functions manually.

Note that this only deals with the cases problematic for ulps
regeneration.  There are plenty of test failures left that do not
affect ulps regeneration - results that are infinities or NaNs but
should be finite, or vice versa, and missing and spurious exceptions -
which should also be resolved during the release testing period.

Tested for powerpc32 (hard float).

* math/auto-libm-test-in: Mark various tests with
xfail-rounding:ldbl-128ibm.
* math/auto-libm-test-out: Regenerated.

10 years agoFix ldbl-128ibm logl inaccuracy (bug 16386).
Joseph Myers [Thu, 2 Jan 2014 16:35:46 +0000 (16:35 +0000)]
Fix ldbl-128ibm logl inaccuracy (bug 16386).

This patch fixes bug 16386, ldbl-128ibm logl inaccuracy (with
consequent inaccuracy for lgammal) for arguments where the high double
is subnormal, which showed up while attempting to regenerate ulps for
powerpc-nofpu for 2.19.  The problem here is logic failing to allow
for subnormals when calculating the exponent of the argument.  Tested
for powerpc-nofpu.

* sysdeps/ieee754/ldbl-128ibm/e_logl.c (__ieee754_logl): Adjust
numbers with subnormal high part when calculating exponent.

10 years agoFix ldbl-128ibm asinhl inaccuracy (bug 16385).
Joseph Myers [Thu, 2 Jan 2014 16:34:24 +0000 (16:34 +0000)]
Fix ldbl-128ibm asinhl inaccuracy (bug 16385).

This patch fixes bug 16385, ldbl-128ibm asinhl inaccuracy, which
showed up while attempting to regenerate ulps for powerpc-nofpu for
2.19.  The problem here was use of fabs instead of fabsl meaning large
arguments were reduced to the precision of double.  Tested for
powerpc-nofpu.

* sysdeps/ieee754/ldbl-128ibm/s_asinhl.c (__asinhl): Use fabsl not
fabs.

10 years agoFix ldbl-128ibm acoshl inaccuracy (bug 16384).
Joseph Myers [Thu, 2 Jan 2014 16:33:06 +0000 (16:33 +0000)]
Fix ldbl-128ibm acoshl inaccuracy (bug 16384).

This patch fixes bug 16384, ldbl-128ibm acoshl inaccuracy, which
showed up while attempting to regenerate ulps for powerpc-nofpu for
2.19.  There were two separate problems, use of __log1p instead of
__log1pl and an insufficiently accurate constant value for log 2
(which this patch replaces by use of M_LN2l), each of which could
cause substantial inaccuracy in affected cases.

Tested for powerpc-nofpu.

* sysdeps/ieee754/ldbl-128ibm/e_acoshl.c (ln2): Initialize with
M_LN2l.
(__ieee754_acoshl): Use __log1pl not __log1p.

10 years agoReformat malloc to gnu style.
Ondřej Bílka [Thu, 2 Jan 2014 08:38:18 +0000 (09:38 +0100)]
Reformat malloc to gnu style.

10 years agoFix return code from getent netgroup when the netgroup is not found (bz #16366)
Siddhesh Poyarekar [Thu, 2 Jan 2014 04:35:27 +0000 (10:05 +0530)]
Fix return code from getent netgroup when the netgroup is not found (bz #16366)

nscd incorrectly returns a success even when the netgroup in question
is not found and adds a positive result in the cache.  this patch
fixes this behaviour by adding a negative lookup entry to cache and
returning an error when the netgroup is not found.

10 years agoFix infinite loop in nscd when netgroup is empty (bz #16365)
Siddhesh Poyarekar [Thu, 2 Jan 2014 04:33:12 +0000 (10:03 +0530)]
Fix infinite loop in nscd when netgroup is empty (bz #16365)

Currently, when a user looks up a netgroup that does not have any
members, nscd goes into an infinite loop trying to find members in the
group.  This is because it does not handle cases when getnetgrent
returns an NSS_STATUS_NOTFOUND (which is what it does on empty group).
Fixed to handle this in the same way as NSS_STATUS_RETURN, similar to
what getgrent does by itself.

10 years ago[AArch64] Regenerate libm-test-ulps.
Marcus Shawcroft [Wed, 1 Jan 2014 17:30:01 +0000 (17:30 +0000)]
[AArch64] Regenerate libm-test-ulps.

10 years ago[AArch64] Define ABORT_INSTRUCTION.
Marcus Shawcroft [Wed, 1 Jan 2014 17:28:33 +0000 (17:28 +0000)]
[AArch64] Define ABORT_INSTRUCTION.

10 years ago[AArch64] Pointer mangling support for AArch64.
Venkataramanan Kumar [Wed, 1 Jan 2014 17:47:14 +0000 (17:47 +0000)]
[AArch64] Pointer mangling support for AArch64.

10 years agoRegenerate ARM ulps.
Joseph Myers [Wed, 1 Jan 2014 16:46:17 +0000 (16:46 +0000)]
Regenerate ARM ulps.

10 years agoRegenerate MIPS ulps.
Joseph Myers [Wed, 1 Jan 2014 15:54:30 +0000 (15:54 +0000)]
Regenerate MIPS ulps.

10 years agoRegenerate x86 / x86_64 ulps.
Joseph Myers [Wed, 1 Jan 2014 14:34:38 +0000 (14:34 +0000)]
Regenerate x86 / x86_64 ulps.

10 years agoscripts/update-copyrights: adjust configure input file suffix
Allan McRae [Wed, 1 Jan 2014 12:10:54 +0000 (22:10 +1000)]
scripts/update-copyrights: adjust configure input file suffix

10 years agoUpdate remaining copyright dates
Allan McRae [Wed, 1 Jan 2014 11:45:02 +0000 (21:45 +1000)]
Update remaining copyright dates

Update copyright years that are not handled by scripts/update-copyright.

10 years agoUpdate copyright notices with scripts/update-copyrights
Allan McRae [Wed, 1 Jan 2014 11:03:15 +0000 (21:03 +1000)]
Update copyright notices with scripts/update-copyrights

10 years agoNEWS: mention 16379 as fixed
Mike Frysinger [Tue, 31 Dec 2013 16:22:39 +0000 (11:22 -0500)]
NEWS: mention 16379 as fixed

Reported-by: Joseph S. Myers <joseph@codesourcery.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agotst-fanotify: check for linux/fanotify.h existence
Mike Frysinger [Tue, 31 Dec 2013 08:12:54 +0000 (03:12 -0500)]
tst-fanotify: check for linux/fanotify.h existence

We support older kernels that lack this header, so check for it
before we try to use it.

Reported-by: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agoBenchmark inputs for cos and sin
Siddhesh Poyarekar [Tue, 31 Dec 2013 06:42:45 +0000 (12:12 +0530)]
Benchmark inputs for cos and sin

Add a comprehensive number of inputs for all branches in sin and cos
computation, excluding the fast paths.  This also adds a number of
inputs for the multiple precision slow paths.

10 years agobenchmark inputs for atan
Siddhesh Poyarekar [Tue, 31 Dec 2013 06:41:13 +0000 (12:11 +0530)]
benchmark inputs for atan

Add a more comprehensive set of inputs for the atan function.  I have
also fixed the name on the multiple precision fallback inputs (I
couldn't find any new inputs there) to reflect the fact that the
fallback is only 144bits and not 768bits as I had earlier mentioned.

10 years agobenchmark inputs for tanh and atanh
Siddhesh Poyarekar [Tue, 31 Dec 2013 06:36:30 +0000 (12:06 +0530)]
benchmark inputs for tanh and atanh

10 years agobenchmark inputs for asinh and acosh
Siddhesh Poyarekar [Tue, 31 Dec 2013 06:35:16 +0000 (12:05 +0530)]
benchmark inputs for asinh and acosh

Like sinh and cosh, this patch has benchmark inputs for asinh and
acosh, generated using a random number generator and spread over
significant branches, ignoring the fast return paths.

10 years agobenchmark inputs for sinh and cosh
Siddhesh Poyarekar [Tue, 31 Dec 2013 06:33:43 +0000 (12:03 +0530)]
benchmark inputs for sinh and cosh

Add a full set of inputs for sinh and cosh functions generated using a
random number generator and spreading it over all branches in the
function, ignoring the fast paths (i.e. immediate return for special
values).

10 years agobenchmark inputs for asin and acos
Siddhesh Poyarekar [Tue, 31 Dec 2013 06:31:40 +0000 (12:01 +0530)]
benchmark inputs for asin and acos

Add a comprehensive set of inputs for asin and acos functions,
including the multiple precision fallback path.

10 years agoia64: longjmp_chk: support signal stacks [BZ #16372]
Mike Frysinger [Sun, 29 Dec 2013 21:16:25 +0000 (21:16 +0000)]
ia64: longjmp_chk: support signal stacks [BZ #16372]

The sp check has to be moved up to the start of the func since it now
makes a system call and that'll clobber a lot of registers.

URL: https://sourceware.org/bugzilla/show_bug.cgi?id=16372
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agoia64: setjmp/longjmp: stop saving/restoring fpsr [BZ #16379]
Mike Frysinger [Mon, 30 Dec 2013 09:40:38 +0000 (09:40 +0000)]
ia64: setjmp/longjmp: stop saving/restoring fpsr [BZ #16379]

The new tst-setjmp-fp test has been failing on IA64 because the setjmp
and longjmp helpers take care of saving/restoring the fpsr register.
Per the C standards, this is incorrect, so disable that logic.

URL: https://sourceware.org/bugzilla/show_bug.cgi?id=16379
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agoFix ChangeLog
Ondřej Bílka [Mon, 30 Dec 2013 14:55:37 +0000 (15:55 +0100)]
Fix ChangeLog

10 years agoFix spelling in manual, as in bug 16376
Ville Skytta [Mon, 30 Dec 2013 14:29:35 +0000 (15:29 +0100)]
Fix spelling in manual, as in bug 16376

10 years agoia64: setjmp: use HIDDEN_JUMPTARGET
Mike Frysinger [Mon, 30 Dec 2013 08:43:20 +0000 (08:43 +0000)]
ia64: setjmp: use HIDDEN_JUMPTARGET

Rather than opencode the __GI_xxx logic, use proper hidden helpers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agoia64: syscall: add some helpful documentation
Mike Frysinger [Sun, 29 Dec 2013 21:29:02 +0000 (16:29 -0500)]
ia64: syscall: add some helpful documentation

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agoAdd Solvenian translations for glibc messages.
Carlos O'Donell [Fri, 27 Dec 2013 22:36:14 +0000 (17:36 -0500)]
Add Solvenian translations for glibc messages.

10 years agoignore gdb related files
Mike Frysinger [Fri, 27 Dec 2013 08:32:23 +0000 (03:32 -0500)]
ignore gdb related files

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agoFix typo in csloww()
Allan McRae [Fri, 27 Dec 2013 02:27:46 +0000 (12:27 +1000)]
Fix typo in csloww()

An incorrect variable name was used during the refactoring done in
commit 4aafb73c.

10 years agoAdd lang_name to various locales.
Chris Leonard [Fri, 27 Dec 2013 00:35:18 +0000 (19:35 -0500)]
Add lang_name to various locales.

10 years agoia64: implement futex requeue pi support
Mike Frysinger [Tue, 24 Dec 2013 12:24:04 +0000 (12:24 +0000)]
ia64: implement futex requeue pi support

Used the s390 code as a guideline until all tests pass.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agoia64: add lll_futex_timed_wait_bitset
Mike Frysinger [Tue, 24 Dec 2013 12:23:12 +0000 (12:23 +0000)]
ia64: add lll_futex_timed_wait_bitset

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agoia64: ioperm: clean up long dead code
Mike Frysinger [Tue, 24 Dec 2013 10:33:28 +0000 (05:33 -0500)]
ia64: ioperm: clean up long dead code

This file has a few #if 0 code paths which cause a build time warning:
ports/sysdeps/unix/sysv/linux/ia64/ioperm.c:66:7: warning:
variable 'prot' set but not used [-Wunused-but-set-variable]

Rather than add more #if 0 around that variable, just delete the code
altogether.  Not like it's going to ever be implemented.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agoia64: implement sotruss support
Mike Frysinger [Tue, 24 Dec 2013 08:58:30 +0000 (08:58 +0000)]
ia64: implement sotruss support

Tested with:
$ cat test.c
main(){close(0x1024, 2, 3);}
$ gcc test.c
$ sotruss -e ./a.out
a.out -> libc.so.6.1    : __libc_start_main(0x4000000000000950, 0x1, 0x60000fffffb56bc8)
a.out -> libc.so.6.1    : close(0x1024, 0x2, 0x3)
a.out -> libc.so.6.1    : close - 0xffffffffffffffff

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agoia64: link.h: adjust whitespace
Mike Frysinger [Tue, 24 Dec 2013 08:58:21 +0000 (08:58 +0000)]
ia64: link.h: adjust whitespace

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
10 years agoDefine __CORRECT_ISO_CPP_STRING_H_PROTO correctly for Clang.
Brooks Moses [Thu, 12 Dec 2013 01:46:46 +0000 (17:46 -0800)]
Define __CORRECT_ISO_CPP_STRING_H_PROTO correctly for Clang.

In the string/string.h and string/strings.h headers, we have a couple
of macros that "tell the caller that we provide correct C++
prototypes" according to the comment; they are used to determine
whether to wrap some prototypes in "extern "C++"" (and provide
multiple overloads of them, and some other magic) when __cplusplus is
defined.

The macros are set to check for sufficiently-recent GCC versions (4.4
and later), but this is not the right check for non-GCC compilers.  In
particular, these macros should also be set when using Clang -- if
they are not set, then Clang will be unable to correctly diagnose a
number of subtle bugs that will be errors in GCC compilations.

As per discussion on earlier versions of this patch, rather than
restrict the fix to Clang per se, we assume that all C++ compilers that
claim to fully support C++98 are using a standard-conforming C++
standard library, which seems pretty reasonable.  Clang has been
providing an appropriate value of __cplusplus since May 2012.

10 years agoRestore accidentally deleted bug-fix entries in NEWS.
Maxim Kuvyrkov [Mon, 23 Dec 2013 20:55:03 +0000 (09:55 +1300)]
Restore accidentally deleted bug-fix entries in NEWS.

* NEWS: Restore accidentally deleted bug-fix entries.

10 years agoFix race in free() of fastbin chunk: BZ #15073
Maxim Kuvyrkov [Mon, 23 Dec 2013 20:44:50 +0000 (09:44 +1300)]
Fix race in free() of fastbin chunk: BZ #15073

Perform sanity check only if we have_lock.  Due to lockless nature of fastbins
we need to be careful derefencing pointers to fastbin entries (chunksize(old)
in this case) in multithreaded environments.

The fix is to add have_lock to the if-condition checks.  The rest of the patch
only makes code more readable.

* malloc/malloc.c (_int_free): Perform sanity check only if we
have_lock.

10 years agoAdd Changelog and news entry.
Ondřej Bílka [Mon, 23 Dec 2013 16:58:15 +0000 (17:58 +0100)]
Add Changelog and news entry.

10 years agoClarify that scanf does not use character classes. Fixes bug 12986
Ondřej Bílka [Mon, 23 Dec 2013 16:44:47 +0000 (17:44 +0100)]
Clarify that scanf does not use character classes.  Fixes bug 12986

Update documentation to say that scanf ("%[[:alpha:]]", c) does not read
alphabetic characters but is parsed literarily.

10 years agoUpdate powerpc-fpu ULPs.
Adhemerval Zanella [Mon, 23 Dec 2013 13:40:10 +0000 (08:40 -0500)]
Update powerpc-fpu ULPs.

10 years agoFix ldbl-128 lgammal for small negative arguments (bug 16337).
Joseph Myers [Sun, 22 Dec 2013 20:50:16 +0000 (20:50 +0000)]
Fix ldbl-128 lgammal for small negative arguments (bug 16337).

This patch fixes bug 16337, ldbl-128 lgammal spurious overflows for
small negative arguments (the arguments in question are already in the
testsuite).  The implementation uses the reflection formula to compute
lgamma of negative x from lgamma of -x, effectively resulting in a
calculation -log(x^2) + log(-x); cancellation isn't problematic in
this case (bugs for problematic cancellation in lgamma are 2542, 2543,
2558), but the x^2 calculation can underflow (in which case there is
spurious logic to return an overflowing value - lgamma can only ever
correctly overflow for large positive arguments, though tgamma can
overflow for small arguments of either sign as well as large positive
arguments).  The fix is simply to calculate the result directly with
logl when the argument is a small enough negative number.

Tested mips64.

* sysdeps/ieee754/ldbl-128/e_lgammal_r.c (__ieee754_lgammal_r):
Calculate results for small negative arguments directly rather
than using reflection formula with special underflow handling.

10 years agoFlatten sysdeps/unix/bsd/bsd4.4 into sysdeps/unix/bsd.
Joseph Myers [Sun, 22 Dec 2013 14:49:48 +0000 (14:49 +0000)]
Flatten sysdeps/unix/bsd/bsd4.4 into sysdeps/unix/bsd.

As discussed in
<https://sourceware.org/ml/libc-alpha/2012-04/msg00840.html> and
<https://sourceware.org/ml/libc-alpha/2012-04/msg00989.html>, it seems
appropriate to flatten sysdeps/unix/bsd/bsd4.4 into sysdeps/unix/bsd.

The bulk of the patch is just moving files.  The only other changes
are: update paths in sysdeps/mach/hurd/Implies and
sysdeps/unix/sysv/linux/wait3.c; merge the two syscalls.list files,
with the removal of syscalls that were in
sysdeps/unix/bsd/syscalls.list but overridden in the bsd4.4 directory
by .c files there.

Tested x86_64.  The installed shared libraries are identical before
and after the patch except for libc.so where the move of wait3.c
(included by sysdeps/unix/sysv/linux/wait3.c) affects debug info, but
the disassembly is unchanged.

* sysdeps/mach/hurd/Implies: Change unix/bsd/bsd4.4 to unix/bsd.
* sysdeps/unix/bsd/syscalls.list (chflags): Add entry from
sysdeps/unix/bsd/bsd4.4/syscalls.list.
(fchflags): Likewise.
(revoke): Likewise.
(setlogin): Likewise.
(sigaltstack): Likewise.
(wait4): Likewise.
(sigblock): Remove.
(sigsetmask): Likewise.
(wait3): Likewise.
(waitpid): Likewise.
* sysdeps/unix/bsd/bsd4.4/syscalls.list: Remove file.
* sysdeps/unix/sysv/linux/wait3.c: Update directory of included
file.
* sysdeps/unix/bsd/bsd4.4/Makefile: Move to ...
* sysdeps/unix/bsd/Makefile: ... here.
* sysdeps/unix/bsd/bsd4.4/Versions: Move to ...
* sysdeps/unix/bsd/Versions: ... here.
* sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h: Move to ...
* sysdeps/unix/bsd/bits/sockaddr.h: ... here.
* sysdeps/unix/bsd/bsd4.4/cmsg_nxthdr.c: Move to ...
* sysdeps/unix/bsd/cmsg_nxthdr.c: ... here.
* sysdeps/unix/bsd/bsd4.4/sigblock.c: Move to ...
* sysdeps/unix/bsd/sigblock.c: ... here.
* sysdeps/unix/bsd/bsd4.4/sigsetmask.c: Move to ...
* sysdeps/unix/bsd/sigsetmask.c: ... here.
* sysdeps/unix/bsd/bsd4.4/sigvec.c: Move to ...
* sysdeps/unix/bsd/sigvec.c: ... here.
* sysdeps/unix/bsd/bsd4.4/tcdrain.c: Move to ...
* sysdeps/unix/bsd/tcdrain.c: ... here.
* sysdeps/unix/bsd/bsd4.4/tcgetattr.c: Move to ...
* sysdeps/unix/bsd/tcgetattr.c: ... here.
* sysdeps/unix/bsd/bsd4.4/tcsetattr.c: Move to ...
* sysdeps/unix/bsd/tcsetattr.c: ... here.
* sysdeps/unix/bsd/bsd4.4/wait.c: Move to ...
* sysdeps/unix/bsd/wait.c: ... here.
* sysdeps/unix/bsd/bsd4.4/wait3.c: Move to ...
* sysdeps/unix/bsd/wait3.c: ... here.
* sysdeps/unix/bsd/bsd4.4/waitpid.c: Move to ...
* sysdeps/unix/bsd/waitpid.c: ... here.

10 years agoFix x86 / x86_64 expl / expl10l wild results in directed rounding modes (bug 16356).
Joseph Myers [Sat, 21 Dec 2013 13:07:16 +0000 (13:07 +0000)]
Fix x86 / x86_64 expl / expl10l wild results in directed rounding modes (bug 16356).

This patch fixes bug 16356, bad results from x86 / x86_64 expl /
exp10l in directed rounding modes, the most serious of the bugs shown
up by my patch expanding libm test coverage.  When I fixed bug 16293,
I thought it was only necessary to set round-to-nearest when using
frndint in expm1 functions, because in other cases the cancellation
error from having the resulting fractional part close to 1 or -1 would
not be significant.  However, in expl and exp10l, the way the final
fractional part gets computed (something more complicated than a
simple subtraction, because more precision is needed than you'd get
that way) can result in a value outside the range [-1, 1] when the
argument to frndint was very close to an integer and was rounded the
"wrong" way because of the rounding mode - and the f2xm1 instruction
has undefined results if its argument is outside [-1, 1], so resulting
in the large errors seen.  So this patch removes the USE_AS_EXPM1L
conditionals on the round-to-nearest settings, so all of expl, expm1l
and exp10l now get round-to-nearest used for frndint (meaning the
final fractional part can at most be slightly above 0.5 in
magnitude).  Associated tests of exp and exp10 are added and testing
of exp10 in directed rounding modes enabled.

Tested x86_64 and x86 and ulps updated accordingly.

* sysdeps/i386/fpu/e_expl.S (IEEE754_EXPL): Also set
round-to-nearest for [!USE_AS_EXPM1L].
* sysdeps/x86_64/fpu/e_expl.S (IEEE754_EXPL): Likewise.
* math/auto-libm-test-in: Do not expect cosh tests to fail.  Add
more tests of exp and exp10.  Expect some exp10 tests to miss
exceptions or fail in directed rounding modes.
* math/auto-libm-test-out: Regenerated.
* math/libm-test.inc (exp10_tonearest_test_data): New array.
(exp10_test_tonearest): New function.
(exp10_towardzero_test_data): New array.
(exp10_test_towardzero): New function.
(exp10_downward_test_data): New array.
(exp10_test_downward): New function.
(exp10_upward_test_data): New array.
(exp10_test_upward): New function.
(main): Call the new functions.
* sysdeps/i386/fpu/libm-test-ulps: Update.
* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

10 years agoAdd more libm-test coverage of [a-c]* real functions.
Joseph Myers [Fri, 20 Dec 2013 21:03:39 +0000 (21:03 +0000)]
Add more libm-test coverage of [a-c]* real functions.

Various libm functions have inadequate test coverage in libm-test.inc
/ auto-libm-test-in - failing to cover all the usual special cases
(infinities, NaNs, zero, large and small finite values, subnormals) as
well as a reasonable range of ordinary inputs and, where appropriate,
inputs close to the thresholds for underflow and overflow.

This patch improves test coverage for real functions [a-c]* (with the
expectation of adding more coverage for other functions later).

Tested x86_64 and x86 and ulps updated accordingly (and eight glibc
bugs and one C11 DR filed for issues found in the process).

* math/auto-libm-test-in: Add more tests of acos, acosh, asin,
asinh, atan, atan2, atanh, cbrt, cos and cosh.
* math/auto-libm-test-out: Regenerated.
* math/libm-test.inc (acosh_test_data): Add more tests.
(atanh_test_data): Likewise.
(ceil_test_data): Likewise.
(copysign_test_data): Likewise.
* sysdeps/i386/fpu/libm-test-ulps: Update.
* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

10 years agofix localedata/ChangeLog
Chris Leonard [Fri, 20 Dec 2013 17:12:00 +0000 (12:12 -0500)]
fix localedata/ChangeLog

10 years agoRevert spurious copying of ChangeLog to localedata/ChangeLog.
Joseph Myers [Fri, 20 Dec 2013 16:27:15 +0000 (16:27 +0000)]
Revert spurious copying of ChangeLog to localedata/ChangeLog.

10 years agoAdd lang_name to various locales.
Chris Leonard [Fri, 20 Dec 2013 16:03:15 +0000 (11:03 -0500)]
Add lang_name to various locales.

10 years agoUpdate timezone code from tzcode 2013i.
Joseph Myers [Fri, 20 Dec 2013 13:10:07 +0000 (13:10 +0000)]
Update timezone code from tzcode 2013i.

Now we have Paul's support for version-3 tz files checked in, this
patch updates all the code we take (unmodified) from tzcode to version
2013i (which includes the support for generating version-3 tz files
where necessary).

Tested x86_64.

* timezone/checktab.awk: Update from tzcode 2013i.
* timezone/private.h: Likewise.
* timezone/scheck.c: Likewise.
* timezone/tzfile.h: Likewise.
* timezone/tzselect.ksh: Likewise.
* timezone/zdump.c: Likewise.
* timezone/zic.c: Likewise.

10 years agoMove tests of cpow from libm-test.inc to auto-libm-test-in.
Joseph Myers [Fri, 20 Dec 2013 12:35:10 +0000 (12:35 +0000)]
Move tests of cpow from libm-test.inc to auto-libm-test-in.

This patch moves tests of cpow to auto-libm-test-in, adding the
required support to gen-auto-libm-tests.

Tested x86_64 and x86 and ulps updated accordingly.

* math/auto-libm-test-in: Add tests of cpow.
* math/auto-libm-test-out: Regenerated.
* math/libm-test.inc (cpow_test_data): Use AUTO_TESTS_cc_c.
* * math/gen-auto-libm-tests.c (func_calc_method): Add value
mpc_cc_c.
(func_calc_desc): Add mpc_cc_c union field.
(test_functions): Add cpow.
(special_fill_2pi): New function.
(special_real_inputs): Add 2pi.
(calc_generic_results): Handle mpc_cc_c.
* sysdeps/i386/fpu/libm-test-ulps: Update.
* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

10 years agoMove various TEST_c_c tests from libm-test.inc to auto-libm-test-inc.
Joseph Myers [Fri, 20 Dec 2013 12:32:44 +0000 (12:32 +0000)]
Move various TEST_c_c tests from libm-test.inc to auto-libm-test-inc.

This patch moves tests of ccos, ccosh, cexp, clog, csqrt, ctan and
ctanh to auto-libm-test-in, adding the required support to
gen-auto-libm-tests.  Other TEST_c_c functions aren't moved for now
(although the relevant table entries are put in gen-auto-libm-tests
for it to know how to handle them): clog10 because of a known MPC bug
causing it to hang for at least some pure imaginary inputs (fixed in
SVN, but I'd rather not rely on unreleased versions of MPFR or MPC
even if relying on very recent releases); the inverse trig and
hyperbolic functions because of known slowness in special cases; and
csin / csinh because of observed slowness that I need to investigate
and report to the MPC maintainers.  Slowness can be bypassed by moving
to incremental generation (only for new / changed tests) rather than
regenerating the whole of auto-libm-test-out every time, but that
needs implementing.  (This patch takes the time for running
gen-auto-libm-tests from about one second to seven, on my system,
which I think is reasonable.  The slow functions would make it take
several minutes at least, which seems unreasonable.)

Tested x86_64 and x86 and ulps updated accordingly.

* math/auto-libm-test-in: Add tests of ccos, ccosh, cexp, clog,
csqrt, ctan and ctanh.
* math/auto-libm-test-out: Regenerated.
* math/libm-test.inc (TEST_COND_x86_64): New macro.
(TEST_COND_x86): Likewise.
(ccos_test_data): Use AUTO_TESTS_c_c.
(ccosh_test_data): Likewise.
(cexp_test_data): Likewise.
(clog_test_data): Likewise.
(csqrt_test_data): Likewise.
(ctan_test_data): Likewise.
(ctan_tonearest_test_data): Likewise.
(ctan_towardzero_test_data): Likewise.
(ctan_downward_test_data): Likewise.
(ctan_upward_test_data): Likewise.
(ctanh_test_data): Likewise.
(ctanh_tonearest_test_data): Likewise.
(ctanh_towardzero_test_data): Likewise.
(ctanh_downward_test_data): Likewise.
(ctanh_upward_test_data): Likewise.
* math/gen-auto-libm-tests.c (func_calc_method): Add value
mpc_c_c.
(func_calc_desc): Add mpc_c_c union field.
(FUNC_mpc_c_c): New macro.
(test_functions): Add cacos, cacosh, casin, casinh, catan, catanh,
ccos, ccosh, cexp, clog, clog10, csin, csinh, csqrt, ctan and
ctanh.
(special_fill_min_subnorm_p120): New function.
(special_real_inputs): Add min_subnorm_p120.
(calc_generic_results): Handle mpc_c_c.
* sysdeps/i386/fpu/libm-test-ulps: Update.
* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.

10 years agoConsolidate code to compute sin and cos from lookup tables
Siddhesh Poyarekar [Fri, 20 Dec 2013 10:31:03 +0000 (16:01 +0530)]
Consolidate code to compute sin and cos from lookup tables

This patch consolidates the multiple copies of code that looks up sin
and cos of a number from the lookup table and computes the final
value, into static functions.  This does not have a noticeable
performance impact since the functions are inlined by gcc.

There is further scope for consolidation in the functions but they
cause a more noticable impact on performance (>5%) due to which I have
held back on them.

10 years agoRemove more redundant computations in s_sin.c
Siddhesh Poyarekar [Fri, 20 Dec 2013 10:28:19 +0000 (15:58 +0530)]
Remove more redundant computations in s_sin.c

Removed more redundant computations in the slow paths of the sin and
cos functions.  The notable change is the passing of the most
significant bits of X to the slow functions to check if X is positive
so that just the absolute value of x can be passed and the repeated
ABS() operation is avoided.