about summary refs log tree commit diff
path: root/sysdeps/riscv/rvf
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2018-08-03 13:43:31 -0400
committerDJ Delorie <dj@delorie.com>2018-08-03 13:43:31 -0400
commitbf4181878780be9b53e37a3b0fbabc40cdd07649 (patch)
tree8e488fa71699dd6eff9f652254de5d18d35367f9 /sysdeps/riscv/rvf
parentea705eb5ec1cf12525ab5c668e89ca28962978c6 (diff)
downloadglibc-bf4181878780be9b53e37a3b0fbabc40cdd07649.tar.gz
glibc-bf4181878780be9b53e37a3b0fbabc40cdd07649.tar.xz
glibc-bf4181878780be9b53e37a3b0fbabc40cdd07649.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.
Diffstat (limited to 'sysdeps/riscv/rvf')
-rw-r--r--sysdeps/riscv/rvf/math_private.h2
1 files changed, 1 insertions, 1 deletions
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