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

Side by Side Diff: src/trusted/validator_arm/model.h

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, 2 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2009 The Native Client Authors. All rights reserved. 2 * Copyright 2011 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can 3 * Use of this source code is governed by a BSD-style license that can
4 * be found in the LICENSE file. 4 * be found in the LICENSE file.
5 * Copyright 2009, Google Inc. 5 * Copyright 2011, Google Inc.
6 */ 6 */
7 7
8 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_MODEL_H 8 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_MODEL_H
9 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_MODEL_H 9 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_MODEL_H
10 10
11 /* 11 /*
12 * Models instructions and decode results. 12 * Models instructions and decode results.
13 * 13 *
14 * Implementation Note: 14 * Implementation Note:
15 * All the classes in this file are designed to be fully inlined as 32-bit 15 * All the classes in this file are designed to be fully inlined as 32-bit
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 /* 97 /*
98 * Produces a RegisterList containing a single register. 98 * Produces a RegisterList containing a single register.
99 * 99 *
100 * Note that this is an implicit constructor. This is okay in this case 100 * Note that this is an implicit constructor. This is okay in this case
101 * because 101 * because
102 * - It converts between two types that we control, 102 * - It converts between two types that we control,
103 * - It converts at most one step (no implicit conversions to Register), 103 * - It converts at most one step (no implicit conversions to Register),
104 * - It inlines to a single machine instruction, 104 * - It inlines to a single machine instruction,
105 * - The readability gain in inst_classes.cc is large. 105 * - The readability gain in inst_classes.cc is large.
106 */ 106 */
107 /* @IGNORE_LINES_FOR_CODE_HYGIENE[2] */
107 inline RegisterList(const Register r); 108 inline RegisterList(const Register r);
108 109
109 /* 110 /*
110 * Checks whether this list contains the given register. 111 * Checks whether this list contains the given register.
111 */ 112 */
112 inline bool operator[](const Register) const; 113 inline bool operator[](const Register) const;
113 114
114 // Checks whether this list contains all the registers in the operand. 115 // Checks whether this list contains all the registers in the operand.
115 inline bool contains_all(RegisterList) const; 116 inline bool contains_all(RegisterList) const;
116 117
(...skipping 17 matching lines...) Expand all
134 * This is not a member function to allow implicit conversion of Register. 135 * This is not a member function to allow implicit conversion of Register.
135 */ 136 */
136 inline const RegisterList operator+(const RegisterList, const RegisterList); 137 inline const RegisterList operator+(const RegisterList, const RegisterList);
137 138
138 /* 139 /*
139 * A list containing every possible register, even some we don't define. 140 * A list containing every possible register, even some we don't define.
140 * Used exclusively as a bogus scary return value for forbidden instructions. 141 * Used exclusively as a bogus scary return value for forbidden instructions.
141 */ 142 */
142 static const RegisterList kRegisterListEverything = RegisterList(-1); 143 static const RegisterList kRegisterListEverything = RegisterList(-1);
143 144
145 /*
146 * A register list which contains no registers.
147 */
148 static const RegisterList kRegisterListNothing = RegisterList(0);
144 149
145 /* 150 /*
146 * A 32-bit ARM instruction of unspecified type. 151 * A 32-bit ARM instruction of unspecified type.
147 * 152 *
148 * This class is designed for efficiency: 153 * This class is designed for efficiency:
149 * - Its public methods for bitfield extraction are short and inline. 154 * - Its public methods for bitfield extraction are short and inline.
150 * - It has no vtable, so on 32-bit platforms it's exactly the size of the 155 * - It has no vtable, so on 32-bit platforms it's exactly the size of the
151 * instruction it models. 156 * instruction it models.
152 */ 157 */
153 class Instruction { 158 class Instruction {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 private: 206 private:
202 uint32_t _bits; 207 uint32_t _bits;
203 }; 208 };
204 209
205 } // namespace 210 } // namespace
206 211
207 // Definitions for our inlined functions. 212 // Definitions for our inlined functions.
208 #include "native_client/src/trusted/validator_arm/model-inl.h" 213 #include "native_client/src/trusted/validator_arm/model-inl.h"
209 214
210 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_MODEL_H 215 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_MODEL_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698