[PATCH RFC] allow inline intrinsics for __ieee754_sqrt/f

jon@beniston.com jon@beniston.com
Tue Sep 4 12:48:00 GMT 2018


Hi Wilco,

>Right - I thought your main concern was inlining sqrt instructions since
they are currently not inlined.

It's not just inlining them, but getting them to be used at all. But I don't
want to slow down code for targets that don't support this.

> It wouldn't be slower for targets without sqrt since removing all calls to
__ieee754_sqrt means you can now merge w_sqrt.c and e_sqrt.c.

I look forward to your patch :-) But until all targets are built without
-fno-builtin, I think the patch I posted is the most straight forward way to
support this.

>All the complex errno handling could be simplified too, check how trivial
it is in the new math code, eg. common/sinf.c.

Yes, that's simpler, but it doesn't look to be equivalent to what is
currently implemented nor described in the libm docs (E.g using _LIB_VERSION
to control the way errors are handled and allow matherr to be called). I
don't personally need that extra functionality, but I've got no idea what
other Newlib users might require.

Cheers,
Jon




More information about the Newlib mailing list