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

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

Issue 697143002: enable packed double precision 3 operand mem/simd register avx1 instructions. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/trusted/validator_ragel/instruction_definitions/xmm_instructions.def ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2014 The Native Client Authors. All rights reserved. 1 # Copyright (c) 2014 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 """Templates for grouping together similar proofs.""" 5 """Templates for grouping together similar proofs."""
6 6
7 import proof_tools 7 import proof_tools
8 8
9 9
10 def LockedRegWithRegOrMem16bit(mnemonic_name, bitness): 10 def LockedRegWithRegOrMem16bit(mnemonic_name, bitness):
(...skipping 13 matching lines...) Expand all
24 Returns: 24 Returns:
25 All possible disassembly sequences that follow the pattern. 25 All possible disassembly sequences that follow the pattern.
26 """ 26 """
27 assert bitness in (32, 64) 27 assert bitness in (32, 64)
28 instr = proof_tools.MnemonicOp(mnemonic_name) 28 instr = proof_tools.MnemonicOp(mnemonic_name)
29 reg16 = proof_tools.GprOperands(bitness=bitness, operand_size=16) 29 reg16 = proof_tools.GprOperands(bitness=bitness, operand_size=16)
30 mem = proof_tools.AllMemoryOperands(bitness=bitness) 30 mem = proof_tools.AllMemoryOperands(bitness=bitness)
31 lock = proof_tools.LockPrefix() 31 lock = proof_tools.LockPrefix()
32 return (proof_tools.OpsProd(lock, instr, reg16, mem) | 32 return (proof_tools.OpsProd(lock, instr, reg16, mem) |
33 proof_tools.OpsProd(instr, reg16, reg16 | mem)) 33 proof_tools.OpsProd(instr, reg16, reg16 | mem))
34
35
36 def XmmYmmOrMemory3operand(mnemonic_name, bitness):
37 """Set of 3 operand xmm/ymm/memory ops (memory is a possible source operand).
38
39 e.g.
40
41 instr xmm1/mem, xmm2, xmm3
42 or
43 instr ymm1/mem, ymm2, ymm3
44
45 Args:
46 mnemonic_name: the mnemonic we are producing the pattern for.
47 bitness: the bitness of the architecture (32 or 64)
48 Returns:
49 All possible disassembly sequences that follow the pattern.
50 """
51 xmm = proof_tools.AllXMMOperands(bitness)
52 ymm = proof_tools.AllYMMOperands(bitness)
53 mem = proof_tools.AllMemoryOperands(bitness)
54 mnemonic = proof_tools.MnemonicOp(mnemonic_name)
55
56 return (proof_tools.OpsProd(mnemonic, (xmm | mem), xmm, xmm) |
57 proof_tools.OpsProd(mnemonic, (ymm | mem), ymm, ymm))
OLDNEW
« no previous file with comments | « src/trusted/validator_ragel/instruction_definitions/xmm_instructions.def ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698