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

Side by Side Diff: src/trusted/validator_ragel/nacl_unsupported_proof.py

Issue 1234393005: A mechanism to identify/forbid/"rewrite" non-temporal instructions (and other) (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Trivial fix Created 5 years, 4 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
1 # Copyright (c) 2015 The Native Client Authors. All rights reserved. 1 # Copyright (c) 2015 The Native Client Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Proof for enabling jecxz""" 5 """Proof that tries do not change when introducing a new attribute
6 nacl-unsupported in def files."""
6 7
7 import proof_tools 8 import proof_tools
8 from proof_tools import MnemonicOp
9 from proof_tools import OpsProd
10
11
12 def Instructions(bitness):
13 """Returns 32-bit jecxz variants."""
14 if bitness == 32:
15 jecxz = OpsProd(MnemonicOp('jecxz'))
16 return jecxz
17 return set()
18 9
19 10
20 def Validate(trie_diffs, bitness): 11 def Validate(trie_diffs, bitness):
21 """Validates that 32-bit jecxz variants are added."""
22 proof_tools.AssertDiffSetEquals( 12 proof_tools.AssertDiffSetEquals(
23 trie_diffs, 13 trie_diffs,
24 expected_adds=Instructions(bitness), 14 expected_adds=set(),
25 expected_removes=set()) 15 expected_removes=set())
26 16
27
28 if __name__ == '__main__': 17 if __name__ == '__main__':
29 proof_tools.RunProof(proof_tools.ParseStandardOpts(), Validate) 18 proof_tools.RunProof(proof_tools.ParseStandardOpts(), Validate)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698