This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/20718] [powerpc] copysignl raises "invalid" for sNaN
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 19 Oct 2016 22:59:33 +0000
- Subject: [Bug math/20718] [powerpc] copysignl raises "invalid" for sNaN
- Auto-submitted: auto-generated
- References: <bug-20718-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=20718
--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 05f3ed0a799d08c2b3ecc256fc0dc08d8b9a3784 (commit)
from f8e8b8ed9f266097b42a77359445372d82365916 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=05f3ed0a799d08c2b3ecc256fc0dc08d8b9a3784
commit 05f3ed0a799d08c2b3ecc256fc0dc08d8b9a3784
Author: Joseph Myers <joseph@codesourcery.com>
Date: Wed Oct 19 22:58:34 2016 +0000
Stop powerpc copysignl raising "invalid" for sNaN argument (bug 20718).
The powerpc (hard-float) implementations of copysignl, both 32-bit and
64-bit, raise spurious "invalid" exceptions when the first argument is
a signaling NaN. copysign functions should never raise exceptions
even for signaling NaNs.
The problem is the use of an fcmpu instruction to test the sign of the
high part of the long double argument. This patch fixes the functions
to use fsel instead (as used for fabsl following my fixes for a
similar bug there), or to examine the integer representation for older
32-bit processors without fsel.
Tested for powerpc64 and powerpc32 (configurations with and without
fsel used).
[BZ #20718]
* sysdeps/powerpc/powerpc32/fpu/s_copysignl.S (__copysignl): Do
not use floating-point comparisons to test sign.
* sysdeps/powerpc/powerpc64/fpu/s_copysignl.S (__copysignl):
Likewise.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
sysdeps/powerpc/powerpc32/fpu/s_copysignl.S | 23 ++++++++++++++++++++---
sysdeps/powerpc/powerpc64/fpu/s_copysignl.S | 10 ++++------
3 files changed, 30 insertions(+), 9 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.