#!/usr/bin/perl -w
-# Copyright (C) 1999-2016 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Andreas Jaeger <aj@suse.de>, 1999.
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;
if ($current_arg > 1) {
$comma = ', ';
}
- # FLOAT, int, long int, long long int
- if ($descr[$i] =~ /f|j|i|l|L/) {
+ # FLOAT, long double, int, unsigned int, long int, long long int
+ if ($descr[$i] =~ /f|j|i|u|l|L/) {
$call_args .= $comma . &beautify ($args[$current_arg]);
++$current_arg;
next;
}
+ # Argument passed via pointer.
+ if ($descr[$i] =~ /p/) {
+ next;
+ }
# &FLOAT, &int - simplify call by not showing argument.
if ($descr[$i] =~ /F|I/) {
next;
$num_res = 0;
@descr = split //,$descr_res;
foreach (@descr) {
- if ($_ =~ /f|i|l|L/) {
+ if ($_ =~ /f|i|l|L|M|U/) {
++$num_res;
} elsif ($_ eq 'c') {
$num_res += 2;
} 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.
@descr = split //,$descr_args;
for ($i=0; $i <= $#descr; $i++) {
# FLOAT, int, long int, long long int
- if ($descr[$i] =~ /f|j|i|l|L/) {
+ if ($descr[$i] =~ /f|j|i|u|l|L/) {
if ($descr[$i] eq "f") {
$cline .= ", " . &apply_lit ($args[$current_arg]);
} else {
$current_arg++;
next;
}
- # &FLOAT, &int
- if ($descr[$i] =~ /F|I/) {
+ # &FLOAT, &int, argument passed via pointer
+ if ($descr[$i] =~ /F|I|p/) {
next;
}
# complex
@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;
$cline_res = "";
@special = ();
foreach (@descr) {
- if ($_ =~ /b|f|j|i|l|L/ ) {
+ if ($_ =~ /b|f|j|i|l|L|M|U/ ) {
my ($result) = $args_res[$current_arg];
if ($result eq "IGNORE") {
$ignore_result_any = 1;
$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";