From 262112840ca3807d2e5c7227a476be88be5740a7 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 26 May 2016 16:38:04 +0000 Subject: Support sNaN testing in libm-test.inc. This patch adds support in libm-test.inc for tests with signaling NaN arguments. gen-libm-test.pl is made to set a flag TEST_SNAN for such tests, so that they can be disabled automatically when sNaN testing isn't supported for a given type (at present, for float and double on 32-bit x86 because it's unpredictable when a value might be loaded into a floating-point register and so automatically converted to long double with sNaNs converted to quiet NaNs). -fsignaling-nans is used where needed. Tests are added for classification macros, as a starting point; this is deliberately more conservative than Thomas's patch , to allow more tests to be added, and issues exposed fixed, bit by bit. Tested for x86_64 and x86. * math/libm-test.inc: Update comment about NaN testing. (TEST_SNAN): New macro. (snan_value): Likewise. (enable_test): Disable tests of sNaNs when SNAN_TESTS fails. (fpclassify_test_data): Add sNaN tests. (isfinite_test_data): Likewise. (isinf_test_data): Likewise. (isnan_test_data): Likewise. (isnormal_test_data): Likewise. (issignaling_test_data): Likewise. (signbit_test_data): Likewise. * math/gen-libm-test.pl (%beautify): Add snan_value. (show_exceptions): Add argument $test_snan. (parse_args): Handle snan_value as non-finite. Update call to show_exceptions. * math/Makefile (libm-test-no-inline-cflags): Add -fsignaling-nans. --- ChangeLog | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index ecedf6f..1c8023b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2016-05-26 Joseph Myers + + * math/libm-test.inc: Update comment about NaN testing. + (TEST_SNAN): New macro. + (snan_value): Likewise. + (enable_test): Disable tests of sNaNs when SNAN_TESTS fails. + (fpclassify_test_data): Add sNaN tests. + (isfinite_test_data): Likewise. + (isinf_test_data): Likewise. + (isnan_test_data): Likewise. + (isnormal_test_data): Likewise. + (issignaling_test_data): Likewise. + (signbit_test_data): Likewise. + * math/gen-libm-test.pl (%beautify): Add snan_value. + (show_exceptions): Add argument $test_snan. + (parse_args): Handle snan_value as non-finite. Update call to + show_exceptions. + * math/Makefile (libm-test-no-inline-cflags): Add + -fsignaling-nans. + 2016-05-26 Adhemerval Zanella * nptl/Makefile (CFLAGS-oldrecvfrom.c): Remove rule. -- cgit v1.1