This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH], Add PowerPC ISA 3.0 IEEE 128-bit floating point round to odd built-in functions


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.)

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]