OLD | NEW |
1 #!/usr/bin/env perl | 1 #!/usr/bin/env perl |
2 | 2 |
3 no strict 'refs'; | 3 no strict 'refs'; |
4 use warnings; | 4 use warnings; |
5 use Getopt::Long; | 5 use Getopt::Long; |
6 Getopt::Long::Configure("auto_help") if $Getopt::Long::VERSION > 2.32; | 6 Getopt::Long::Configure("auto_help") if $Getopt::Long::VERSION > 2.32; |
7 | 7 |
8 my %ALL_FUNCS = (); | 8 my %ALL_FUNCS = (); |
9 my @ALL_ARCHS; | 9 my @ALL_ARCHS; |
10 my @ALL_FORWARD_DECLS; | 10 my @ALL_FORWARD_DECLS; |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 358 |
359 &require("c"); | 359 &require("c"); |
360 if ($opts{arch} eq 'x86') { | 360 if ($opts{arch} eq 'x86') { |
361 @ALL_ARCHS = filter(qw/mmx sse sse2 sse3 ssse3 sse4_1 avx avx2/); | 361 @ALL_ARCHS = filter(qw/mmx sse sse2 sse3 ssse3 sse4_1 avx avx2/); |
362 x86; | 362 x86; |
363 } elsif ($opts{arch} eq 'x86_64') { | 363 } elsif ($opts{arch} eq 'x86_64') { |
364 @ALL_ARCHS = filter(qw/mmx sse sse2 sse3 ssse3 sse4_1 avx avx2/); | 364 @ALL_ARCHS = filter(qw/mmx sse sse2 sse3 ssse3 sse4_1 avx avx2/); |
365 @REQUIRES = filter(keys %required ? keys %required : qw/mmx sse sse2/); | 365 @REQUIRES = filter(keys %required ? keys %required : qw/mmx sse sse2/); |
366 &require(@REQUIRES); | 366 &require(@REQUIRES); |
367 x86; | 367 x86; |
368 } elsif ($opts{arch} eq 'mips32') { | 368 } elsif ($opts{arch} eq 'mips32' || $opts{arch} eq 'mips64') { |
369 @ALL_ARCHS = filter(qw/mips32/); | 369 @ALL_ARCHS = filter("$opts{arch}"); |
370 open CONFIG_FILE, $opts{config} or | 370 open CONFIG_FILE, $opts{config} or |
371 die "Error opening config file '$opts{config}': $!\n"; | 371 die "Error opening config file '$opts{config}': $!\n"; |
372 while (<CONFIG_FILE>) { | 372 while (<CONFIG_FILE>) { |
373 if (/HAVE_DSPR2=yes/) { | 373 if (/HAVE_DSPR2=yes/) { |
374 @ALL_ARCHS = filter(qw/mips32 dspr2/); | 374 @ALL_ARCHS = filter("$opts{arch}", qw/dspr2/); |
375 last; | 375 last; |
376 } | 376 } |
377 } | 377 } |
378 close CONFIG_FILE; | 378 close CONFIG_FILE; |
379 mips; | 379 mips; |
380 } elsif ($opts{arch} eq 'armv5te') { | 380 } elsif ($opts{arch} eq 'armv5te') { |
381 @ALL_ARCHS = filter(qw/edsp/); | 381 @ALL_ARCHS = filter(qw/edsp/); |
382 arm; | 382 arm; |
383 } elsif ($opts{arch} eq 'armv6') { | 383 } elsif ($opts{arch} eq 'armv6') { |
384 @ALL_ARCHS = filter(qw/edsp media/); | 384 @ALL_ARCHS = filter(qw/edsp media/); |
(...skipping 28 matching lines...) Expand all Loading... |
413 C header file on stdout. | 413 C header file on stdout. |
414 | 414 |
415 =head1 OPTIONS | 415 =head1 OPTIONS |
416 | 416 |
417 Options: | 417 Options: |
418 --arch=ARCH Architecture to generate defs for (required) | 418 --arch=ARCH Architecture to generate defs for (required) |
419 --disable-EXT Disable support for EXT extensions | 419 --disable-EXT Disable support for EXT extensions |
420 --require-EXT Require support for EXT extensions | 420 --require-EXT Require support for EXT extensions |
421 --sym=SYMBOL Unique symbol to use for RTCD initialization function | 421 --sym=SYMBOL Unique symbol to use for RTCD initialization function |
422 --config=FILE File with CONFIG_FOO=yes lines to parse | 422 --config=FILE File with CONFIG_FOO=yes lines to parse |
OLD | NEW |