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: "Wilco Dijkstra" <wdijkstr at arm dot com>
- To: "'Joseph Myers'" <joseph at codesourcery dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Fri, 22 May 2015 17:35:14 +0100
- 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>
> Joseph wrote:
> On Fri, 22 May 2015, Wilco Dijkstra wrote:
>
> > OK, I tried that and it works fine without having to change all the targets if
> > I define __signbit at the end of math.h.
>
> If a target's inline __signbit definitions are completely obsolete with
> this change, they should be removed as part of it. That means at least
> removing sysdeps/tile/bits/mathinline.h, since it only uses
> __builtin_signbit* and GCC versions before 4.0 don't support Tile.
> (ColdFire bits/mathinline.h confuses things by not having a GCC version
> conditional and so potentially using the builtins with GCC versions before
> 4.0 that had ColdFire support. But since 3.4 didn't support
> __builtin_signbit, I think that can be considered a clear bug and so the
> patch should also remove sysdeps/m68k/coldfire/fpu/bits/mathinline.h as
> obsoleted by the generic changes.)
OK, I'll update the patch to remove those.
> > +# if __GNUC_PREREQ (4,0)
> > +# undef __signbitl
>
> 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.
Wilco