This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: soft-fp: Adjust call to abort for kernel use [committed]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Rich Felker <dalias at libc dot org>
- Cc: <libc-alpha at sourceware dot org>
- Date: Fri, 20 Feb 2015 19:00:36 +0000
- Subject: Re: soft-fp: Adjust call to abort for kernel use [committed]
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1502201807380 dot 30214 at digraph dot polyomino dot org dot uk> <20150220184614 dot GW23507 at brightrain dot aerifal dot cx>
On Fri, 20 Feb 2015, Rich Felker wrote:
> Could these be replaced by __builtin_trap() or similar? I'm not clear
> on whether this code is purely glibc+kernel or also used by gcc, but
> if it's used by gcc too it would be very much preferable not to have
> libgcc pulling in a reference to abort (this affects -ffreestanding,
> etc.).
This code is used by libgcc as well. The particular case in this patch is
one that could become a call to a nonexistent __softfp_link_failure or
similar. The ones that may sometimes end up as abort calls could be
__builtin_unreachable. There is never a need for an actual abort.
(Actually the aborts from _FP_CLS_COMBINE switches seem to get optimized
out by current GCC anyway - I don't see them in the TFmode functions in
libgcc from a recent x86_64 build, for example; looking at some old
powerpc libraries I have to hand, I see them from GCC 4.3 but not 4.4.
The ones in those switches are the only ones needing more than simple
constant folding to optimize away.)
--
Joseph S. Myers
joseph@codesourcery.com