| 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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 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; | 459   static const int32_t kNopInstruction = 0; | 
| 460 | 460 | 
| 461   // Reserved break instruction codes. | 461   // Reserved break instruction codes. | 
| 462   static const int32_t kStopMessageCode = 1 << 16;  // For Stop(message). | 462   static const int32_t kBreakPointCode = 0xdeb0;  // For breakpoint. | 
| 463   static const int32_t kRedirectCode = 2 << 16;  // For call redirection in sim. | 463   static const int32_t kStopMessageCode = 0xdeb1;  // For Stop(message). | 
| 464   static const int32_t kMsgMessageCode = 3 << 16;  // For trace message in sim. | 464   static const int32_t kSimulatorMessageCode = 0xdeb2;  // For trace msg in sim. | 
| 465   static const int32_t kSimulatorBreakCode = 4 << 16;  // For breakpoint in sim. | 465   static const int32_t kSimulatorBreakCode = 0xdeb3;  // For breakpoint in sim. | 
|  | 466   static const int32_t kSimulatorRedirectCode = 0xca11;  // For redirection. | 
| 466 | 467 | 
| 467   // General breakpoint instruction: break(0), for user breakpoint and to fill | 468   static const int32_t kBreakPointZeroInstruction = | 
| 468   // assembler code buffers in debug mode. | 469       (SPECIAL << kOpcodeShift) | (BREAK << kFunctionShift); | 
|  | 470 | 
|  | 471   // Breakpoint instruction filling assembler code buffers in debug mode. | 
| 469   static const int32_t kBreakPointInstruction = | 472   static const int32_t kBreakPointInstruction = | 
| 470       (SPECIAL << kOpcodeShift) | (BREAK << kFunctionShift); | 473       kBreakPointZeroInstruction | (kBreakPointCode << kBreakCodeShift); | 
|  | 474 | 
|  | 475   // Breakpoint instruction used by the simulator. | 
|  | 476   // Should be distinct from kBreakPointInstruction and from a typical user | 
|  | 477   // breakpoint inserted in generated code for debugging, e.g. break_(0). | 
|  | 478   static const int32_t kSimulatorBreakpointInstruction = | 
|  | 479       kBreakPointZeroInstruction | (kSimulatorBreakCode << kBreakCodeShift); | 
|  | 480 | 
|  | 481   // Runtime call redirection instruction used by the simulator. | 
|  | 482   static const int32_t kSimulatorRedirectInstruction = | 
|  | 483       kBreakPointZeroInstruction | (kSimulatorRedirectCode << kBreakCodeShift); | 
| 471 | 484 | 
| 472   // Get the raw instruction bits. | 485   // Get the raw instruction bits. | 
| 473   inline int32_t InstructionBits() const { | 486   inline int32_t InstructionBits() const { | 
| 474     return *reinterpret_cast<const int32_t*>(this); | 487     return *reinterpret_cast<const int32_t*>(this); | 
| 475   } | 488   } | 
| 476 | 489 | 
| 477   // Set the raw instruction bits to value. | 490   // Set the raw instruction bits to value. | 
| 478   inline void SetInstructionBits(int32_t value) { | 491   inline void SetInstructionBits(int32_t value) { | 
| 479     *reinterpret_cast<int32_t*>(this) = value; | 492     *reinterpret_cast<int32_t*>(this) = value; | 
| 480   } | 493   } | 
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 620 #endif  // defined(DEBUG) | 633 #endif  // defined(DEBUG) | 
| 621 | 634 | 
| 622  private: | 635  private: | 
| 623   DISALLOW_ALLOCATION(); | 636   DISALLOW_ALLOCATION(); | 
| 624   DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 637   DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 
| 625 }; | 638 }; | 
| 626 | 639 | 
| 627 }  // namespace dart | 640 }  // namespace dart | 
| 628 | 641 | 
| 629 #endif  // VM_CONSTANTS_MIPS_H_ | 642 #endif  // VM_CONSTANTS_MIPS_H_ | 
| OLD | NEW | 
|---|