From bf4181878780be9b53e37a3b0fbabc40cdd07649 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Fri, 3 Aug 2018 13:43:31 -0400 Subject: 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. --- sysdeps/riscv/rvf/math_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdeps') 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 -- cgit v1.2.3-70-g09d2