| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright 2012 The Native Client Authors.  All rights reserved. | 2  * Copyright (c) 2012 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 be | 
| 4  * be found in the LICENSE file. | 4  * found in the LICENSE file. | 
| 5  * Copyright 2012, Google Inc. |  | 
| 6  */ | 5  */ | 
| 7 | 6 | 
| 8 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H | 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H | 
| 9 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H | 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H | 
| 10 | 9 | 
| 11 /* | 10 /* | 
| 12  * Models instructions and decode results. | 11  * Models instructions and decode results. | 
| 13  * | 12  * | 
| 14  * TODO(petarj): This file and the classes have been based on the same named | 13  * TODO(petarj): This file and the classes have been based on the same named | 
| 15  * module within validator_arm folder. The code has been reduced and changed | 14  * module within validator_arm folder. The code has been reduced and changed | 
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 71   /* | 70   /* | 
| 72    * Produces a RegisterList containing a single register. | 71    * Produces a RegisterList containing a single register. | 
| 73    * | 72    * | 
| 74    * Note that this is an implicit constructor.  This is okay in this case | 73    * Note that this is an implicit constructor.  This is okay in this case | 
| 75    * because | 74    * because | 
| 76    *  - It converts between two types that we control, | 75    *  - It converts between two types that we control, | 
| 77    *  - It converts at most one step (no implicit conversions to Register), | 76    *  - It converts at most one step (no implicit conversions to Register), | 
| 78    *  - It inlines to a single machine instruction, | 77    *  - It inlines to a single machine instruction, | 
| 79    *  - The readability gain in inst_classes.cc is large. | 78    *  - The readability gain in inst_classes.cc is large. | 
| 80    */ | 79    */ | 
| 81   inline RegisterList(const Register r); | 80   explicit inline RegisterList(const Register r); | 
| 82 | 81 | 
| 83   /* | 82   /* | 
| 84    * Checks whether this list contains the given register. | 83    * Checks whether this list contains the given register. | 
| 85    */ | 84    */ | 
| 86   inline bool operator[](const Register) const; | 85   inline bool operator[](const Register) const; | 
| 87 | 86 | 
| 88   // Checks whether this list contains all the registers in the operand. | 87   // Checks whether this list contains all the registers in the operand. | 
| 89   inline bool ContainsAll(RegisterList) const; | 88   inline bool ContainsAll(RegisterList) const; | 
| 90 | 89 | 
| 91   // Checks whether this list contains any of the registers in the operand. | 90   // Checks whether this list contains any of the registers in the operand. | 
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 146   inline uint32_t operator&(uint32_t) const; | 145   inline uint32_t operator&(uint32_t) const; | 
| 147 | 146 | 
| 148  private: | 147  private: | 
| 149   uint32_t _bits; | 148   uint32_t _bits; | 
| 150 }; | 149 }; | 
| 151 | 150 | 
| 152 uint32_t const kInstrSize   = 4; | 151 uint32_t const kInstrSize   = 4; | 
| 153 uint32_t const kInstrAlign  = 0xFFFFFFFC; | 152 uint32_t const kInstrAlign  = 0xFFFFFFFC; | 
| 154 uint32_t const kBundleAlign = 0xFFFFFFF0; | 153 uint32_t const kBundleAlign = 0xFFFFFFF0; | 
| 155 | 154 | 
|  | 155 // Opcode for nop instruction. | 
|  | 156 uint32_t const kNop = 0x0; | 
|  | 157 | 
| 156 }  // namespace | 158 }  // namespace | 
| 157 | 159 | 
| 158 // Definitions for our inlined functions. | 160 // Definitions for our inlined functions. | 
| 159 #include "native_client/src/trusted/validator_mips/model-inl.h" | 161 #include "native_client/src/trusted/validator_mips/model-inl.h" | 
| 160 | 162 | 
| 161 #endif  // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H | 163 #endif  // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H | 
| OLD | NEW | 
|---|