This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Avoid spurious failures from <fenv.h> fallback functions
- From: Andreas Jaeger <aj at suse dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org, Thomas Schwinge <thomas at codesourcery dot com>, Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Date: Thu, 20 Jun 2013 13:21:54 +0200
- Subject: Re: Avoid spurious failures from <fenv.h> fallback functions
- References: <Pine dot LNX dot 4 dot 64 dot 1306201045120 dot 4098 at digraph dot polyomino dot org dot uk>
On 06/20/2013 12:48 PM, Joseph S. Myers wrote:
Many of the fallback implementations of various <fenv.h> functions in
math/ indicate failure even when the semantics of the function mean
there is actually nothing to do in the case where exceptions and
rounding modes aren't supported. I've filed bug 15654 for this issue.
This patch changes them to indicate success where semantically
appropriate. This is intended to match what the implementations for
Tile and MicroBlaze do (but covers more functions). However, the
fallback functions still use stub_warning, which seems appropriate
when there isn't substantive support for the underlying
functionality. Tested for MIPS64 soft-float (specifically, this fixes
the stdlib/bug-getcontext failure previously seen in that case).
Kaz, Thomas, note that there is no SH version of fgetexcptflg.c. This
looks like an oversight, given that all the other <fenv.h> functions
have SH implementations. Neither old nor new stub version would
really be correct for SH; there should be a real implementation.
Filed as bug 15655.
Other than for Tile and MicroBlaze (with partial sets of their own
fallback functions) and SH (as noted above), it appears that these
fallback functions are only used as a set (all used together or none
used at all), in cases lacking hardware support for exceptions or
rounding modes.
I'm fine with this approach,
Andreas
--
Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126