Re: [PATCH] rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2020-09-04 Thread Segher Boessenkool
Hi! On Fri, Sep 04, 2020 at 12:44:17PM -0300, Raoni Fassina Firmino wrote: > > > + switch (INTVAL (operands[1])) > > > +{ > > > +case (1 << (31 - 6)): /* FE_INEXACT */ > > > > I would just write it as 0x02000 etc.? much clearer, and you have > > the comment demagicificating it

Re: [PATCH] rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2020-09-04 Thread Raoni Fassina Firmino via Gcc-patches
Hi, I am about to sent a v2, but thought to reply here as well. On Tue, Aug 18, 2020 at 07:09:21PM -0500, Segher Boessenkool wrote: > Hi! > > On Fri, Aug 14, 2020 at 07:54:23PM -0300, Raoni Fassina Firmino via > Gcc-patches wrote: > > So, this patch adds new rs6000 expand optimizations for

Re: [PATCH] rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2020-08-18 Thread Segher Boessenkool
Hi! On Fri, Aug 14, 2020 at 07:54:23PM -0300, Raoni Fassina Firmino via Gcc-patches wrote: > So, this patch adds new rs6000 expand optimizations for fegetround and > for some calls to feclearexcept and feraiseexcept. All of them C99 > functions from fenv.h And the fenv.h implementation can then

[PATCH] rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2020-08-14 Thread Raoni Fassina Firmino via Gcc-patches
Hi All, I sent an initial RFC of this patch[1] some time ago. I believe it is now in a complete state, with added the test cases for the builtins. The builtin optimizations presented here were originally in glibc, but were removed and suggested that they were a good fit as gcc builtins[2]. So,