| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_CONSTANTS_MIPS_H_ | 5 #ifndef VM_CONSTANTS_MIPS_H_ |
| 6 #define VM_CONSTANTS_MIPS_H_ | 6 #define VM_CONSTANTS_MIPS_H_ |
| 7 | 7 |
| 8 namespace dart { | 8 namespace dart { |
| 9 | 9 |
| 10 enum Register { | 10 enum Register { |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 class Instr { | 315 class Instr { |
| 316 public: | 316 public: |
| 317 enum { | 317 enum { |
| 318 kInstrSize = 4, | 318 kInstrSize = 4, |
| 319 }; | 319 }; |
| 320 | 320 |
| 321 static const int32_t kBreakPointInstruction = | 321 static const int32_t kBreakPointInstruction = |
| 322 (SPECIAL << kOpcodeShift) | (BREAK << kFunctionShift); | 322 (SPECIAL << kOpcodeShift) | (BREAK << kFunctionShift); |
| 323 static const int32_t kNopInstruction = 0; | 323 static const int32_t kNopInstruction = 0; |
| 324 static const int32_t kStopMessageCode = 1; | 324 static const int32_t kStopMessageCode = 1; |
| 325 static const int32_t kRedirectCode = 2; |
| 325 | 326 |
| 326 // Get the raw instruction bits. | 327 // Get the raw instruction bits. |
| 327 inline int32_t InstructionBits() const { | 328 inline int32_t InstructionBits() const { |
| 328 return *reinterpret_cast<const int32_t*>(this); | 329 return *reinterpret_cast<const int32_t*>(this); |
| 329 } | 330 } |
| 330 | 331 |
| 331 // Set the raw instruction bits to value. | 332 // Set the raw instruction bits to value. |
| 332 inline void SetInstructionBits(int32_t value) { | 333 inline void SetInstructionBits(int32_t value) { |
| 333 *reinterpret_cast<int32_t*>(this) = value; | 334 *reinterpret_cast<int32_t*>(this) = value; |
| 334 } | 335 } |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } | 397 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } |
| 397 | 398 |
| 398 private: | 399 private: |
| 399 DISALLOW_ALLOCATION(); | 400 DISALLOW_ALLOCATION(); |
| 400 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 401 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
| 401 }; | 402 }; |
| 402 | 403 |
| 403 } // namespace dart | 404 } // namespace dart |
| 404 | 405 |
| 405 #endif // VM_CONSTANTS_MIPS_H_ | 406 #endif // VM_CONSTANTS_MIPS_H_ |
| OLD | NEW |