| 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 namespace dart { | 8 namespace dart { |
| 9 | 9 |
| 10 // We support both VFPv3-D16 and VFPv3-D32 profiles, but currently only one at | 10 // We support both VFPv3-D16 and VFPv3-D32 profiles, but currently only one at |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 ((Bits(4, 4) & 0xd) == 1)); | 479 ((Bits(4, 4) & 0xd) == 1)); |
| 480 } | 480 } |
| 481 | 481 |
| 482 // Test for VFP load and store instructions of type 6. | 482 // Test for VFP load and store instructions of type 6. |
| 483 inline bool IsVFPLoadStore() const { | 483 inline bool IsVFPLoadStore() const { |
| 484 ASSERT(ConditionField() != kSpecialCondition); | 484 ASSERT(ConditionField() != kSpecialCondition); |
| 485 ASSERT(TypeField() == 6); | 485 ASSERT(TypeField() == 6); |
| 486 return ((Bits(20, 5) & 0x12) == 0x10) && (Bits(9, 3) == 5); | 486 return ((Bits(20, 5) & 0x12) == 0x10) && (Bits(9, 3) == 5); |
| 487 } | 487 } |
| 488 | 488 |
| 489 // Test for VFP multiple load and store instructions of type 6. |
| 490 inline bool IsVFPMultipleLoadStore() const { |
| 491 ASSERT(ConditionField() != kSpecialCondition); |
| 492 ASSERT(TypeField() == 6); |
| 493 int32_t puw = (PUField() << 1) | Bit(21); // don't care about D bit |
| 494 return (Bits(9, 3) == 5) && ((puw == 2) || (puw == 3) || (puw == 5)); |
| 495 } |
| 496 |
| 489 // Special accessors that test for existence of a value. | 497 // Special accessors that test for existence of a value. |
| 490 inline bool HasS() const { return SField() == 1; } | 498 inline bool HasS() const { return SField() == 1; } |
| 491 inline bool HasB() const { return BField() == 1; } | 499 inline bool HasB() const { return BField() == 1; } |
| 492 inline bool HasW() const { return WField() == 1; } | 500 inline bool HasW() const { return WField() == 1; } |
| 493 inline bool HasL() const { return LField() == 1; } | 501 inline bool HasL() const { return LField() == 1; } |
| 494 inline bool HasSign() const { return SignField() == 1; } | 502 inline bool HasSign() const { return SignField() == 1; } |
| 495 inline bool HasH() const { return HField() == 1; } | 503 inline bool HasH() const { return HField() == 1; } |
| 496 inline bool HasLink() const { return LinkField() == 1; } | 504 inline bool HasLink() const { return LinkField() == 1; } |
| 497 | 505 |
| 498 // Instructions are read out of a code stream. The only way to get a | 506 // Instructions are read out of a code stream. The only way to get a |
| 499 // reference to an instruction is to convert a pointer. There is no way | 507 // reference to an instruction is to convert a pointer. There is no way |
| 500 // to allocate or create instances of class Instr. | 508 // to allocate or create instances of class Instr. |
| 501 // Use the At(pc) function to create references to Instr. | 509 // Use the At(pc) function to create references to Instr. |
| 502 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } | 510 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } |
| 503 Instr* Next() { return this + kInstrSize; } | 511 Instr* Next() { return this + kInstrSize; } |
| 504 | 512 |
| 505 private: | 513 private: |
| 506 DISALLOW_ALLOCATION(); | 514 DISALLOW_ALLOCATION(); |
| 507 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 515 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
| 508 }; | 516 }; |
| 509 | 517 |
| 510 } // namespace dart | 518 } // namespace dart |
| 511 | 519 |
| 512 #endif // VM_CONSTANTS_ARM_H_ | 520 #endif // VM_CONSTANTS_ARM_H_ |
| OLD | NEW |