This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Avoid spurious failures from <fenv.h> fallback functions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]