]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
RISC-V: Fix rounding save/restore bug.
authorDJ Delorie <dj@redhat.com>
Fri, 3 Aug 2018 17:43:31 +0000 (13:43 -0400)
committerDJ Delorie <dj@delorie.com>
Fri, 3 Aug 2018 17:43:31 +0000 (13:43 -0400)
* 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.

ChangeLog
sysdeps/riscv/rvf/math_private.h

index cd894ed11af71dce9cb14bb80965793ac3e56ec6..51ae26ae7853bcc8511e70be7e8ce642d9e53e0c 100644 (file)
--- 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-03  Joseph Myers  <joseph@codesourcery.com>
 
        * math/libm-test-ilogb.inc (ilogb_test_data): Use ',' not ';'
index cdb7858fc8ce9a129bde4918e44b1dfb5cb91d3d..ca587620cb36bb1b519ea49da428853e9a466c4f 100644 (file)
@@ -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