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 Dijkstra X-Patchwork-Id: 3340 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)