From 0af797def371ceb4f05586d7bcd25841653d2082 Mon Sep 17 00:00:00 2001 From: Chris Metcalf Date: Thu, 17 May 2012 08:49:19 -0400 Subject: math: support platforms with limited FP rounding or exception support For some tests, just claim that fetestexcept() always returns true, so the rest of the test can be compiled. For libm-test, provide known bogus values for unsupported rounding modes, so fesetround() will return failure. Elsewhere, just add some #ifdefs to avoid code that uses particular FP exceptions if the exceptions aren't supported. --- math/bug-nextafter.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'math/bug-nextafter.c') diff --git a/math/bug-nextafter.c b/math/bug-nextafter.c index 1d21841ea6..558b158391 100644 --- a/math/bug-nextafter.c +++ b/math/bug-nextafter.c @@ -4,6 +4,12 @@ #include #include +#if !defined(FE_OVERFLOW) && !defined(FE_UNDERFLOW) +/* If there's no support for the exceptions this test is checking, + then just return success and allow the test to be compiled. */ +# define fetestexcept(e) 1 +#endif + float zero = 0.0; float inf = INFINITY; -- cgit v1.2.1