public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [committed] RISC-V: Fix rounding save/restore bug.
@ 2018-08-03 17:45 DJ Delorie
  2018-08-03 22:13 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: DJ Delorie @ 2018-08-03 17:45 UTC (permalink / raw)
  To: libc-alpha


* 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.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [committed] RISC-V: Fix rounding save/restore bug.
  2018-08-03 17:45 [committed] RISC-V: Fix rounding save/restore bug DJ Delorie
@ 2018-08-03 22:13 ` Andreas Schwab
  2018-08-03 23:25   ` DJ Delorie
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2018-08-03 22:13 UTC (permalink / raw)
  To: DJ Delorie; +Cc: libc-alpha

On Aug 03 2018, DJ Delorie <dj@redhat.com> wrote:

> * sysdeps/riscv/rvf/math_private.h (libc_feholdexcept_setround_riscv):
> Fix rounding save-restore bug.

  Move libc_fesetround_riscv after libc_feholdexcept_riscv.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [committed] RISC-V: Fix rounding save/restore bug.
  2018-08-03 22:13 ` Andreas Schwab
@ 2018-08-03 23:25   ` DJ Delorie
  0 siblings, 0 replies; 3+ messages in thread
From: DJ Delorie @ 2018-08-03 23:25 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: libc-alpha

Andreas Schwab <schwab@linux-m68k.org> writes:
>   Move libc_fesetround_riscv after libc_feholdexcept_riscv.

Changed.  Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-03 23:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-03 17:45 [committed] RISC-V: Fix rounding save/restore bug DJ Delorie
2018-08-03 22:13 ` Andreas Schwab
2018-08-03 23:25   ` DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).