[PATCH v6] rtl: builtins: (not just) rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

Segher Boessenkool segher@kernel.crashing.org
Wed Nov 24 21:32:59 GMT 2021

On Wed, Nov 24, 2021 at 05:22:57PM -0300, Raoni Fassina Firmino wrote:
> Hi Joseph,
> Thanks for the detailed review and explanations.

>From me as well :-)

> On Mon, Oct 18, 2021 at 03:54:53PM +0000, Joseph Myers wrote:
> > However, it's better to get things right automatically without needing any 
> > macros or other header additions at all.  That is, define feclearexcept as 
> > a built-in function, *without* the extra arguments, and with the back end 
> > knowing about the FE_* values for the target libc.  Then you can simply 
> > avoid expanding the function inline when the back end doesn't know both 
> > the FE_* values and how to use them.
> I took this part to heart, I agree that an approach in molds of the v5
> sounds more like it, something that will "just works" or fallback
> gracefully. And who knew, with your insight I think I find just
> the thing, I am finishing a v7 and I hope it address the previews
> consernings and sidestep all this complications with the v6 aproach.

What you will lose this way is that it will not work on any C library
that doesn't have explicit support.  Which is a shame, but it seems we
cannot avoid this.  Especially the "fesetround should be a function, not
a macro" argument is a showstopper :-/



More information about the Gcc-patches mailing list