This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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: libm -fno-builtin


Jon Beniston wrote:

> This causes a problem for sqrtl when _LDBL_EQ_DBL is defined. The call to
> sqrt is replaced with a sqrt instruction, so errno will not be set.

Yes that's another example which needs to use -fno-builtin(-sqrt) in the makefile.

> I can't see many improvements in the code otherwise (there's a few changes
> in scheduling) - but perhaps that is target specific.

It enables inlining of functions like lround, lrint and sqrt, and yes it only helps targets
which have inlines for those. Compilers can also do more optimization since math
functions become pure if errno is no longer assumed to be live after each call.
I've got a patch in review to change the default behaviour of GCC, so fixing any failing
cases now is good future proofing.

Wilco

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