From patchwork Fri Aug 12 17:50:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 14522 Received: (qmail 131015 invoked by alias); 12 Aug 2016 17:50:56 -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 131003 invoked by uid 89); 12 Aug 2016 17:50:55 -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, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=UD:fesetexcept.c, fesetexcept.c, fesetexceptc, fraiseexcptc X-HELO: relay1.mentorg.com Date: Fri, 12 Aug 2016 17:50:40 +0000 From: Joseph Myers To: "Paul E. Murphy" CC: Subject: Re: [09/12] Add fesetexcept: powerpc In-Reply-To: <6a25427c-38b5-28b7-60ef-5bfa507778c0@linux.vnet.ibm.com> Message-ID: References: <413f44e2-793c-e005-a147-cd0cc5bade5d@linux.vnet.ibm.com> <6a25427c-38b5-28b7-60ef-5bfa507778c0@linux.vnet.ibm.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 On Fri, 12 Aug 2016, Paul E. Murphy wrote: > I don't like the naked constants. I am not faulting the patch for them. > But in trying to understand them, I had to do some digging. A similar > snippet shows up in three places in ppc code. fpu/fraiseexcpt.c > seems to contain the only useful comment. Both clear and succinct. I've added that comment to fsetexcptflg.c and will add it to fesetexcept.c in my patch. 2016-08-12 Joseph Myers * sysdeps/powerpc/fpu/fsetexcptflg.c (__fesetexceptflag): Add comment from fraiseexcpt.c. diff --git a/sysdeps/powerpc/fpu/fsetexcptflg.c b/sysdeps/powerpc/fpu/fsetexcptflg.c index cb440d5..70dd07c 100644 --- a/sysdeps/powerpc/fpu/fsetexcptflg.c +++ b/sysdeps/powerpc/fpu/fsetexcptflg.c @@ -36,6 +36,7 @@ __fesetexceptflag (const fexcept_t *flagp, int excepts) excepts_mask |= FE_ALL_INVALID; n.l = ((u.l & ~excepts_mask) | (flag & FPSCR_STICKY_BITS) + /* Turn FE_INVALID into FE_INVALID_SOFTWARE. */ | (flag >> ((31 - FPSCR_VX) - (31 - FPSCR_VXSOFT)) & FE_INVALID_SOFTWARE));