From patchwork Fri May 23 15:48:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 1103 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (peon2454.g.dreamhost.com [208.113.200.127]) by wilcox.dreamhost.com (Postfix) with ESMTP id 7A208360073 for ; Fri, 23 May 2014 09:05:48 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14307373) id E8BCC1B28039; Fri, 23 May 2014 08:49:02 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx21.g.dreamhost.com 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 homiemail-mx21.g.dreamhost.com (Postfix) with ESMTPS id C32631AECE2E for ; Fri, 23 May 2014 08:49:01 -0700 (PDT) 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; q=dns; s=default; b=p8S75/5cKdonBxyaz5CQGl/DK1+4K WOeSP4RMggvchQCdsCLGWHazQAJv4Z/GWqNFad9EbcXv4XTm/WX/t7e9Fxcb6SD5 rk4xUi3r1I6PCO5gm2GN+wQlXDOXX9ccly8kTvTKXNeJfQ0k34FgpRGivm+A0ZLK ZegKpFs8zaHMyI= 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; s=default; bh=ukmlx4fw4VjLbKLRAtK01zaYKSo=; b=xW8 0IFPtMALq00oxn2QXYoec44Xsylch7IMAQTbto88zdTNr8/P0LBJAuYxgb69DJEM homTmsDffKDKHgmyLkEPDBDwd/gAgY27Ch+BxYvGCukyNw3wMu7rrqrsr6zo3D0A Q2jsfs/8F2jYEVbOFmy+A2/RrFaZPZNGF/f+3+LY= Received: (qmail 15303 invoked by alias); 23 May 2014 15:48:59 -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 15292 invoked by uid 89); 23 May 2014 15:48:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com From: "Wilco" To: Subject: [PATCH 1/2] Aarch64: Cleanup math_private.h Date: Fri, 23 May 2014 16:48:44 +0100 Message-ID: <001101cf769e$7abcaf10$70360d30$@com> MIME-Version: 1.0 X-MC-Unique: 114052316485214001 X-DH-Original-To: glibc@patchwork.siddhesh.in Hi, This is a series of patches to cleanup the aarch64 fenv implementation. Fix declarations in math_private.h to use fpu_fpsr_t correctly, and use one line per declaration. Ok for commit? Wilco ChangeLog: 2014-05-23 Wilco * sysdeps/aarch64/fpu/math_private.h (libc_feholdexcept_aarch64) (libc_feholdexcept_setround_aarch64) (libc_fetestexcept_aarch64) (libc_fesetenv_aarch64) (libc_feupdateenv_test_aarch64) (libc_feholdsetround_aarch64) (libc_feresetround_aarch64) (libc_feholdsetround_aarch64_ctx): Fix declarations. --- sysdeps/aarch64/fpu/math_private.h | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/sysdeps/aarch64/fpu/math_private.h b/sysdeps/aarch64/fpu/math_private.h index 7424952..a3f466b 100644 --- a/sysdeps/aarch64/fpu/math_private.h +++ b/sysdeps/aarch64/fpu/math_private.h @@ -25,7 +25,10 @@ static __always_inline void libc_feholdexcept_aarch64 (fenv_t *envp) { - fpu_control_t fpcr, new_fpcr, fpsr, new_fpsr; + fpu_control_t fpcr; + fpu_control_t new_fpcr; + fpu_fpsr_t fpsr; + fpu_fpsr_t new_fpsr; _FPU_GETCW (fpcr); _FPU_GETFPSR (fpsr); @@ -69,7 +72,10 @@ libc_fesetround_aarch64 (int round) static __always_inline void libc_feholdexcept_setround_aarch64 (fenv_t *envp, int round) { - fpu_control_t fpcr, new_fpcr, fpsr, new_fpsr; + fpu_control_t fpcr; + fpu_control_t new_fpcr; + fpu_fpsr_t fpsr; + fpu_fpsr_t new_fpsr; _FPU_GETCW (fpcr); _FPU_GETFPSR (fpsr); @@ -96,7 +102,7 @@ libc_feholdexcept_setround_aarch64 (fenv_t *envp, int round) static __always_inline int libc_fetestexcept_aarch64 (int ex) { - fpu_control_t fpsr; + fpu_fpsr_t fpsr; _FPU_GETFPSR (fpsr); return fpsr & ex & FE_ALL_EXCEPT; @@ -109,7 +115,8 @@ libc_fetestexcept_aarch64 (int ex) static __always_inline void libc_fesetenv_aarch64 (const fenv_t *envp) { - fpu_control_t fpcr, new_fpcr; + fpu_control_t fpcr; + fpu_control_t new_fpcr; _FPU_GETCW (fpcr); new_fpcr = envp->__fpcr; @@ -130,7 +137,10 @@ libc_fesetenv_aarch64 (const fenv_t *envp) static __always_inline int libc_feupdateenv_test_aarch64 (const fenv_t *envp, int ex) { - fpu_control_t fpcr, new_fpcr, fpsr, new_fpsr; + fpu_control_t fpcr; + fpu_control_t new_fpcr; + fpu_fpsr_t fpsr; + fpu_fpsr_t new_fpsr; int excepts; _FPU_GETCW (fpcr); @@ -171,7 +181,8 @@ libc_feupdateenv_aarch64 (const fenv_t *envp) static __always_inline void libc_feholdsetround_aarch64 (fenv_t *envp, int round) { - fpu_control_t fpcr, fpsr; + fpu_control_t fpcr; + fpu_fpsr_t fpsr; _FPU_GETCW (fpcr); _FPU_GETFPSR (fpsr); @@ -193,7 +204,8 @@ libc_feholdsetround_aarch64 (fenv_t *envp, int round) static __always_inline void libc_feresetround_aarch64 (fenv_t *envp) { - fpu_control_t fpcr, round; + fpu_control_t fpcr; + int round; _FPU_GETCW (fpcr); @@ -215,7 +227,9 @@ libc_feresetround_aarch64 (fenv_t *envp) static __always_inline void libc_feholdsetround_aarch64_ctx (struct rm_ctx *ctx, int r) { - fpu_control_t fpcr, fpsr, round; + fpu_control_t fpcr; + fpu_fpsr_t fpsr; + int round; _FPU_GETCW (fpcr); _FPU_GETFPSR (fpsr);