This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: Add rounding mode information to math-tests.h and use it in libm-test.inc
- From: Andreas Jaeger <aj at suse dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org, libc-ports at sourceware dot org
- Date: Sun, 09 Jun 2013 20:50:56 +0200
- Subject: Re: Add rounding mode information to math-tests.h and use it in libm-test.inc
- References: <Pine dot LNX dot 4 dot 64 dot 1306041924470 dot 10197 at digraph dot polyomino dot org dot uk>
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