| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 kRdShift = 11, | 165 kRdShift = 11, |
| 166 kRdBits = 5, | 166 kRdBits = 5, |
| 167 kSaShift = 6, | 167 kSaShift = 6, |
| 168 kSaBits = 5, | 168 kSaBits = 5, |
| 169 kFunctionShift = 0, | 169 kFunctionShift = 0, |
| 170 kFunctionBits = 6, | 170 kFunctionBits = 6, |
| 171 kImmShift = 0, | 171 kImmShift = 0, |
| 172 kImmBits = 16, | 172 kImmBits = 16, |
| 173 kInstrShift = 0, | 173 kInstrShift = 0, |
| 174 kInstrBits = 26, | 174 kInstrBits = 26, |
| 175 kBreakCodeShift = 5, | 175 kBreakCodeShift = 6, |
| 176 kBreakCodeBits = 20, | 176 kBreakCodeBits = 20, |
| 177 | 177 |
| 178 kBranchOffsetMask = 0x0000ffff, | 178 kBranchOffsetMask = 0x0000ffff, |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 | 181 |
| 182 enum Opcode { | 182 enum Opcode { |
| 183 SPECIAL = 0, | 183 SPECIAL = 0, |
| 184 REGIMM = 1, | 184 REGIMM = 1, |
| 185 J = 2, | 185 J = 2, |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 | 302 |
| 303 class Instr { | 303 class Instr { |
| 304 public: | 304 public: |
| 305 enum { | 305 enum { |
| 306 kInstrSize = 4, | 306 kInstrSize = 4, |
| 307 }; | 307 }; |
| 308 | 308 |
| 309 static const int32_t kBreakPointInstruction = | 309 static const int32_t kBreakPointInstruction = |
| 310 (SPECIAL << kOpcodeShift) | (BREAK << kFunctionShift); | 310 (SPECIAL << kOpcodeShift) | (BREAK << kFunctionShift); |
| 311 static const int32_t kNopInstruction = 0; | 311 static const int32_t kNopInstruction = 0; |
| 312 static const int32_t kStopMessageCode = 1; |
| 312 | 313 |
| 313 // Get the raw instruction bits. | 314 // Get the raw instruction bits. |
| 314 inline int32_t InstructionBits() const { | 315 inline int32_t InstructionBits() const { |
| 315 return *reinterpret_cast<const int32_t*>(this); | 316 return *reinterpret_cast<const int32_t*>(this); |
| 316 } | 317 } |
| 317 | 318 |
| 318 // Set the raw instruction bits to value. | 319 // Set the raw instruction bits to value. |
| 319 inline void SetInstructionBits(int32_t value) { | 320 inline void SetInstructionBits(int32_t value) { |
| 320 *reinterpret_cast<int32_t*>(this) = value; | 321 *reinterpret_cast<int32_t*>(this) = value; |
| 321 } | 322 } |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } | 384 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } |
| 384 | 385 |
| 385 private: | 386 private: |
| 386 DISALLOW_ALLOCATION(); | 387 DISALLOW_ALLOCATION(); |
| 387 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 388 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
| 388 }; | 389 }; |
| 389 | 390 |
| 390 } // namespace dart | 391 } // namespace dart |
| 391 | 392 |
| 392 #endif // VM_CONSTANTS_MIPS_H_ | 393 #endif // VM_CONSTANTS_MIPS_H_ |
| OLD | NEW |