public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Michael Meissner <meissner@linux.vnet.ibm.com>,
	       GCC Patches <gcc-patches@gcc.gnu.org>,
	       David Edelsohn <dje.gcc@gmail.com>,
	       Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Subject: Re: [PATCH], Add support for __builtin_{sqrt,fma}f128 on PowerPC ISA 3.0
Date: Thu, 14 Sep 2017 14:54:00 -0000	[thread overview]
Message-ID: <20170914145414.GX8421@gate.crashing.org> (raw)
In-Reply-To: <20170913214600.GA24598@ibm-tiger.the-meissners.org>

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

  parent reply	other threads:[~2017-09-14 14:54 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 21:46 Michael Meissner
2017-09-13 22:49 ` Joseph Myers
2017-09-14 19:02   ` Michael Meissner
2017-10-19 22:15   ` [PATCH, version 2], Add support for _Float<N> and _Float<N>X sqrt, fma, fmin, fmax built-in functions Michael Meissner
2017-10-19 23:00     ` Joseph Myers
2017-10-19 23:00       ` Michael Meissner
2017-10-19 23:08         ` Joseph Myers
2017-10-24 22:40       ` [PATCH, version 3], " Michael Meissner
2017-10-24 23:13         ` Joseph Myers
2017-10-24 23:58           ` Michael Meissner
2017-10-25 19:25           ` [PATCH, version 4], " Michael Meissner
2017-10-25 20:01             ` Michael Meissner
2017-10-25 20:11             ` Joseph Myers
2017-10-25 20:31               ` Michael Meissner
2017-10-25 20:50                 ` Joseph Myers
2017-10-25 23:37                   ` [PATCH, version 5], " Michael Meissner
2017-10-25 23:56                     ` Joseph Myers
2017-10-26  0:04                       ` [PATCH, version 5a], " Michael Meissner
2017-10-26  0:17                         ` Michael Meissner
2017-10-30 16:29                           ` Joseph Myers
2017-10-30 18:05                             ` Michael Meissner
2017-10-30 18:38                               ` Joseph Myers
2017-10-30 23:06                                 ` Michael Meissner
2017-10-30 23:29                                   ` Michael Meissner
2017-10-30 23:35                                   ` Joseph Myers
2017-10-30 23:48                                     ` Michael Meissner
2017-10-31 18:04                                     ` Michael Meissner
2017-10-31 18:26                                       ` Joseph Myers
2017-10-27  2:27                         ` Segher Boessenkool
2017-09-14 14:54 ` Segher Boessenkool [this message]
2017-09-14 22:21   ` [PATCH], Add support for __builtin_{sqrt,fma}f128 on PowerPC ISA 3.0 Michael Meissner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170914145414.GX8421@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=meissner@linux.vnet.ibm.com \
    --cc=wschmidt@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).