Hi Wilco,
>>>You could add more libm/machine/*/w_sqrt.c files.
>>>These already exist for arm and aarch64 - though they use inline
>>>assembler rather than the obvious __builtin_sqrt.
>>
>> They don't get inlined like that though. So the idea is to move them
>> from there, in to the header, to allow them to be inlined, saving the
>> call overhead in sqrt().
>
>Sqrt always gets inlined if you have a sqrt instruction.
The code calls __builtin_sqrt, not sqrt. It's that I want to inline. If you
change to call sqrt, you'll potentially get recursion.
>>>Note that the sqrt function will never be called if you have a sqrt
>>>instruction (even if you forget to use -fno-math-errno),
>> It will be from application code.
>No, try it. Sqrt instructions always get inlined.
On the <0 path, GCC still calls sqrt in order to set errno.
Regards,
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.