1b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#!/usr/bin/env perl
2b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
3b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianno strict 'refs';
4b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianuse warnings;
5b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianuse Getopt::Long;
6b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianGetopt::Long::Configure("auto_help");
7b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
8b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianmy %ALL_FUNCS = ();
9b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianmy @ALL_ARCHS;
10b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianmy @ALL_FORWARD_DECLS;
11b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianmy @REQUIRES;
12b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
13b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianmy %opts = ();
14b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianmy %disabled = ();
15b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianmy %required = ();
16b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
17b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianmy @argv;
18b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianforeach (@ARGV) {
19b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  $disabled{$1} = 1, next if /--disable-(.*)/;
20b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  $required{$1} = 1, next if /--require-(.*)/;
21b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  push @argv, $_;
22b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
23b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
24b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian# NB: use GetOptions() instead of GetOptionsFromArray() for compatibility.
25b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian@ARGV = @argv;
26b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianGetOptions(
27b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  \%opts,
28b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  'arch=s',
29b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  'sym=s',
30b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  'config=s',
31b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian);
32b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
33b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianforeach my $opt (qw/arch config/) {
34b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  if (!defined($opts{$opt})) {
35b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    warn "--$opt is required!\n";
36b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    Getopt::Long::HelpMessage('-exit' => 1);
37b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  }
38b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
39b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
40b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianforeach my $defs_file (@ARGV) {
41b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  if (!-f $defs_file) {
42b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    warn "$defs_file: $!\n";
43b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    Getopt::Long::HelpMessage('-exit' => 1);
44b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  }
45b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
46b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
47b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianopen CONFIG_FILE, $opts{config} or
48b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  die "Error opening config file '$opts{config}': $!\n";
49b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
50b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianmy %config = ();
51b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianwhile (<CONFIG_FILE>) {
52b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  next if !/^CONFIG_/;
53b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  chomp;
54b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  my @pair = split /=/;
55b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  $config{$pair[0]} = $pair[1];
56b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
57b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianclose CONFIG_FILE;
58b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
59b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#
60b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian# Routines for the RTCD DSL to call
61b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#
62b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniansub vpx_config($) {
63b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  return (defined $config{$_[0]}) ? $config{$_[0]} : "";
64b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
65b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
66b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniansub specialize {
67b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  my $fn=$_[0];
68b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  shift;
69b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  foreach my $opt (@_) {
70b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    eval "\$${fn}_${opt}=${fn}_${opt}";
71b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  }
72b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
73b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
74b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniansub add_proto {
75b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  my $fn = splice(@_, -2, 1);
76b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  $ALL_FUNCS{$fn} = \@_;
77b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  specialize $fn, "c";
78b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
79b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
80b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniansub require {
81b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  foreach my $fn (keys %ALL_FUNCS) {
82b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    foreach my $opt (@_) {
83b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      my $ofn = eval "\$${fn}_${opt}";
84b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      next if !$ofn;
85b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
86b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      # if we already have a default, then we can disable it, as we know
87b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      # we can do better.
88b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      my $best = eval "\$${fn}_default";
89b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      if ($best) {
90b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian        my $best_ofn = eval "\$${best}";
91b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian        if ($best_ofn && "$best_ofn" ne "$ofn") {
92b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian          eval "\$${best}_link = 'false'";
93b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian        }
94b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      }
95b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      eval "\$${fn}_default=${fn}_${opt}";
96b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      eval "\$${fn}_${opt}_link='true'";
97b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    }
98b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  }
99b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
100b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
101b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniansub forward_decls {
102b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  push @ALL_FORWARD_DECLS, @_;
103b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
104b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
105b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#
106b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian# Include the user's directives
107b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#
108b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianforeach my $f (@ARGV) {
109b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  open FILE, "<", $f or die "cannot open $f: $!\n";
110b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  my $contents = join('', <FILE>);
111b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  close FILE;
112b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  eval $contents or warn "eval failed: $@\n";
113b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
114b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
115b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#
116b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian# Process the directives according to the command line
117b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#
118b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniansub process_forward_decls() {
119b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  foreach (@ALL_FORWARD_DECLS) {
120b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    $_->();
121b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  }
122b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
123b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
124b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniansub determine_indirection {
125b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  vpx_config("CONFIG_RUNTIME_CPU_DETECT") eq "yes" or &require(@ALL_ARCHS);
126b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  foreach my $fn (keys %ALL_FUNCS) {
127b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    my $n = "";
128b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    my @val = @{$ALL_FUNCS{$fn}};
129b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    my $args = pop @val;
130b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    my $rtyp = "@val";
131b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    my $dfn = eval "\$${fn}_default";
132b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    $dfn = eval "\$${dfn}";
133b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    foreach my $opt (@_) {
134b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      my $ofn = eval "\$${fn}_${opt}";
135b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      next if !$ofn;
136b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      my $link = eval "\$${fn}_${opt}_link";
137b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      next if $link && $link eq "false";
138b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      $n .= "x";
139b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    }
140b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    if ($n eq "x") {
141b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      eval "\$${fn}_indirect = 'false'";
142b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    } else {
143b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      eval "\$${fn}_indirect = 'true'";
144b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    }
145b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  }
146b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
147b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
148b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniansub declare_function_pointers {
149b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  foreach my $fn (sort keys %ALL_FUNCS) {
150b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    my @val = @{$ALL_FUNCS{$fn}};
151b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    my $args = pop @val;
152b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    my $rtyp = "@val";
153b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    my $dfn = eval "\$${fn}_default";
154b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    $dfn = eval "\$${dfn}";
155b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    foreach my $opt (@_) {
156b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      my $ofn = eval "\$${fn}_${opt}";
157b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      next if !$ofn;
158b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      print "$rtyp ${ofn}($args);\n";
159b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    }
160b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    if (eval "\$${fn}_indirect" eq "false") {
161b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      print "#define ${fn} ${dfn}\n";
162b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    } else {
163b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      print "RTCD_EXTERN $rtyp (*${fn})($args);\n";
164b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    }
165b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    print "\n";
166b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  }
167b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
168b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
169b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniansub set_function_pointers {
170b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  foreach my $fn (sort keys %ALL_FUNCS) {
171b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    my @val = @{$ALL_FUNCS{$fn}};
172b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    my $args = pop @val;
173b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    my $rtyp = "@val";
174b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    my $dfn = eval "\$${fn}_default";
175b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    $dfn = eval "\$${dfn}";
176b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    if (eval "\$${fn}_indirect" eq "true") {
177b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      print "    $fn = $dfn;\n";
178b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      foreach my $opt (@_) {
179b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian        my $ofn = eval "\$${fn}_${opt}";
180b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian        next if !$ofn;
181b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian        next if "$ofn" eq "$dfn";
182b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian        my $link = eval "\$${fn}_${opt}_link";
183b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian        next if $link && $link eq "false";
184b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian        my $cond = eval "\$have_${opt}";
185b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian        print "    if (${cond}) $fn = $ofn;\n"
186b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      }
187b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    }
188b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  }
189b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
190b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
191b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniansub filter {
192b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  my @filtered;
193b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  foreach (@_) { push @filtered, $_ unless $disabled{$_}; }
194b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  return @filtered;
195b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
196b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
197b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#
198b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian# Helper functions for generating the arch specific RTCD files
199b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#
200b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniansub common_top() {
201b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  my $include_guard = uc($opts{sym})."_H_";
202b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  print <<EOF;
203b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#ifndef ${include_guard}
204b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#define ${include_guard}
205b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
206b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#ifdef RTCD_C
207b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#define RTCD_EXTERN
208b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#else
209b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#define RTCD_EXTERN extern
210b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#endif
211b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
212b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#ifdef __cplusplus
213b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianextern "C" {
214b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#endif
215b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
216b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianEOF
217b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
218b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianprocess_forward_decls();
219b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianprint "\n";
220b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniandeclare_function_pointers("c", @ALL_ARCHS);
221b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
222b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianprint <<EOF;
223b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianvoid $opts{sym}(void);
224b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
225b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianEOF
226b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
227b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
228b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniansub common_bottom() {
229b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  print <<EOF;
230b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
231b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#ifdef __cplusplus
232b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}  // extern "C"
233b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#endif
234b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
235b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#endif
236b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianEOF
237b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
238b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
239b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniansub x86() {
240b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  determine_indirection("c", @ALL_ARCHS);
241b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
242b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  # Assign the helper variable for each enabled extension
243b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  foreach my $opt (@ALL_ARCHS) {
244b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    my $opt_uc = uc $opt;
245b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    eval "\$have_${opt}=\"flags & HAS_${opt_uc}\"";
246b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  }
247b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
248b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  common_top;
249b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  print <<EOF;
250b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#ifdef RTCD_C
251b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#include "vpx_ports/x86.h"
252b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianstatic void setup_rtcd_internal(void)
253b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian{
254b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    int flags = x86_simd_caps();
255b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
256b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    (void)flags;
257b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
258b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianEOF
259b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
260b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  set_function_pointers("c", @ALL_ARCHS);
261b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
262b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  print <<EOF;
263b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
264b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#endif
265b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianEOF
266b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  common_bottom;
267b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
268b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
269b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniansub arm() {
270b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  determine_indirection("c", @ALL_ARCHS);
271b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
272b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  # Assign the helper variable for each enabled extension
273b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  foreach my $opt (@ALL_ARCHS) {
274b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    my $opt_uc = uc $opt;
275b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    eval "\$have_${opt}=\"flags & HAS_${opt_uc}\"";
276b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  }
277b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
278b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  common_top;
279b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  print <<EOF;
280b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#include "vpx_config.h"
281b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
282b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#ifdef RTCD_C
283b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#include "vpx_ports/arm.h"
284b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianstatic void setup_rtcd_internal(void)
285b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian{
286b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    int flags = arm_cpu_caps();
287b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
288b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    (void)flags;
289b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
290b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianEOF
291b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
292b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  set_function_pointers("c", @ALL_ARCHS);
293b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
294b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  print <<EOF;
295b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
296b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#endif
297b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianEOF
298b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  common_bottom;
299b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
300b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
301b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniansub mips() {
302b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  determine_indirection("c", @ALL_ARCHS);
303b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  common_top;
304b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
305b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  print <<EOF;
306b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#include "vpx_config.h"
307b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
308b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#ifdef RTCD_C
309b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianstatic void setup_rtcd_internal(void)
310b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian{
311b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianEOF
312b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
313b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  set_function_pointers("c", @ALL_ARCHS);
314b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
315b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  print <<EOF;
316b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#if HAVE_DSPR2
317b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#if CONFIG_VP8
318b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianvoid dsputil_static_init();
319b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniandsputil_static_init();
320b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#endif
321b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#if CONFIG_VP9
322b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianvoid vp9_dsputil_static_init();
323b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianvp9_dsputil_static_init();
324b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#endif
325b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#endif
326b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
327b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#endif
328b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianEOF
329b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  common_bottom;
330b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
331b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
332b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramaniansub unoptimized() {
333b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  determine_indirection "c";
334b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  common_top;
335b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  print <<EOF;
336b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#include "vpx_config.h"
337b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
338b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#ifdef RTCD_C
339b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianstatic void setup_rtcd_internal(void)
340b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian{
341b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianEOF
342b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
343b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  set_function_pointers "c";
344b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
345b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  print <<EOF;
346b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
347b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#endif
348b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianEOF
349b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  common_bottom;
350b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
351b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
352b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#
353b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian# Main Driver
354b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian#
355b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
356b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian&require("c");
357b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianif ($opts{arch} eq 'x86') {
358b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  @ALL_ARCHS = filter(qw/mmx sse sse2 sse3 ssse3 sse4_1 avx avx2/);
359b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  x86;
360b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian} elsif ($opts{arch} eq 'x86_64') {
361b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  @ALL_ARCHS = filter(qw/mmx sse sse2 sse3 ssse3 sse4_1 avx avx2/);
362b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  @REQUIRES = filter(keys %required ? keys %required : qw/mmx sse sse2/);
363b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  &require(@REQUIRES);
364b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  x86;
365b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian} elsif ($opts{arch} eq 'mips32') {
366b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  @ALL_ARCHS = filter(qw/mips32/);
367b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  open CONFIG_FILE, $opts{config} or
368b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    die "Error opening config file '$opts{config}': $!\n";
369b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  while (<CONFIG_FILE>) {
370b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    if (/HAVE_DSPR2=yes/) {
371b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      @ALL_ARCHS = filter(qw/mips32 dspr2/);
372b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian      last;
373b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian    }
374b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  }
375b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  close CONFIG_FILE;
376b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  mips;
377b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian} elsif ($opts{arch} eq 'armv5te') {
378b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  @ALL_ARCHS = filter(qw/edsp/);
379b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  arm;
380b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian} elsif ($opts{arch} eq 'armv6') {
381b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  @ALL_ARCHS = filter(qw/edsp media/);
382b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  arm;
383b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian} elsif ($opts{arch} eq 'armv7') {
384b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  @ALL_ARCHS = filter(qw/edsp media neon/);
385b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  arm;
386b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian} else {
387b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  unoptimized;
388b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian}
389b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
390b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian__END__
391b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
392b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian=head1 NAME
393b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
394b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanianrtcd -
395b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
396b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian=head1 SYNOPSIS
397b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
398b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianUsage: rtcd.pl [options] FILE
399b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
400b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianSee 'perldoc rtcd.pl' for more details.
401b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
402b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian=head1 DESCRIPTION
403b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
404b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianReads the Run Time CPU Detections definitions from FILE and generates a
405b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianC header file on stdout.
406b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
407b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian=head1 OPTIONS
408b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian
409b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh VenkatasubramanianOptions:
410b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  --arch=ARCH       Architecture to generate defs for (required)
411b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  --disable-EXT     Disable support for EXT extensions
412b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  --require-EXT     Require support for EXT extensions
413b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  --sym=SYMBOL      Unique symbol to use for RTCD initialization function
414b08e2e23eec181e9951df33cd704ac294c5407b6Vignesh Venkatasubramanian  --config=FILE     File with CONFIG_FOO=yes lines to parse
415