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.
This commit is contained in:
DJ Delorie 2018-08-03 13:43:31 -04:00 committed by DJ Delorie
parent ea705eb5ec
commit bf41818787
2 changed files with 6 additions and 1 deletions

View File

@ -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 ';'

View 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