From aa97dee16e5299bf2b8f7b2d67215361c7c904e2 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 6 Mar 2014 14:11:19 +0000 Subject: Adjust how gen-auto-libm-tests handles before-rounding/after-rounding cases. This patch changes gen-auto-libm-tests so that, when generating test results that depend on whether the architecture has before-rounding or after-rounding tininess detection, the :before-rounding or :after-rounding conditions go on the exception / errno flags generated, rather than generating two separate lines in auto-libm-test-out for e.g. flt-32:before-rounding and flt-32:after-rounding. The rationale for this is as follows. It would be desirable for testing a libm function in all rounding modes to require just one function and array in libm-test.inc, not four (or five), with the array of test data including expected results for all rounding modes rather than separate arrays for each rounding mode that also need to repeat all the test inputs. For gen-libm-test.pl to generate data for such an array from auto-libm-test-out, it would be helpful if each (format, test input) pair has exactly four lines in auto-libm-test-out, one for each rounding mode, rather than some rounding modes having just one line and some having two because the exceptions depend on tininess detection. Tested x86_64 and x86. * math/gen-auto-libm-tests.c: Update comment on output format. (output_for_one_input_case): Generate before-rounding and after-rounding information as conditions on output flags not floating-point format. * math/auto-libm-test-out: Regenerated. * math/gen-libm-test.pl (cond_value): New function. (or_cond_value): Use cond_value. (generate_testfile): Handle conditional exceptions. --- ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index b595d64220..f08052ad9c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2014-03-06 Joseph Myers + + * math/gen-auto-libm-tests.c: Update comment on output format. + (output_for_one_input_case): Generate before-rounding and + after-rounding information as conditions on output flags not + floating-point format. + * math/auto-libm-test-out: Regenerated. + * math/gen-libm-test.pl (cond_value): New function. + (or_cond_value): Use cond_value. + (generate_testfile): Handle conditional exceptions. + 2014-03-05 Joseph Myers * math/libm-test.inc (max_valid_error): New variable. -- cgit 1.4.1