diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-05-19 14:45:41 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-05-19 14:45:41 +0000 |
commit | db62a9075305963281572cb990d1c766948bae7b (patch) | |
tree | 4e0917803301441db899bb45a674c7fefb280a0e /math/gen-libm-test.pl | |
parent | f16cc3eb810be5419aa2fc07d6e05f93624df9ce (diff) | |
download | glibc-db62a9075305963281572cb990d1c766948bae7b.tar glibc-db62a9075305963281572cb990d1c766948bae7b.tar.gz glibc-db62a9075305963281572cb990d1c766948bae7b.tar.bz2 glibc-db62a9075305963281572cb990d1c766948bae7b.zip |
Handle sincos with generic libm-test logic.
Diffstat (limited to 'math/gen-libm-test.pl')
-rwxr-xr-x | math/gen-libm-test.pl | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/math/gen-libm-test.pl b/math/gen-libm-test.pl index e9f7f9bbe2..c50e27d44a 100755 --- a/math/gen-libm-test.pl +++ b/math/gen-libm-test.pl @@ -156,33 +156,6 @@ sub show_exceptions { } } -# Treat some functions especially. -# Currently only sincos needs extra treatment. -sub special_functions { - my ($file, $args) = @_; - my (@args, $str, $test, $cline); - - @args = split /,\s*/, $args; - - unless ($args[0] =~ /sincos/) { - die ("Don't know how to handle $args[0] extra."); - } - $cline = " { $args[1]"; - - $str = 'sincos (' . &beautify ($args[1]) . ', &sin_res, &cos_res)'; - # handle sin - $test = $str . ' puts ' . &beautify ($args[2]) . ' in sin_res'; - - $cline .= ", \"$test\", $args[2]"; - - # handle cos - $test = $str . ' puts ' . &beautify ($args[3]) . ' in cos_res'; - $cline .= ", \"$test\", $args[3]"; - $cline .= show_exceptions ($args[4]); - $cline .= " },\n"; - print $file $cline; -} - # Parse the arguments to TEST_x_y sub parse_args { my ($file, $descr, $fct, $args) = @_; @@ -191,10 +164,6 @@ sub parse_args { my (@special); my ($call); - if ($descr eq 'extra') { - &special_functions ($file, $args); - return; - } ($descr_args, $descr_res) = split /_/,$descr, 2; @args = split /,\s*/, $args; @@ -284,15 +253,14 @@ sub parse_args { next; } } - $cline .= ", "; @descr = split //,$descr_res; foreach (@descr) { if ($_ =~ /b|f|i|l|L/ ) { - $cline .= $args[$current_arg]; + $cline .= ", $args[$current_arg]"; $current_arg++; } elsif ($_ eq 'c') { - $cline .= "$args[$current_arg], $args[$current_arg+1]"; + $cline .= ", $args[$current_arg], $args[$current_arg+1]"; $current_arg += 2; } elsif ($_ eq '1') { push @special, $args[$current_arg]; |