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: [PATCH RFC] allow inline intrinsics for __ieee754_sqrt/f


Hi Wilco,

> You can replace all calls to it by sqrt, except for w_sqrt.c and  wf_sqrt.c

While -fno-builtin is still being used, this would just make the code slower though.

> Or in the generic one call the builtin rather than __ieee754_sqrt based on a define.

I looked at doing this, as the builtin seems nicer than inline asm, but the builtin for GCC (not clang) also calls sqrt for negative numbers unless -fno-math-errno is used. 

Unfortunately, if this option is used as a function attribute, then it prevents the function from being inlined and the automake documentation suggests you can't do per file options. 

> But none of this will improve performance or codesize.

Sure it does in my use case, otherwise I wouldn't be bothering 😉

Cheers,
Jon



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