summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2018-08-03 13:43:31 -0400
committerAndreas K. Hüttel <dilfridge@gentoo.org>2018-10-21 17:40:08 +0200
commit02c2854d71e431753983be26e5f3ee847e0dc6c8 (patch)
tree55d98395ca3b81308d485778935bb5319a973807
parentnss_files: Fix file stream leak in aliases lookup [BZ #23521] (diff)
downloadglibc-02c2854d71e431753983be26e5f3ee847e0dc6c8.tar.gz
glibc-02c2854d71e431753983be26e5f3ee847e0dc6c8.tar.bz2
glibc-02c2854d71e431753983be26e5f3ee847e0dc6c8.zip
RISC-V: Fix rounding save/restore bug.
* sysdeps/riscv/rvf/math_private.h (libc_feholdexcept_setround_riscv): Fix rounding save-restore bug. Fixes about a hundred off-by-ULP failures in the math testsuite. (cherry picked from commit bf4181878780be9b53e37a3b0fbabc40cdd07649) (cherry picked from commit b0aa03dfffc20ec7a00db73a3dedecb2130ca6ab)
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/riscv/rvf/math_private.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d900e1eba1..b1cba70bc4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-08-03 DJ Delorie <dj@redhat.com>
+
+ * sysdeps/riscv/rvf/math_private.h (libc_feholdexcept_setround_riscv):
+ Fix rounding save-restore bug.
+
2018-08-14 Florian Weimer <fweimer@redhat.com>
[BZ #23521]
diff --git a/sysdeps/riscv/rvf/math_private.h b/sysdeps/riscv/rvf/math_private.h
index cdb7858fc8..ca587620cb 100644
--- a/sysdeps/riscv/rvf/math_private.h
+++ b/sysdeps/riscv/rvf/math_private.h
@@ -72,8 +72,8 @@ libc_fesetround_riscv (int round)
static __always_inline void
libc_feholdexcept_setround_riscv (fenv_t *envp, int round)
{
- libc_fesetround_riscv (round);
libc_feholdexcept_riscv (envp);
+ libc_fesetround_riscv (round);
}
#define libc_feholdexcept_setround libc_feholdexcept_setround_riscv