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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 warn "$defs_file: $!\n"; | 42 warn "$defs_file: $!\n"; |
43 Getopt::Long::HelpMessage('-exit' => 1); | 43 Getopt::Long::HelpMessage('-exit' => 1); |
44 } | 44 } |
45 } | 45 } |
46 | 46 |
47 open CONFIG_FILE, $opts{config} or | 47 open CONFIG_FILE, $opts{config} or |
48 die "Error opening config file '$opts{config}': $!\n"; | 48 die "Error opening config file '$opts{config}': $!\n"; |
49 | 49 |
50 my %config = (); | 50 my %config = (); |
51 while (<CONFIG_FILE>) { | 51 while (<CONFIG_FILE>) { |
52 next if !/^CONFIG_/; | 52 next if !/^(?:CONFIG_|HAVE_)/; |
53 chomp; | 53 chomp; |
54 my @pair = split /=/; | 54 my @pair = split /=/; |
55 $config{$pair[0]} = $pair[1]; | 55 $config{$pair[0]} = $pair[1]; |
56 } | 56 } |
57 close CONFIG_FILE; | 57 close CONFIG_FILE; |
58 | 58 |
59 # | 59 # |
60 # Routines for the RTCD DSL to call | 60 # Routines for the RTCD DSL to call |
61 # | 61 # |
62 sub vpx_config($) { | 62 sub vpx_config($) { |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 print <<EOF; | 202 print <<EOF; |
203 #ifndef ${include_guard} | 203 #ifndef ${include_guard} |
204 #define ${include_guard} | 204 #define ${include_guard} |
205 | 205 |
206 #ifdef RTCD_C | 206 #ifdef RTCD_C |
207 #define RTCD_EXTERN | 207 #define RTCD_EXTERN |
208 #else | 208 #else |
209 #define RTCD_EXTERN extern | 209 #define RTCD_EXTERN extern |
210 #endif | 210 #endif |
211 | 211 |
| 212 EOF |
| 213 |
| 214 process_forward_decls(); |
| 215 print <<EOF; |
| 216 |
212 #ifdef __cplusplus | 217 #ifdef __cplusplus |
213 extern "C" { | 218 extern "C" { |
214 #endif | 219 #endif |
215 | 220 |
216 EOF | 221 EOF |
217 | |
218 process_forward_decls(); | |
219 print "\n"; | |
220 declare_function_pointers("c", @ALL_ARCHS); | 222 declare_function_pointers("c", @ALL_ARCHS); |
221 | 223 |
222 print <<EOF; | 224 print <<EOF; |
223 void $opts{sym}(void); | 225 void $opts{sym}(void); |
224 | 226 |
225 EOF | 227 EOF |
226 } | 228 } |
227 | 229 |
228 sub common_bottom() { | 230 sub common_bottom() { |
229 print <<EOF; | 231 print <<EOF; |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 @ALL_ARCHS = filter(qw/edsp/); | 383 @ALL_ARCHS = filter(qw/edsp/); |
382 arm; | 384 arm; |
383 } elsif ($opts{arch} eq 'armv6') { | 385 } elsif ($opts{arch} eq 'armv6') { |
384 @ALL_ARCHS = filter(qw/edsp media/); | 386 @ALL_ARCHS = filter(qw/edsp media/); |
385 arm; | 387 arm; |
386 } elsif ($opts{arch} eq 'armv7') { | 388 } elsif ($opts{arch} eq 'armv7') { |
387 @ALL_ARCHS = filter(qw/edsp media neon_asm neon/); | 389 @ALL_ARCHS = filter(qw/edsp media neon_asm neon/); |
388 @REQUIRES = filter(keys %required ? keys %required : qw/media/); | 390 @REQUIRES = filter(keys %required ? keys %required : qw/media/); |
389 &require(@REQUIRES); | 391 &require(@REQUIRES); |
390 arm; | 392 arm; |
391 } elsif ($opts{arch} eq 'armv8') { | 393 } elsif ($opts{arch} eq 'armv8' || $opts{arch} eq 'arm64' ) { |
392 @ALL_ARCHS = filter(qw/neon/); | 394 @ALL_ARCHS = filter(qw/neon/); |
393 arm; | 395 arm; |
394 } else { | 396 } else { |
395 unoptimized; | 397 unoptimized; |
396 } | 398 } |
397 | 399 |
398 __END__ | 400 __END__ |
399 | 401 |
400 =head1 NAME | 402 =head1 NAME |
401 | 403 |
(...skipping 11 matching lines...) Expand all Loading... |
413 C header file on stdout. | 415 C header file on stdout. |
414 | 416 |
415 =head1 OPTIONS | 417 =head1 OPTIONS |
416 | 418 |
417 Options: | 419 Options: |
418 --arch=ARCH Architecture to generate defs for (required) | 420 --arch=ARCH Architecture to generate defs for (required) |
419 --disable-EXT Disable support for EXT extensions | 421 --disable-EXT Disable support for EXT extensions |
420 --require-EXT Require support for EXT extensions | 422 --require-EXT Require support for EXT extensions |
421 --sym=SYMBOL Unique symbol to use for RTCD initialization function | 423 --sym=SYMBOL Unique symbol to use for RTCD initialization function |
422 --config=FILE File with CONFIG_FOO=yes lines to parse | 424 --config=FILE File with CONFIG_FOO=yes lines to parse |
OLD | NEW |