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,

>> Not all targets have a sqrt instruction though.

>Like I said, it's not really important to optimize this case, but we could
have machine
>/*/w_sqrt.c or a new define like TARGET_HAS_SQRT. There is already
math_config.h 
>where such a define could be added.

I'm confused about what you are talking about now.

I was referring to your suggestion that all calls throughout libm to
__ieee754_sqrt() should be replaced with calls to sqrt() as you think gcc
can optimise it. While this may work for targets with a h/w sqrt
instruction, this will be slower for targets that do not have a sqrt
instruction, as you'll end up with the extra overhead and error handling
code in w_sqrt.c being executed, no? 

Cheers,
Jon





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