From patchwork Thu Oct 23 17:35:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 3345 Received: (qmail 1015 invoked by alias); 23 Oct 2014 17:35:27 -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 1003 invoked by uid 89); 23 Oct 2014 17:35:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com From: "Wilco Dijkstra" To: Subject: [PATCH 8/13] AArch64: Cleanup fenv implementation Date: Thu, 23 Oct 2014 18:35:20 +0100 Message-ID: <001201cfeee7$b7cb8c20$2762a460$@com> MIME-Version: 1.0 X-MC-Unique: 114102318352201101 Call libc_feholdexcept_aarch64 from math_private.h rather than duplicating functionality. ChangeLog: 2014-10-23 Wilco Dijkstra * sysdeps/aarch64/fpu/feholdexcpt.c (feholdexcept): Call libc_feholdexcept_aarch64. --- sysdeps/aarch64/fpu/feholdexcpt.c | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/sysdeps/aarch64/fpu/feholdexcpt.c b/sysdeps/aarch64/fpu/feholdexcpt.c index 5f67a7c..3b898d0 100644 --- a/sysdeps/aarch64/fpu/feholdexcpt.c +++ b/sysdeps/aarch64/fpu/feholdexcpt.c @@ -16,35 +16,12 @@ License along with the GNU C Library; if not, see . */ -#include -#include +#include int feholdexcept (fenv_t *envp) { - fpu_control_t fpcr; - fpu_control_t fpcr_new; - fpu_fpsr_t fpsr; - fpu_fpsr_t fpsr_new; - - _FPU_GETCW (fpcr); - envp->__fpcr = fpcr; - - _FPU_GETFPSR (fpsr); - envp->__fpsr = fpsr; - - /* Now set all exceptions to non-stop. */ - fpcr_new = fpcr & ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT); - - /* And clear all exception flags. */ - fpsr_new = fpsr & ~FE_ALL_EXCEPT; - - if (fpsr != fpsr_new) - _FPU_SETFPSR (fpsr_new); - - if (fpcr != fpcr_new) - _FPU_SETCW (fpcr_new); - + libc_feholdexcept_aarch64 (envp); return 0; } libm_hidden_def (feholdexcept)