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 24 matching lines...) Expand all Loading... | |
35 | 35 |
36 /* | 36 /* |
37 * Produces the bitmask used to represent this register. | 37 * Produces the bitmask used to represent this register. |
38 */ | 38 */ |
39 inline uint32_t Bitmask() const; | 39 inline uint32_t Bitmask() const; |
40 | 40 |
41 inline bool Equals(const Register &) const; | 41 inline bool Equals(const Register &) const; |
42 | 42 |
43 static const Number kJumpMask = 14; // $t6 = holds mask for jr. | 43 static const Number kJumpMask = 14; // $t6 = holds mask for jr. |
44 static const Number kLoadStoreMask = 15; // $t7 = holds mask for load/store. | 44 static const Number kLoadStoreMask = 15; // $t7 = holds mask for load/store. |
45 static const Number kTls = 24; // $t8 = holds tls index. | 45 static const Number kTls = 24; // $t8 = holds pointer to tp index. |
Mark Seaborn
2015/12/27 03:46:35
"tp index" isn't quite right, is it? Is it an ind
petarj
2015/12/28 14:07:00
I have modified it to "holds address of tls_value1
Mark Seaborn
2015/12/30 02:12:40
Well, it doesn't hold that address, at least not u
| |
46 static const Number kSp = 29; // Stack pointer. | 46 static const Number kSp = 29; // Stack pointer. |
47 | 47 |
48 static const Number kNone = 32; | 48 static const Number kNone = 32; |
49 | 49 |
50 /* | 50 /* |
51 * A special value used to indicate that a register field is not used. | 51 * A special value used to indicate that a register field is not used. |
52 * This is specially chosen to ensure that bitmask() == 0, so it can be added | 52 * This is specially chosen to ensure that bitmask() == 0, so it can be added |
53 * to any RegisterList with no effect. | 53 * to any RegisterList with no effect. |
54 */ | 54 */ |
55 static Register None() { return Register(kNone); } | 55 static Register None() { return Register(kNone); } |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
167 uint32_t _bits; | 167 uint32_t _bits; |
168 }; | 168 }; |
169 | 169 |
170 uint32_t const kInstrSize = 4; | 170 uint32_t const kInstrSize = 4; |
171 uint32_t const kInstrAlign = 0xFFFFFFFC; | 171 uint32_t const kInstrAlign = 0xFFFFFFFC; |
172 uint32_t const kBundleAlign = 0xFFFFFFF0; | 172 uint32_t const kBundleAlign = 0xFFFFFFF0; |
173 | 173 |
174 // Opcode for nop instruction. | 174 // Opcode for nop instruction. |
175 uint32_t const kNop = 0x0; | 175 uint32_t const kNop = 0x0; |
176 | 176 |
177 } // namespace | 177 } // namespace nacl_mips_dec |
178 | 178 |
179 // Definitions for our inlined functions. | 179 // Definitions for our inlined functions. |
180 #include "native_client/src/trusted/validator_mips/model-inl.h" | 180 #include "native_client/src/trusted/validator_mips/model-inl.h" |
181 | 181 |
182 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H | 182 #endif // NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_MIPS_MODEL_H |
OLD | NEW |