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 X-Patchwork-Id: 402610 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1724B140082 for ; Fri, 24 Oct 2014 04:35:33 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=nwb PS/9OiJRC1nl3Iv5Lo7JA2DEX8ltwweVaaMejJkPg635ibAoItEbQUGgRw73re9i IxOmrncAqaeVIKo9GmLnN5Wu1xML0v9A1uP74uCzVnIJaArvYbIURD7YmCah7Q1e k6iOSGyRqIBW3m28UHBWAqUDVEZ2FXZcB9riWXto= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=Srwk7eDdw banFovweoJbJm7FZl4=; b=TSLSGGZhZy/sKxiTzPFb6DXB6fm6m6H0aOtShCoSk M/d5BvFfU31drqGhBi9TX3tBFnHtpfGywO6D/wP5Uy14nNwPrIflxbEKCdJAlH6o 5MQvB7ySmqxAd7fLDUAXEoygidGUZwEcH9DjIgCjqTsTdQ7m/gcsqGGtIuJqXjrL Ok= 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)