Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 * Returns a new RegisterList that contains the union of two lists. | 132 * Returns a new RegisterList that contains the union of two lists. |
| 133 * | 133 * |
| 134 * This is not a member function to allow implicit conversion of Register. | 134 * This is not a member function to allow implicit conversion of Register. |
| 135 */ | 135 */ |
| 136 inline const RegisterList operator+(const RegisterList, const RegisterList); | 136 inline const RegisterList operator+(const RegisterList, const RegisterList); |
| 137 | 137 |
| 138 /* | 138 /* |
| 139 * A list containing every possible register, even some we don't define. | 139 * A list containing every possible register, even some we don't define. |
| 140 * Used exclusively as a bogus scary return value for forbidden instructions. | 140 * Used exclusively as a bogus scary return value for forbidden instructions. |
| 141 */ | 141 */ |
| 142 static const RegisterList kRegisterListEverything = RegisterList(-1); | 142 static const RegisterList kRegisterListEverything = RegisterList(-1); |
|
Karl
2011/08/30 19:53:52
Why are we passing a NEGATIVE number into a uint_t
| |
| 143 | 143 |
| 144 /* | |
| 145 * A register list which contains no registers. | |
| 146 */ | |
| 147 static const RegisterList kRegisterListNothing = RegisterList(0); | |
| 144 | 148 |
| 145 /* | 149 /* |
| 146 * A 32-bit ARM instruction of unspecified type. | 150 * A 32-bit ARM instruction of unspecified type. |
| 147 * | 151 * |
| 148 * This class is designed for efficiency: | 152 * This class is designed for efficiency: |
| 149 * - Its public methods for bitfield extraction are short and inline. | 153 * - 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 | 154 * - It has no vtable, so on 32-bit platforms it's exactly the size of the |
| 151 * instruction it models. | 155 * instruction it models. |
| 152 */ | 156 */ |
| 153 class Instruction { | 157 class Instruction { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 201 private: | 205 private: |
| 202 uint32_t _bits; | 206 uint32_t _bits; |
| 203 }; | 207 }; |
| 204 | 208 |
| 205 } // namespace | 209 } // namespace |
| 206 | 210 |
| 207 // Definitions for our inlined functions. | 211 // Definitions for our inlined functions. |
| 208 #include "native_client/src/trusted/validator_arm/model-inl.h" | 212 #include "native_client/src/trusted/validator_arm/model-inl.h" |
| 209 | 213 |
| 210 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_MODEL_H | 214 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_ARM_V2_MODEL_H |
| OLD | NEW |