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

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
Index: src/trusted/validator_arm/dgen_test_output.py
===================================================================
--- src/trusted/validator_arm/dgen_test_output.py (revision 9758)
+++ 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)]
@@ -921,10 +914,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)

Powered by Google App Engine
This is Rietveld 408576698