From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7676 invoked by alias); 14 Sep 2017 14:54:24 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 7527 invoked by uid 89); 14 Sep 2017 14:54:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 14 Sep 2017 14:54:20 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.13.8) with ESMTP id v8EEsH6M020443; Thu, 14 Sep 2017 09:54:17 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id v8EEsE0Y020440; Thu, 14 Sep 2017 09:54:14 -0500 Date: Thu, 14 Sep 2017 14:54:00 -0000 From: Segher Boessenkool To: Michael Meissner , GCC Patches , David Edelsohn , Bill Schmidt Subject: Re: [PATCH], Add support for __builtin_{sqrt,fma}f128 on PowerPC ISA 3.0 Message-ID: <20170914145414.GX8421@gate.crashing.org> References: <20170913214600.GA24598@ibm-tiger.the-meissners.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170913214600.GA24598@ibm-tiger.the-meissners.org> User-Agent: Mutt/1.4.2.3i X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg00909.txt.bz2 On Wed, Sep 13, 2017 at 05:46:00PM -0400, Michael Meissner wrote: > This patch adds support on PowerPC ISA 3.0 for the built-in function > __builtin_sqrtf128 generating the XSSQRTQP hardware square root instruction and > the built-in function __builtin_fmaf128 generating XSMADDQP, XSMSUBQP, > XSNMADDQP, and XSNMSUBQP fused multiply-add instructions. > > While I was at it, I changed the documentation so that it no longer documents > the 'q' built-in functions (to mirror libquadmath) but instead just documented > the 'f128' functions that matches glibc 2.26 and the technical report that > added the _FloatF128 date. > > I changed the tests that used __fabsq to use __fabsf128 instead. > > I also added && lp64 to float128-5.c so that it doesn't cause errors when doing > the test for a 32-bit target. This is due to the fact that if you enable > hardware IEEE 128-bit floating point, you eventually will need TImode > supported, and that is not supported on 32-bit targets. > > I did a bootstrap and make check with subversion id 252033 on a little endian > power8 system. The subversion id 252033 is one of the last svn ids that > bootstrap without additional patches on the PowerPC. There were no regressions > in this patch, and I verified the 4 new tests were run. Can I check this patch > into the trunk? Yes please. A few trivial things: > * doc/extend.texi (RS/6000 built-in functions): Document the > 'f128' IEEE 128-bit floating point built-in functions. Don't > document the older 'q' versions of the functions. Document the > built-in IEEE 128-bit floating point square root and fused > multiply-add built-ins. Dot space space. > +/* 1 argument IEEE 128-bit floating point functions that require ISA 3.0 > + hardware. We define both a 'q' version for libquadmath compatibility, and a > + 'f128' for glibc 2.26. We didn't need this for FABS/COPYSIGN, since the > + machine independent built-in support already defines the F128 versions, */ Dot instead of comma? > --- gcc/testsuite/gcc.target/powerpc/float128-5.c (revision 252730) > +++ gcc/testsuite/gcc.target/powerpc/float128-5.c (working copy) > @@ -1,4 +1,4 @@ > -/* { dg-do compile { target { powerpc*-*-linux* } } } */ > +/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */ Maybe add a comment why this is -m64 only? Thanks, Segher