This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.23-391-gbba1419
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 27 May 2016 13:59:59 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.23-391-gbba1419
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 bba14195895fa612a8ef484e9856127a1be4f80f (commit)
from 98c9c9d9ca6c1eb8e30fe449b1e1121b8c498715 (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 -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=bba14195895fa612a8ef484e9856127a1be4f80f
commit bba14195895fa612a8ef484e9856127a1be4f80f
Author: Joseph Myers <joseph@codesourcery.com>
Date: Fri May 27 13:59:24 2016 +0000
Fix ldbl-128ibm ceill, rintl etc. for sNaN arguments (bug 20156).
The ldbl-128ibm implementations of ceill, floorl, roundl, truncl,
rintl and nearbyintl wrongly return an sNaN when given an sNaN
argument. This patch fixes them to add such an argument to itself to
turn it into a quiet NaN. (The code structure means this "else" case
applies to any argument which is zero or not finite; it's OK to do
this in all such cases.)
Tested for powerpc.
[BZ #20156]
* sysdeps/ieee754/ldbl-128ibm/s_ceill.c (__ceill): Add high part
to itself when zero or not finite.
* sysdeps/ieee754/ldbl-128ibm/s_floorl.c (__floorl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_rintl.c (__rintl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_roundl.c (__roundl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_truncl.c (__truncl): Likewise.
diff --git a/ChangeLog b/ChangeLog
index 2516304..1cf86d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2016-05-27 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #20156]
+ * sysdeps/ieee754/ldbl-128ibm/s_ceill.c (__ceill): Add high part
+ to itself when zero or not finite.
+ * sysdeps/ieee754/ldbl-128ibm/s_floorl.c (__floorl): Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/s_rintl.c (__rintl): Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/s_roundl.c (__roundl): Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/s_truncl.c (__truncl): Likewise.
+
2016-05-26 Joseph Myers <joseph@codesourcery.com>
[BZ #20153]
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_ceill.c b/sysdeps/ieee754/ldbl-128ibm/s_ceill.c
index 635fddc..71f5623 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_ceill.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_ceill.c
@@ -52,6 +52,9 @@ __ceill (long double x)
ldbl_canonicalize_int (&xh, &xl);
}
}
+ else
+ /* Quiet signaling NaN arguments. */
+ xh += xh;
return ldbl_pack (xh, xl);
}
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_floorl.c b/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
index a146964..61ac568 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
@@ -52,6 +52,9 @@ __floorl (long double x)
ldbl_canonicalize_int (&xh, &xl);
}
}
+ else
+ /* Quiet signaling NaN arguments. */
+ xh += xh;
return ldbl_pack (xh, xl);
}
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_rintl.c b/sysdeps/ieee754/ldbl-128ibm/s_rintl.c
index e4af01c..f7ff673 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_rintl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_rintl.c
@@ -119,6 +119,9 @@ __rintl (long double x)
fesetround (save_round);
#endif
}
+ else
+ /* Quiet signaling NaN arguments. */
+ xh += xh;
return ldbl_pack (xh, xl);
}
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_roundl.c b/sysdeps/ieee754/ldbl-128ibm/s_roundl.c
index b01510f..2d75eb0 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_roundl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_roundl.c
@@ -77,6 +77,9 @@ __roundl (long double x)
ldbl_canonicalize_int (&xh, &xl);
}
}
+ else
+ /* Quiet signaling NaN arguments. */
+ xh += xh;
return ldbl_pack (xh, xl);
}
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_truncl.c b/sysdeps/ieee754/ldbl-128ibm/s_truncl.c
index b7d4bb5..a2c60a8 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_truncl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_truncl.c
@@ -52,6 +52,9 @@ __truncl (long double x)
ldbl_canonicalize_int (&xh, &xl);
}
}
+ else
+ /* Quiet signaling NaN arguments. */
+ xh += xh;
return ldbl_pack (xh, xl);
}
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 10 ++++++++++
sysdeps/ieee754/ldbl-128ibm/s_ceill.c | 3 +++
sysdeps/ieee754/ldbl-128ibm/s_floorl.c | 3 +++
sysdeps/ieee754/ldbl-128ibm/s_rintl.c | 3 +++
sysdeps/ieee754/ldbl-128ibm/s_roundl.c | 3 +++
sysdeps/ieee754/ldbl-128ibm/s_truncl.c | 3 +++
6 files changed, 25 insertions(+), 0 deletions(-)
hooks/post-receive
--
GNU C Library master sources