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 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 FMT_PS = 22, | 449 FMT_PS = 22, |
450 }; | 450 }; |
451 | 451 |
452 | 452 |
453 class Instr { | 453 class Instr { |
454 public: | 454 public: |
455 enum { | 455 enum { |
456 kInstrSize = 4, | 456 kInstrSize = 4, |
457 }; | 457 }; |
458 | 458 |
| 459 static const int32_t kNopInstruction = 0; |
| 460 |
| 461 // Reserved break instruction codes. |
| 462 static const int32_t kStopMessageCode = 1 << 16; // For Stop(message). |
| 463 static const int32_t kRedirectCode = 2 << 16; // For call redirection in sim. |
| 464 static const int32_t kMsgMessageCode = 3 << 16; // For trace message in sim. |
| 465 static const int32_t kSimulatorBreakCode = 4 << 16; // For breakpoint in sim. |
| 466 |
| 467 // General breakpoint instruction: break(0), for user breakpoint and to fill |
| 468 // assembler code buffers in debug mode. |
459 static const int32_t kBreakPointInstruction = | 469 static const int32_t kBreakPointInstruction = |
460 (SPECIAL << kOpcodeShift) | (BREAK << kFunctionShift); | 470 (SPECIAL << kOpcodeShift) | (BREAK << kFunctionShift); |
461 static const int32_t kNopInstruction = 0; | |
462 static const int32_t kStopMessageCode = 1; | |
463 static const int32_t kRedirectCode = 2; | |
464 static const int32_t kMsgMessageCode = 3; | |
465 | 471 |
466 // Get the raw instruction bits. | 472 // Get the raw instruction bits. |
467 inline int32_t InstructionBits() const { | 473 inline int32_t InstructionBits() const { |
468 return *reinterpret_cast<const int32_t*>(this); | 474 return *reinterpret_cast<const int32_t*>(this); |
469 } | 475 } |
470 | 476 |
471 // Set the raw instruction bits to value. | 477 // Set the raw instruction bits to value. |
472 inline void SetInstructionBits(int32_t value) { | 478 inline void SetInstructionBits(int32_t value) { |
473 *reinterpret_cast<int32_t*>(this) = value; | 479 *reinterpret_cast<int32_t*>(this) = value; |
474 } | 480 } |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 #endif // defined(DEBUG) | 620 #endif // defined(DEBUG) |
615 | 621 |
616 private: | 622 private: |
617 DISALLOW_ALLOCATION(); | 623 DISALLOW_ALLOCATION(); |
618 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 624 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
619 }; | 625 }; |
620 | 626 |
621 } // namespace dart | 627 } // namespace dart |
622 | 628 |
623 #endif // VM_CONSTANTS_MIPS_H_ | 629 #endif // VM_CONSTANTS_MIPS_H_ |
OLD | NEW |