[PATCH] Use fabs(f/l) rather than __fabs
Joseph Myers
joseph@codesourcery.com
Fri Sep 29 16:30:00 GMT 2017
On Fri, 29 Sep 2017, Wilco Dijkstra wrote:
> A few math functions still use __fabs(f/l) rather than fabs, which
> means they won't be inlined. Rename them so they are inlined.
> Passes GLIBC tests on AArch64 - no calls to __fabs(f/l).
>
> Note given ldbl-128 and ldbl-128ibm already contain uses of fabsl,
> there is no risk of introducing localplt or namespace issues.
I think you need to add -fno-builtin-fabsl for e_lgammal_r.c, e_log10l.c
and e_log2l.c in sysdeps/powerpc/nofpu/Makefile, for the same reason as
the existing -fno-builtin-fabsl uses there - the built-in fabsl does not
work properly for signed zero for powerpc soft-float / e500v1 (and the
uses of __fabsl being changed are all uses that need to work correctly for
signed zero).
OK with that change.
To be clear, the reason the change is safe regarding namespace issues is
that the particular functions in question don't get called from C90
functions in the case where fabsl might not be inlined (which is only the
powerpc soft-float / e500v1 case where -fno-builtin-fabsl is needed); the
existence of fabsl calls from other functions is not sufficient. There is
code to call ldbl-128ibm expl from pow, but that's not one of the affected
functions and that code doesn't apply for soft-float / e500v1 anyway.
(fabsl is in fact a reserved name in C90, but the linknamespace tests
don't know that.)
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list