public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Joseph Myers <joseph@codesourcery.com>
Cc: 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 PowerPC ISA 3.0 IEEE 128-bit floating point round to odd built-in functions
Date: Mon, 02 Oct 2017 10:46:00 -0000	[thread overview]
Message-ID: <20171002104626.GB8421@gate.crashing.org> (raw)
In-Reply-To: <alpine.DEB.2.20.1709292040530.7702@digraph.polyomino.org.uk>

On Fri, Sep 29, 2017 at 08:42:45PM +0000, Joseph Myers wrote:
> On Fri, 29 Sep 2017, Joseph Myers wrote:
> 
> > On Fri, 29 Sep 2017, Segher Boessenkool wrote:
> > 
> > > How do other ports deal with this?  Insns with a specific rounding mode?
> > > Have a separate unspec for every operation?  Not very nice either :-(
> > 
> > Well, ideally you'd have a machine-independent representation of constant 
> > rounding modes that could be used with the TS 18661-1 FENV_ROUND pragma, 
> > respectively FENV_DEC_ROUND for decimal floating point (as the standard 
> > machine-independent way of accessing such a facility at the C language 
> > level - you'd then need to extend it to handle round-to-odd, but given the 
> > basic facility, accepting additional rounding mode names with it should be 
> > easy).  But I don't know what that would look like in either GIMPLE or 
> > RTL, and I'd certainly expect it to be a large project (quite likely 
> > depending on other large projects to handle dynamic rounding modes 
> > properly through optimizers).  So you probably can't do much better than 
> > lots of unspecs and machine-specific built-in functions at present.
> 
> (But the answer to your question seems to be that AVX512 uses something 
> involving UNSPEC_EMBEDDED_ROUNDING.)

Thanks.

So this seems to be the same as Mike's patch does.  I was hoping for a
nifty trick, not another huge project :-)  Oh well.


Segher

  reply	other threads:[~2017-10-02 10:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28 22:34 Michael Meissner
2017-09-29 17:10 ` Segher Boessenkool
2017-09-29 20:31   ` Joseph Myers
2017-09-29 20:42     ` Joseph Myers
2017-10-02 10:46       ` Segher Boessenkool [this message]
2017-10-02 18:02   ` Michael Meissner
2017-10-02 19:12     ` Segher Boessenkool
2017-10-03 20:15       ` Michael Meissner
2017-10-03 22:21         ` Segher Boessenkool

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=20171002104626.GB8421@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --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).