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: Add rounding mode information to math-tests.h and use it in libm-test.inc


On 06/04/2013 09:26 PM, Joseph S. Myers wrote:
The lists of known testsuite failures for ARM and MIPS include various
tests failing in circumstances when rounding modes or exceptions
support is not available at runtime.

In line with the principle of trying to have zero failures as the
expected testsuite state, this patch adds macros to math-tests.h to
say when testing of a rounding mode should be disabled despite
fesetround succeeding, and makes libm-test.inc use them, with
definitions being added for ARM; similar macros will also be needed to
indicate when support for exceptions is available, and the macros will
need using in other tests.  These macros will also be usable for MIPS,
to describe the situation there where MIPS64 long double (IEEE quad)
is implemented in libgcc using soft-fp without support for exceptions
or rounding modes, even when float and double use hardware floating
point.

(fesetround passing but not properly affecting all types is of course
a bug, but one only fixable in libgcc - by using IFUNC there in the
ARM case to make __aeabi_* use VFP when available at runtime, by using
soft-fp instead of fp-bit in the MIPS case.  Disabling the tests here
is similar to the existing handling of sNaN tests; if the GCC issues
are fixed, the math-tests.h definitions can be made conditional on the
GCC version.  Macros indicating when exception support is expected to
be missing will still be relevant even with fixed libgcc.)

Tested on an affected ARM configuration that the non-default
rounding-mode tests from libm-test.inc are no longer run with this
patch applied.

Thanks, this looks fine to me,

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]