This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
RE: [PATCH][AArch64] Add inlines for signbit (v2)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Wilco Dijkstra <wdijkstr at arm dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Fri, 22 May 2015 17:06:51 +0000
- Subject: RE: [PATCH][AArch64] Add inlines for signbit (v2)
- Authentication-results: sourceware.org; auth=none
- References: <000001d07775$77c71880$67554980$ at com> <alpine dot DEB dot 2 dot 10 dot 1504241724020 dot 30193 at digraph dot polyomino dot org dot uk> <000001d080d7$830485a0$890d90e0$ at com> <alpine dot DEB dot 2 dot 10 dot 1504271707220 dot 17788 at digraph dot polyomino dot org dot uk> <000801d0947e$3af04780$b0d0d680$ at com> <alpine dot DEB dot 2 dot 10 dot 1505221423190 dot 16611 at digraph dot polyomino dot org dot uk> <000901d094ad$4799f6f0$d6cde4d0$ at com>
On Fri, 22 May 2015, Wilco Dijkstra wrote:
> > Why the #undef? I don't see any headers with macro definitions of
> > __signbitl that need to be removed in math.h.
>
> Unless nldbl support is dead we need it as
> sysdeps/ldbl-opt/nldbl-signbit.c does:
>
> #define __signbitl __signbitl_XXX
> #include "nldbl-compat.h"
>
> nldbl-compat.h includes math/math.h, which would define __signbitl
> again. I couldn't force nldbl to build but replacing
> sysdeps/ieee754/ldbl-128/s_signbitl.c with nldlb-signbit.c confirmed the
> #undef fixes the issue.
Thanks - I was only looking in headers for a #define. I think the nldbl
code is for linking -mlong-double-64 objects with libm, although I'm not
aware of any documentation for it. Having a #undef in an installed header
that's only relevant for building glibc seems unfortunate. Maybe it would
be cleaner to (a) convert all glibc-internal calls to __signbit* into
calls to the signbit macro (which should make no difference to the code
generated at all), then (b) conditionally change the definition of the
signbit macro to use __builtin_signbit*, rather than ever defining
__signbit* as macros.
--
Joseph S. Myers
joseph@codesourcery.com