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

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

Issue 10949006: Change table data_processing_immediate to use the new notation. Also (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 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
« no previous file with comments | « src/trusted/validator_arm/dgen_input.py ('k') | src/trusted/validator_arm/gen/arm32_decode.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/validator_arm/dgen_test_output.py
===================================================================
--- src/trusted/validator_arm/dgen_test_output.py (revision 9791)
+++ src/trusted/validator_arm/dgen_test_output.py (working copy)
@@ -183,13 +183,6 @@
BASE_BASE_TESTER='%(decoder_base)sTester%(qualifier)s'
DECODER_TESTER='%(baseline)sTester_%(test_case)s'
-def _negated_constraint(constraint):
- """Returns the negated pattern for the pattern text passed in."""
- if constraint[0] == '~':
- return constraint[1:]
- else:
- return '~' + constraint
-
def _safety_to_check(safety):
return [s for s in safety if not isinstance(s, str)]
@@ -831,7 +824,6 @@
constraint_rows_map = values.get('constraint_rows')
if constraint_rows_map:
base_row = _filter_test_row(row, with_rules=False)
- base_index = constraint_rows_map[dgen_core.neutral_repr(base_row)]
values['base_test_case'] = (
'Case%s' % constraint_rows_map[dgen_core.neutral_repr(base_row)])
else:
@@ -921,10 +913,7 @@
out.write(PATTERN_CONSTRAINT_RESTRICTIONS_HEADER)
for c in action.constraints().restrictions:
out.write(CONSTRAINT_CHECK %
- dgen_core.BitPattern.parse(
- _negated_constraint(c),
- dgen_core.BitField('constraint', 31, 0))
- .to_commented_bool())
+ c.negate().to_commented_bool())
out.write(CONSTRAINT_TESTER_CLASS_FOOTER % values)
if safety_to_check:
out.write(SAFETY_TESTER_HEADER % values)
@@ -979,9 +968,9 @@
number of compares to find the index, speeding up code
generation.
"""
- map = {}
+ lookup_map = {}
index = 0
for v in values:
- map[dgen_core.neutral_repr(v)] = index
+ lookup_map[dgen_core.neutral_repr(v)] = index
index += 1
return map
« no previous file with comments | « src/trusted/validator_arm/dgen_input.py ('k') | src/trusted/validator_arm/gen/arm32_decode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698