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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 void vzipqw(QRegister qd, QRegister qm); | 601 void vzipqw(QRegister qd, QRegister qm); |
602 | 602 |
603 // Branch instructions. | 603 // Branch instructions. |
604 void b(Label* label, Condition cond = AL); | 604 void b(Label* label, Condition cond = AL); |
605 void bl(Label* label, Condition cond = AL); | 605 void bl(Label* label, Condition cond = AL); |
606 void bx(Register rm, Condition cond = AL); | 606 void bx(Register rm, Condition cond = AL); |
607 void blx(Register rm, Condition cond = AL); | 607 void blx(Register rm, Condition cond = AL); |
608 | 608 |
609 // Macros. | 609 // Macros. |
610 // Branch to an entry address. Call sequence is never patched. | 610 // Branch to an entry address. Call sequence is never patched. |
611 void Branch(const ExternalLabel* label, Condition cond = AL); | |
612 void Branch(const StubEntry& stub_entry, Condition cond = AL); | 611 void Branch(const StubEntry& stub_entry, Condition cond = AL); |
613 | 612 |
614 // Branch to an entry address. Call sequence can be patched or even replaced. | 613 // Branch to an entry address. Call sequence can be patched or even replaced. |
615 void BranchPatchable(const ExternalLabel* label); | |
616 void BranchPatchable(const StubEntry& stub_entry); | 614 void BranchPatchable(const StubEntry& stub_entry); |
617 | 615 |
618 // Branch and link to an entry address. Call sequence is never patched. | 616 void BranchLink(const StubEntry& stub_entry, |
619 void BranchLink(const ExternalLabel* label); | 617 Patchability patchable = kNotPatchable); |
620 void BranchLink(const StubEntry& stub_entry); | |
621 | |
622 void BranchLink(const ExternalLabel* label, Patchability patchable); | 618 void BranchLink(const ExternalLabel* label, Patchability patchable); |
623 void BranchLink(const StubEntry& stub_entry, Patchability patchable); | |
624 | 619 |
625 // Branch and link to an entry address. Call sequence can be patched. | 620 // Branch and link to an entry address. Call sequence can be patched. |
626 void BranchLinkPatchable(const ExternalLabel* label); | |
627 void BranchLinkPatchable(const StubEntry& stub_entry); | 621 void BranchLinkPatchable(const StubEntry& stub_entry); |
628 | 622 |
629 // Branch and link to [base + offset]. Call sequence is never patched. | 623 // Branch and link to [base + offset]. Call sequence is never patched. |
630 void BranchLinkOffset(Register base, int32_t offset); | 624 void BranchLinkOffset(Register base, int32_t offset); |
631 | 625 |
632 // Add signed immediate value to rd. May clobber IP. | 626 // Add signed immediate value to rd. May clobber IP. |
633 void AddImmediate(Register rd, int32_t value, Condition cond = AL); | 627 void AddImmediate(Register rd, int32_t value, Condition cond = AL); |
634 void AddImmediate(Register rd, Register rn, int32_t value, | 628 void AddImmediate(Register rd, Register rn, int32_t value, |
635 Condition cond = AL); | 629 Condition cond = AL); |
636 void AddImmediateSetFlags(Register rd, Register rn, int32_t value, | 630 void AddImmediateSetFlags(Register rd, Register rn, int32_t value, |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
989 bool use_far_branches_; | 983 bool use_far_branches_; |
990 | 984 |
991 // If you are thinking of using one or both of these instructions directly, | 985 // If you are thinking of using one or both of these instructions directly, |
992 // instead LoadImmediate should probably be used. | 986 // instead LoadImmediate should probably be used. |
993 void movw(Register rd, uint16_t imm16, Condition cond = AL); | 987 void movw(Register rd, uint16_t imm16, Condition cond = AL); |
994 void movt(Register rd, uint16_t imm16, Condition cond = AL); | 988 void movt(Register rd, uint16_t imm16, Condition cond = AL); |
995 | 989 |
996 void BindARMv6(Label* label); | 990 void BindARMv6(Label* label); |
997 void BindARMv7(Label* label); | 991 void BindARMv7(Label* label); |
998 | 992 |
| 993 void BranchLink(const ExternalLabel* label); |
| 994 |
999 class CodeComment : public ZoneAllocated { | 995 class CodeComment : public ZoneAllocated { |
1000 public: | 996 public: |
1001 CodeComment(intptr_t pc_offset, const String& comment) | 997 CodeComment(intptr_t pc_offset, const String& comment) |
1002 : pc_offset_(pc_offset), comment_(comment) { } | 998 : pc_offset_(pc_offset), comment_(comment) { } |
1003 | 999 |
1004 intptr_t pc_offset() const { return pc_offset_; } | 1000 intptr_t pc_offset() const { return pc_offset_; } |
1005 const String& comment() const { return comment_; } | 1001 const String& comment() const { return comment_; } |
1006 | 1002 |
1007 private: | 1003 private: |
1008 intptr_t pc_offset_; | 1004 intptr_t pc_offset_; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1148 Register new_value, | 1144 Register new_value, |
1149 FieldContent old_content); | 1145 FieldContent old_content); |
1150 | 1146 |
1151 DISALLOW_ALLOCATION(); | 1147 DISALLOW_ALLOCATION(); |
1152 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1148 DISALLOW_COPY_AND_ASSIGN(Assembler); |
1153 }; | 1149 }; |
1154 | 1150 |
1155 } // namespace dart | 1151 } // namespace dart |
1156 | 1152 |
1157 #endif // VM_ASSEMBLER_ARM_H_ | 1153 #endif // VM_ASSEMBLER_ARM_H_ |
OLD | NEW |