From patchwork Fri Aug 3 17:45:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 28752 Received: (qmail 125003 invoked by alias); 3 Aug 2018 17:45:49 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 124987 invoked by uid 89); 3 Aug 2018 17:45:48 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:727, hundred X-HELO: mx1.redhat.com Date: Fri, 03 Aug 2018 13:45:45 -0400 Message-Id: From: DJ Delorie To: libc-alpha@sourceware.org Subject: [committed] 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. 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