RE: [PATCH RFC] allow inline intrinsics for __ieee754_sqrt/f

<[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.