diff options
author | Joseph Myers <joseph@codesourcery.com> | 2017-01-10 00:14:09 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2017-01-10 00:14:09 +0000 |
commit | fbb31e20bc41957c5f3d6550f0178590cf473043 (patch) | |
tree | 3059cca69b7c01b9770cd1240e5a5e6db9128027 /math/gen-libm-test.pl | |
parent | 08f7b95dbdf7ddc25899fe5b521a36db03fe6e2a (diff) | |
download | glibc-fbb31e20bc41957c5f3d6550f0178590cf473043.tar.gz glibc-fbb31e20bc41957c5f3d6550f0178590cf473043.tar.xz glibc-fbb31e20bc41957c5f3d6550f0178590cf473043.zip |
XFAIL libm-test.inc tests as needed for ibm128.
This patch arranges for various libm-test.inc tests to be XFAILed for ibm128-libgcc in non-default rounding modes. The tests are marked with XFAIL_ROUNDING_IBM128_LIBGCC and gen-libm-test.pl is made to transform that to XFAIL_IBM128_LIBGCC or 0 depending on the rounding mode. This should allow test-ldouble, test-ildouble and test-ldouble-finite to pass with unmodified libgcc, given an ulps regeneration. (The case of patched libgcc was already clean up to ulps and possibly hypot cases very close to the overflow threshold that may need more XFAILing; patched libgcc, which should work with TEST_COND_ibm128_libgcc defined to 0 to disable all these XFAILs, does need slightly different ulps from unpatched.) Note that soft-float powerpc will still fail because of <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64811> resulting in spurious "invalid" exceptions in the libgcc code (for hard float, <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58684> hides that bug). Tested for powerpc. * math/libm-test.inc (XFAIL_IBM128_LIBGCC): New macro. (fdim_test_data): Use XFAIL_ROUNDING_IBM128_LIBGCC for some tests. (fma_test_data): Likewise. (hypot_test_data): Likewise. (log1p_test_data): Likewise. (modf_test_data): Likewise. (pow_test_data): Likewise. (remainder_test_data): Likewise. (remquo_test_data): Likewise. (scalb_test_data): Likewise. (scalbn_test_data): Likewise. (scalbln_test_data): Likewise. * math/gen-libm-test.pl (parse_args): Transform XFAIL_ROUNDING_IBM128_LIBGCC to XFAIL_IBM128_LIBGCC or 0 depending on the rounding mode.
Diffstat (limited to 'math/gen-libm-test.pl')
-rwxr-xr-x | math/gen-libm-test.pl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/math/gen-libm-test.pl b/math/gen-libm-test.pl index e200b7fd60..a58194dfd6 100755 --- a/math/gen-libm-test.pl +++ b/math/gen-libm-test.pl @@ -207,6 +207,7 @@ sub parse_args { my (@plus_oflow, @minus_oflow, @plus_uflow, @minus_uflow); my (@errno_plus_oflow, @errno_minus_oflow); my (@errno_plus_uflow, @errno_minus_uflow); + my (@xfail_rounding_ibm128_libgcc); my ($non_finite, $test_snan); ($descr_args, $descr_res) = split /_/,$descr, 2; @@ -272,7 +273,7 @@ sub parse_args { } elsif ($#args_res == $num_res) { # One set of results for all rounding modes, with flags. die ("wrong number of arguments") - unless ($args_res[$#args_res] =~ /EXCEPTION|ERRNO|IGNORE_ZERO_INF_SIGN|TEST_NAN_SIGN|NO_TEST_INLINE|XFAIL_TEST/); + unless ($args_res[$#args_res] =~ /EXCEPTION|ERRNO|IGNORE_ZERO_INF_SIGN|TEST_NAN_SIGN|NO_TEST_INLINE|XFAIL/); @start_rm = ( 0, 0, 0, 0 ); } elsif ($#args_res == 4 * $num_res + 3) { # One set of results per rounding mode, with flags. @@ -320,6 +321,8 @@ sub parse_args { @errno_minus_oflow = qw(ERRNO_ERANGE ERRNO_ERANGE 0 0); @errno_plus_uflow = qw(ERRNO_ERANGE ERRNO_ERANGE ERRNO_ERANGE 0); @errno_minus_uflow = qw(0 ERRNO_ERANGE ERRNO_ERANGE ERRNO_ERANGE); + @xfail_rounding_ibm128_libgcc = qw(XFAIL_IBM128_LIBGCC 0 + XFAIL_IBM128_LIBGCC XFAIL_IBM128_LIBGCC); for ($rm = 0; $rm <= 3; $rm++) { $current_arg = $start_rm[$rm]; $ignore_result_any = 0; @@ -401,6 +404,7 @@ sub parse_args { $cline_res =~ s/ERRNO_MINUS_OFLOW/$errno_minus_oflow[$rm]/g; $cline_res =~ s/ERRNO_PLUS_UFLOW/$errno_plus_uflow[$rm]/g; $cline_res =~ s/ERRNO_MINUS_UFLOW/$errno_minus_uflow[$rm]/g; + $cline_res =~ s/XFAIL_ROUNDING_IBM128_LIBGCC/$xfail_rounding_ibm128_libgcc[$rm]/g; $cline .= ", { $cline_res }"; } print $file " $cline },\n"; |