| 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_ARM_H_ | 5 #ifndef VM_CONSTANTS_ARM_H_ |
| 6 #define VM_CONSTANTS_ARM_H_ | 6 #define VM_CONSTANTS_ARM_H_ |
| 7 | 7 |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 // } | 398 // } |
| 399 // | 399 // |
| 400 class Instr { | 400 class Instr { |
| 401 public: | 401 public: |
| 402 enum { | 402 enum { |
| 403 kInstrSize = 4, | 403 kInstrSize = 4, |
| 404 kInstrSizeLog2 = 2, | 404 kInstrSizeLog2 = 2, |
| 405 kPCReadOffset = 8 | 405 kPCReadOffset = 8 |
| 406 }; | 406 }; |
| 407 | 407 |
| 408 static const int32_t kNopInstruction = // nop |
| 409 ((AL << kConditionShift) | (0x32 << 20) | (0xf << 12)); |
| 408 static const int32_t kBreakPointInstruction = // svc #kBreakpointSvcCode | 410 static const int32_t kBreakPointInstruction = // svc #kBreakpointSvcCode |
| 409 ((AL << kConditionShift) | (0xf << 24) | kBreakpointSvcCode); | 411 ((AL << kConditionShift) | (0xf << 24) | kBreakpointSvcCode); |
| 410 static const int kBreakPointInstructionSize = kInstrSize; | 412 static const int kBreakPointInstructionSize = kInstrSize; |
| 411 bool IsBreakPoint() { | 413 bool IsBreakPoint() { |
| 412 return IsBkpt(); | 414 return IsBkpt(); |
| 413 } | 415 } |
| 414 | 416 |
| 415 // Get the raw instruction bits. | 417 // Get the raw instruction bits. |
| 416 inline int32_t InstructionBits() const { | 418 inline int32_t InstructionBits() const { |
| 417 return *reinterpret_cast<const int32_t*>(this); | 419 return *reinterpret_cast<const int32_t*>(this); |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } | 658 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } |
| 657 | 659 |
| 658 private: | 660 private: |
| 659 DISALLOW_ALLOCATION(); | 661 DISALLOW_ALLOCATION(); |
| 660 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 662 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
| 661 }; | 663 }; |
| 662 | 664 |
| 663 } // namespace dart | 665 } // namespace dart |
| 664 | 666 |
| 665 #endif // VM_CONSTANTS_ARM_H_ | 667 #endif // VM_CONSTANTS_ARM_H_ |
| OLD | NEW |