From patchwork Thu Oct 23 17:34:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco X-Patchwork-Id: 402605 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 5E335140082 for ; Fri, 24 Oct 2014 04:34:30 +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=KYj FKsLQ5gBYrlgX13ulrVe/wxBdg53c7c1Pate0ZSqJS9sF9YpZfB+CSo8kMEmxRiq 8Su4OuhKRDehXsucNKnObh25E+UDt/MS1Q8cnyudQOMsXr6g3mJHE6csr1SFYHaU Ex4yTrDQKnnATLGugo14PlOuuf75ggRAV5Zs3Qms= 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=/afuma5yX RbHB13w3kiS7kFgGdg=; b=m/2e1Cxv3kWYC6gxVqbyhgOYEkDhRmhhNO6e9JBg0 ExNTcr8Q5ibh1brMlQ4Kx07c03WdynwsSS43Qicj+is5kgyxe325DClErgVOylPw XJIiVqEDiGuhnQAThMVw4UtQBpJ4Ks2rpJQhDgYqRi0hTPOd5/aUhJsgFg79FRnY cI= Received: (qmail 28839 invoked by alias); 23 Oct 2014 17:34:24 -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 28826 invoked by uid 89); 23 Oct 2014 17:34:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 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 3/13] AArch64: Cleanup fenv implementation Date: Thu, 23 Oct 2014 18:34:17 +0100 Message-ID: <000d01cfeee7$927ee700$b77cb500$@com> MIME-Version: 1.0 X-MC-Unique: 114102318342000201 Cleanup fesetexceptflag to use the same logic as the ARM version. No functional changes. ChangeLog: 2014-10-23 Wilco Dijkstra * sysdeps/aarch64/fpu/fsetexcptflg.c (fsetexceptflag): Cleanup logic. --- sysdeps/aarch64/fpu/fsetexcptflg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sysdeps/aarch64/fpu/fsetexcptflg.c b/sysdeps/aarch64/fpu/fsetexcptflg.c index 316fbd6..77e6cae 100644 --- a/sysdeps/aarch64/fpu/fsetexcptflg.c +++ b/sysdeps/aarch64/fpu/fsetexcptflg.c @@ -27,10 +27,11 @@ fesetexceptflag (const fexcept_t *flagp, int excepts) /* Get the current environment. */ _FPU_GETFPSR (fpsr); + excepts &= FE_ALL_EXCEPT; /* Set the desired exception mask. */ - fpsr_new = fpsr & ~(excepts & FE_ALL_EXCEPT); - fpsr_new |= (*flagp & excepts & FE_ALL_EXCEPT); + fpsr_new = fpsr & ~excepts; + fpsr_new |= *flagp & excepts; /* Save state back to the FPU. */ if (fpsr != fpsr_new)