Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: src/trusted/validator_mips/dgen/generate_decoder.py

Issue 9979025: [MIPS] Adding validator for MIPS architecture. (Closed) Base URL: http://src.chromium.org/native_client/trunk/src/native_client/
Patch Set: Rebased patch, conflict resolved. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/python
2 #
3 # Copyright 2012 The Native Client Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can
5 # be found in the LICENSE file.
6 # Copyright 2012, Google Inc.
7 #
8
9 """Decoder Generator script.
10
11 Usage: generate-decoder.py <table-file> <output-cc-file>
12 """
13
14 # TODO(petarj): This was copied from the old ARM decoder tablegen.
15 # Once the changes on that tablegen are stable, this will be rewritten to use
16 # the new tablegen.
17
18 import sys
19 import dgen_input
20 import dgen_output
21
22 def main(argv):
23 table_filename, output_filename = argv[1], argv[2]
24
25 print "Decoder Generator reading ", table_filename
26 f = open(table_filename, 'r')
27 tables = dgen_input.parse_tables(f)
28 f.close()
29
30 print "Successful - got %d tables." % len(tables)
31
32 print "Generating output to %s..." % output_filename
33 f = open(output_filename, 'w')
34 dgen_output.generate_decoder(tables,
35 dgen_output.COutput(f))
36 f.close()
37 print "Completed."
38
39 return 0
40
41 if __name__ == '__main__':
42 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « src/trusted/validator_mips/dgen/dgen_output.py ('k') | src/trusted/validator_mips/dgen/optimize-table.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698