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

Unified Diff: src/trusted/validator_arm/generate_decoder.py

Issue 7799013: Intial Thumb2 Sandbox (naclrev 6680) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: asdsa Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: src/trusted/validator_arm/generate_decoder.py
diff --git a/src/trusted/validator_arm/generate_decoder.py b/src/trusted/validator_arm/generate_decoder.py
index df57d0e619a22b1afe6c49f7fca2dfd079ce2100..8ecc93eae1b3b392dfa35159a96a753823edaa7e 100755
--- a/src/trusted/validator_arm/generate_decoder.py
+++ b/src/trusted/validator_arm/generate_decoder.py
@@ -1,35 +1,39 @@
#!/usr/bin/python
#
-# Copyright 2009 The Native Client Authors. All rights reserved.
+# Copyright 2011 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can
# be found in the LICENSE file.
-# Copyright 2009, Google Inc.
+# Copyright 2011, Google Inc.
#
"""Decoder Generator script.
-Usage: generate-decoder.py <table-file> <output-cc-file>
+Usage: generate-decoder.py <arm-table-file> <thumb-table-file> <output-cc-file>
"""
import sys
import dgen_input
import dgen_output
-def main(argv):
- table_filename, output_filename = argv[1], argv[2]
-
- print "Decoder Generator reading ", table_filename
- f = open(table_filename, 'r')
+def get_tables(filename):
+ print "Decoder Generator reading ", filename
+ f = open(filename, 'r')
tables = dgen_input.parse_tables(f)
f.close()
+ print "Successful - got %d tables." % len (tables)
+ return tables
- print "Successful - got %d tables." % len(tables)
+def main(argv):
+ arm_filename, thumb_filename, output_filename = argv[1], argv[2], argv[3]
+ arm_tables = get_tables(arm_filename)
+ thumb_tables = get_tables(thumb_filename)
print "Generating output to %s..." % output_filename
f = open(output_filename, 'w')
- dgen_output.generate_decoder(tables,
+ dgen_output.generate_decoder(arm_tables, thumb_tables,
dgen_output.COutput(f))
f.close()
+
print "Completed."
return 0

Powered by Google App Engine
This is Rietveld 408576698