This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Use fabs(f/l) rather than __fabs
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, nd <nd at arm dot com>
- Date: Fri, 29 Sep 2017 16:30:36 +0000
- Subject: Re: [PATCH] Use fabs(f/l) rather than __fabs
- Authentication-results: sourceware.org; auth=none
- References: <DB6PR0801MB2053B16BF79A3E6ECD6D7359837E0@DB6PR0801MB2053.eurprd08.prod.outlook.com>
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