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_ASSEMBLER_ARM_H_ | 5 #ifndef VM_ASSEMBLER_ARM_H_ |
6 #define VM_ASSEMBLER_ARM_H_ | 6 #define VM_ASSEMBLER_ARM_H_ |
7 | 7 |
8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
9 #error Do not include assembler_arm.h directly; use assembler.h instead. | 9 #error Do not include assembler_arm.h directly; use assembler.h instead. |
10 #endif | 10 #endif |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 void LinkTo(intptr_t position) { | 56 void LinkTo(intptr_t position) { |
57 ASSERT(!IsBound()); | 57 ASSERT(!IsBound()); |
58 position_ = position + kWordSize; | 58 position_ = position + kWordSize; |
59 ASSERT(IsLinked()); | 59 ASSERT(IsLinked()); |
60 } | 60 } |
61 | 61 |
62 friend class Assembler; | 62 friend class Assembler; |
63 DISALLOW_COPY_AND_ASSIGN(Label); | 63 DISALLOW_COPY_AND_ASSIGN(Label); |
64 }; | 64 }; |
65 | 65 |
| 66 |
66 // Encodes Addressing Mode 1 - Data-processing operands. | 67 // Encodes Addressing Mode 1 - Data-processing operands. |
67 class ShifterOperand : public ValueObject { | 68 class ShifterOperand : public ValueObject { |
68 public: | 69 public: |
69 // Data-processing operands - Uninitialized. | 70 // Data-processing operands - Uninitialized. |
70 ShifterOperand() : type_(-1), encoding_(-1) { } | 71 ShifterOperand() : type_(-1), encoding_(-1) { } |
71 | 72 |
72 // Data-processing operands - Copy constructor. | 73 // Data-processing operands - Copy constructor. |
73 ShifterOperand(const ShifterOperand& other) | 74 ShifterOperand(const ShifterOperand& other) |
74 : ValueObject(), type_(other.type_), encoding_(other.encoding_) { } | 75 : ValueObject(), type_(other.type_), encoding_(other.encoding_) { } |
75 | 76 |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 | 584 |
584 | 585 |
585 // Signed integer division of left by right. Checks to see if integer | 586 // Signed integer division of left by right. Checks to see if integer |
586 // division is supported. If not, uses the FPU for division with | 587 // division is supported. If not, uses the FPU for division with |
587 // temporary registers tmpl and tmpr. tmpl and tmpr must be different | 588 // temporary registers tmpl and tmpr. tmpl and tmpr must be different |
588 // registers. | 589 // registers. |
589 void IntegerDivide(Register result, Register left, Register right, | 590 void IntegerDivide(Register result, Register left, Register right, |
590 DRegister tmpl, DRegister tmpr); | 591 DRegister tmpl, DRegister tmpr); |
591 | 592 |
592 // Load and Store. May clobber IP. | 593 // Load and Store. May clobber IP. |
| 594 void LoadPatchableImmediate(Register rd, int32_t value, Condition cond = AL); |
| 595 void LoadDecodableImmediate(Register rd, int32_t value, Condition cond = AL); |
593 void LoadImmediate(Register rd, int32_t value, Condition cond = AL); | 596 void LoadImmediate(Register rd, int32_t value, Condition cond = AL); |
594 void LoadSImmediate(SRegister sd, float value, Condition cond = AL); | 597 void LoadSImmediate(SRegister sd, float value, Condition cond = AL); |
595 void LoadDImmediate(DRegister dd, double value, | 598 void LoadDImmediate(DRegister dd, double value, |
596 Register scratch, Condition cond = AL); | 599 Register scratch, Condition cond = AL); |
597 | 600 |
598 void MarkExceptionHandler(Label* label); | 601 void MarkExceptionHandler(Label* label); |
599 | 602 |
600 void Drop(intptr_t stack_elements); | 603 void Drop(intptr_t stack_elements); |
601 | 604 |
602 void LoadPoolPointer(); | 605 void LoadPoolPointer(); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 private: | 751 private: |
749 AssemblerBuffer buffer_; // Contains position independent code. | 752 AssemblerBuffer buffer_; // Contains position independent code. |
750 GrowableObjectArray& object_pool_; // Objects and patchable jump targets. | 753 GrowableObjectArray& object_pool_; // Objects and patchable jump targets. |
751 int32_t prologue_offset_; | 754 int32_t prologue_offset_; |
752 | 755 |
753 bool use_far_branches_; | 756 bool use_far_branches_; |
754 | 757 |
755 int32_t AddObject(const Object& obj); | 758 int32_t AddObject(const Object& obj); |
756 int32_t AddExternalLabel(const ExternalLabel* label); | 759 int32_t AddExternalLabel(const ExternalLabel* label); |
757 | 760 |
| 761 void BindARMv6(Label* label); |
| 762 void BindARMv7(Label* label); |
| 763 |
758 class CodeComment : public ZoneAllocated { | 764 class CodeComment : public ZoneAllocated { |
759 public: | 765 public: |
760 CodeComment(intptr_t pc_offset, const String& comment) | 766 CodeComment(intptr_t pc_offset, const String& comment) |
761 : pc_offset_(pc_offset), comment_(comment) { } | 767 : pc_offset_(pc_offset), comment_(comment) { } |
762 | 768 |
763 intptr_t pc_offset() const { return pc_offset_; } | 769 intptr_t pc_offset() const { return pc_offset_; } |
764 const String& comment() const { return comment_; } | 770 const String& comment() const { return comment_; } |
765 | 771 |
766 private: | 772 private: |
767 intptr_t pc_offset_; | 773 intptr_t pc_offset_; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 Register value, | 886 Register value, |
881 Label* no_update); | 887 Label* no_update); |
882 | 888 |
883 DISALLOW_ALLOCATION(); | 889 DISALLOW_ALLOCATION(); |
884 DISALLOW_COPY_AND_ASSIGN(Assembler); | 890 DISALLOW_COPY_AND_ASSIGN(Assembler); |
885 }; | 891 }; |
886 | 892 |
887 } // namespace dart | 893 } // namespace dart |
888 | 894 |
889 #endif // VM_ASSEMBLER_ARM_H_ | 895 #endif // VM_ASSEMBLER_ARM_H_ |
OLD | NEW |