diff options
Diffstat (limited to 'manual/libm-err-tab.pl')
-rwxr-xr-x | manual/libm-err-tab.pl | 40 |
1 files changed, 10 insertions, 30 deletions
diff --git a/manual/libm-err-tab.pl b/manual/libm-err-tab.pl index 18b8ca9..3ea62c5 100755 --- a/manual/libm-err-tab.pl +++ b/manual/libm-err-tab.pl @@ -48,20 +48,7 @@ use vars qw (%results @all_floats %suffices @all_functions); ); # Pretty description of platform -%pplatforms = - ( "i386/fpu" => "ix86", - "generic" => "Generic", - "alpha/fpu" => "Alpha", - "ia64/fpu" => "IA64", - "m68k/fpu" => "M68k", - "mips/fpu" => "MIPS", - "powerpc/fpu" => "PowerPC", - "sparc/sparc32/fpu" => "Sparc 32-bit", - "sparc/sparc64/fpu" => "Sparc 64-bit", - "sh/sh4/fpu" => "SH4", - "s390/fpu" => "S/390", - "arm" => "ARM" - ); +%pplatforms = (); @all_functions = ( "acos", "acosh", "asin", "asinh", "atan", "atanh", @@ -99,6 +86,13 @@ sub find_files { if ($_ eq 'libm-test-ulps') { # print "Parsing $File::Find::name\n"; push @platforms, $File::Find::dir; + my ($file, $name); + $file = "${File::Find::name}-name"; + open NAME, $file or die ("Can't open $file: $!"); + $name = <NAME>; + chomp $name; + close NAME; + $pplatforms{$File::Find::dir} = $name; &parse_ulps ($File::Find::name, $File::Find::dir); } } @@ -161,15 +155,6 @@ sub get_value { ? $results{$fct}{$platform}{$type}{$float} : "0"); } -sub canonicalize_platform { - my ($platform) = @_; - - $platform =~ s|^(.*/sysdeps/)||; - - - return exists $pplatforms{$platform} ? $pplatforms{$platform} : $platform; -} - sub print_platforms { my (@p) = @_; my ($fct, $platform, $float, $first, $i, $platform_no, $platform_total); @@ -183,7 +168,7 @@ sub print_platforms { print '@item Function '; foreach (@p) { print ' @tab '; - print &canonicalize_platform ($_); + print $pplatforms{$_}; } print "\n"; @@ -226,10 +211,5 @@ sub print_all { } sub by_platforms { - my ($pa, $pb); - - $pa = $pplatforms{$a} ? $pplatforms{$a} : $a; - $pb = $pplatforms{$b} ? $pplatforms{$b} : $b; - - return $pa cmp $pb; + return $pplatforms{$a} cmp $pplatforms{$b}; } |