public inbox for libc-stable@sourceware.org
 help / color / mirror / Atom feed
* [2.28 COMMITTED 1/3] RISC-V: Fix rounding save/restore bug.
@ 2018-01-01  0:00 Aurelien Jarno
  2018-01-01  0:00 ` [2.28 COMMITTED 2/3] Regen RISC-V rvd ULPs Aurelien Jarno
  2018-01-01  0:00 ` [2.28 COMMITTED 3/3] Improve ChangeLog message Aurelien Jarno
  0 siblings, 2 replies; 3+ messages in thread
From: Aurelien Jarno @ 2018-01-01  0:00 UTC (permalink / raw)
  To: libc-stable; +Cc: DJ Delorie

From: DJ Delorie <dj@redhat.com>

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

(cherry picked from commit bf4181878780be9b53e37a3b0fbabc40cdd07649)
---
 ChangeLog                        | 5 +++++
 sysdeps/riscv/rvf/math_private.h | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index d900e1eba1..b1cba70bc4 100644
--- 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-14  Florian Weimer  <fweimer@redhat.com>
 
 	[BZ #23521]
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
-- 
2.18.0

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

end of thread, other threads:[~2018-08-22 16:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-01  0:00 [2.28 COMMITTED 1/3] RISC-V: Fix rounding save/restore bug Aurelien Jarno
2018-01-01  0:00 ` [2.28 COMMITTED 2/3] Regen RISC-V rvd ULPs Aurelien Jarno
2018-01-01  0:00 ` [2.28 COMMITTED 3/3] Improve ChangeLog message Aurelien Jarno

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