OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 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 be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H | 7 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H |
8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H | 8 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H |
9 | 9 |
10 /* | 10 /* |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 | 98 |
99 /* | 99 /* |
100 * A list containing every possible register, even some we don't define. | 100 * A list containing every possible register, even some we don't define. |
101 * Used exclusively as a bogus scary return value for forbidden instructions. | 101 * Used exclusively as a bogus scary return value for forbidden instructions. |
102 */ | 102 */ |
103 static const RegisterList kRegisterListEverything = RegisterList(-1); | 103 static const RegisterList kRegisterListEverything = RegisterList(-1); |
104 | 104 |
105 static uint32_t const kReservedRegsBitmask = kRegisterTls.Bitmask() | 105 static uint32_t const kReservedRegsBitmask = kRegisterTls.Bitmask() |
106 + kRegisterJumpMask.Bitmask() | 106 + kRegisterJumpMask.Bitmask() |
107 + kRegisterLoadStoreMask.Bitmask(); | 107 + kRegisterLoadStoreMask.Bitmask(); |
108 static uint32_t const kDataAddrRegsBitmask = kRegisterStack.Bitmask() | |
109 + kRegisterTls.Bitmask(); | |
110 | |
111 static RegisterList const kRegListDataAddr = RegisterList(kDataAddrRegsBitmask); | |
108 static RegisterList const kRegListReserved = RegisterList(kReservedRegsBitmask); | 112 static RegisterList const kRegListReserved = RegisterList(kReservedRegsBitmask); |
Mark Seaborn
2013/01/15 16:51:36
Nit: Can you make the ordering of declarations con
JF
2013/01/15 17:03:03
Agreed with Mark on non-POD, I made a similar chan
petarj
2013/01/22 22:57:30
Done.
petarj
2013/01/22 22:57:30
Done (similar to the ARM change).
| |
109 | 113 |
110 /* | 114 /* |
111 * A 32-bit Mips instruction of unspecified type. | 115 * A 32-bit Mips instruction of unspecified type. |
112 * | 116 * |
113 * This class is designed for efficiency: | 117 * This class is designed for efficiency: |
114 * - Its public methods for bitfield extraction are short and inline. | 118 * - Its public methods for bitfield extraction are short and inline. |
115 * - It has no vtable, so on 32-bit platforms it's exactly the size of the | 119 * - It has no vtable, so on 32-bit platforms it's exactly the size of the |
116 * instruction it models. | 120 * instruction it models. |
117 */ | 121 */ |
118 class Instruction { | 122 class Instruction { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
154 | 158 |
155 // Opcode for nop instruction. | 159 // Opcode for nop instruction. |
156 uint32_t const kNop = 0x0; | 160 uint32_t const kNop = 0x0; |
157 | 161 |
158 } // namespace | 162 } // namespace |
159 | 163 |
160 // Definitions for our inlined functions. | 164 // Definitions for our inlined functions. |
161 #include "native_client/src/trusted/validator_mips/model-inl.h" | 165 #include "native_client/src/trusted/validator_mips/model-inl.h" |
162 | 166 |
163 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H | 167 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H |
OLD | NEW |