public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Meissner <meissner@linux.vnet.ibm.com>
To: Michael Meissner <meissner@linux.vnet.ibm.com>,
	       GCC Patches <gcc-patches@gcc.gnu.org>,
	       Segher Boessenkool <segher@kernel.crashing.org>,
	       David Edelsohn <dje.gcc@gmail.com>,
	       Bill Schmidt <wschmidt@linux.vnet.ibm.com>
Subject: Ping: [PATCH], Add rounding built-ins to the _Float<N> and _Float<N>X built-in functions
Date: Thu, 09 Nov 2017 07:28:00 -0000	[thread overview]
Message-ID: <20171109000305.GA2975@ibm-tiger.the-meissners.org> (raw)
In-Reply-To: <20171027223921.GA29559@ibm-tiger.the-meissners.org>

I suspect this patch got lost among the FMA patches at the same time.  This
patch enables the rounding functions.  Segher has already approved the rs6000
bits.

https://gcc.gnu.org/ml/gcc-patches/2017-10/msg02124.html

On Fri, Oct 27, 2017 at 06:39:21PM -0400, Michael Meissner wrote:
> The power9 (running PowerPC ISA 3.0) has a round to integer instruction
> (XSRQPI) that does various flavors of round an IEEE 128-bit floating point to
> integeral values.  This patch adds the support to the machine independent
> portion of the compiler, and adds the necessary support for ceilf128,
> roundf128, truncf128, and roundf128 to the PowerPC backend when you use
> -mcpu=power9.
> 
> I have done bootstrap builds on both x86-64 and a little endian power8 system.
> Can I install these patches to the trunk?
> 
> [gcc]
> 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
> 
> 	* builtins.def: (_Float<N> and _Float<N>X BUILT_IN_CEIL): Add
> 	_Float<N> and _Float<N>X variants for rounding built-in
> 	functions.
> 	(_Float<N> and _Float<N>X BUILT_IN_FLOOR): Likewise.
> 	(_Float<N> and _Float<N>X BUILT_IN_NEARBYINT): Likewise.
> 	(_Float<N> and _Float<N>X BUILT_IN_RINT): Likewise.
> 	(_Float<N> and _Float<N>X BUILT_IN_ROUND): Likewise.
> 	(_Float<N> and _Float<N>X BUILT_IN_TRUNC): Likewise.
> 	* builtins.c (mathfn_built_in_2): Likewise.
> 	* internal-fn.def (CEIL): Likewise.
> 	(FLOOR): Likewise.
> 	(NEARBYINT): Likewise.
> 	(RINT): Likewise.
> 	(ROUND): Likewise.
> 	(TRUNC): Likewise.
> 	* fold-const.c (tree_call_nonnegative_warnv_p): Likewise.
> 	(integer_valued_real_call_p): Likewise.
> 	* fold-const-call.c (fold_const_call_ss): Likewise.
> 	* config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
> 	128-bit round to integer instructions.
> 	(ceil<mode>2): Likewise.
> 	(btrunc<mode>2): Likewise.
> 	(round<mode>2): Likewise.
> 
> [gcc/c]
> 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
> 
> 	* c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
> 	and _Float<N>X built-in functions.
> 
> [gcc/testsuite]
> 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
> 
> 	* gcc.target/powerpc/float128-hw2.c: Add tests for ceilf128,
> 	floorf128, truncf128, and roundf128.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797

  parent reply	other threads:[~2017-11-09  0:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-28  1:11 Michael Meissner
2017-11-01 18:32 ` Segher Boessenkool
2017-11-01 20:02   ` Michael Meissner
2017-11-09  7:28 ` Michael Meissner [this message]
2017-12-11 21:20 ` Ping ^2 " 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=20171109000305.GA2975@ibm-tiger.the-meissners.org \
    --to=meissner@linux.vnet.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=segher@kernel.crashing.org \
    --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).