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_X64_H_ | 5 #ifndef VM_ASSEMBLER_X64_H_ |
6 #define VM_ASSEMBLER_X64_H_ | 6 #define VM_ASSEMBLER_X64_H_ |
7 | 7 |
8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
9 #error Do not include assembler_x64.h directly; use assembler.h instead. | 9 #error Do not include assembler_x64.h directly; use assembler.h instead. |
10 #endif | 10 #endif |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 void fsin(); | 679 void fsin(); |
680 void fcos(); | 680 void fcos(); |
681 | 681 |
682 // 'size' indicates size in bytes and must be in the range 1..8. | 682 // 'size' indicates size in bytes and must be in the range 1..8. |
683 void nop(int size = 1); | 683 void nop(int size = 1); |
684 void int3(); | 684 void int3(); |
685 void hlt(); | 685 void hlt(); |
686 | 686 |
687 // Note: verified_mem mode forces far jumps. | 687 // Note: verified_mem mode forces far jumps. |
688 void j(Condition condition, Label* label, bool near = kFarJump); | 688 void j(Condition condition, Label* label, bool near = kFarJump); |
689 void j(Condition condition, const ExternalLabel* label); | |
690 | 689 |
691 void jmp(Register reg); | 690 void jmp(Register reg); |
692 void jmp(const Address& address); | 691 void jmp(const Address& address); |
693 // Note: verified_mem mode forces far jumps. | 692 // Note: verified_mem mode forces far jumps. |
694 void jmp(Label* label, bool near = kFarJump); | 693 void jmp(Label* label, bool near = kFarJump); |
695 void jmp(const ExternalLabel* label); | 694 void jmp(const ExternalLabel* label); |
696 void jmp(const StubEntry& stub_entry); | 695 void jmp(const StubEntry& stub_entry); |
697 | 696 |
698 void lock(); | 697 void lock(); |
699 void cmpxchgl(const Address& address, Register reg); | 698 void cmpxchgl(const Address& address, Register reg); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 void LoadImmediate(Register reg, const Immediate& imm); | 759 void LoadImmediate(Register reg, const Immediate& imm); |
761 void LoadIsolate(Register dst); | 760 void LoadIsolate(Register dst); |
762 void LoadObject(Register dst, const Object& obj); | 761 void LoadObject(Register dst, const Object& obj); |
763 void LoadUniqueObject(Register dst, const Object& obj); | 762 void LoadUniqueObject(Register dst, const Object& obj); |
764 void LoadExternalLabel(Register dst, | 763 void LoadExternalLabel(Register dst, |
765 const ExternalLabel* label, | 764 const ExternalLabel* label, |
766 Patchability patchable); | 765 Patchability patchable); |
767 void LoadFunctionFromCalleePool(Register dst, | 766 void LoadFunctionFromCalleePool(Register dst, |
768 const Function& function, | 767 const Function& function, |
769 Register new_pp); | 768 Register new_pp); |
770 void JmpPatchable(const ExternalLabel* label, Register pp); | |
771 void JmpPatchable(const StubEntry& stub_entry, Register pp); | 769 void JmpPatchable(const StubEntry& stub_entry, Register pp); |
772 void Jmp(const ExternalLabel* label, Register pp); | |
773 void Jmp(const StubEntry& stub_entry, Register pp); | 770 void Jmp(const StubEntry& stub_entry, Register pp); |
774 void J(Condition condition, const ExternalLabel* label, Register pp); | |
775 void J(Condition condition, const StubEntry& stub_entry, Register pp); | 771 void J(Condition condition, const StubEntry& stub_entry, Register pp); |
776 void CallPatchable(const ExternalLabel* label); | |
777 void CallPatchable(const StubEntry& stub_entry); | 772 void CallPatchable(const StubEntry& stub_entry); |
778 void Call(const ExternalLabel* label); | |
779 void Call(const StubEntry& stub_entry); | 773 void Call(const StubEntry& stub_entry); |
780 // Unaware of write barrier (use StoreInto* methods for storing to objects). | 774 // Unaware of write barrier (use StoreInto* methods for storing to objects). |
781 // TODO(koda): Add StackAddress/HeapAddress types to prevent misuse. | 775 // TODO(koda): Add StackAddress/HeapAddress types to prevent misuse. |
782 void StoreObject(const Address& dst, const Object& obj); | 776 void StoreObject(const Address& dst, const Object& obj); |
783 void PushObject(const Object& object); | 777 void PushObject(const Object& object); |
784 void CompareObject(Register reg, const Object& object); | 778 void CompareObject(Register reg, const Object& object); |
785 | 779 |
786 // When storing into a heap object field, knowledge of the previous content | 780 // When storing into a heap object field, knowledge of the previous content |
787 // is expressed through these constants. | 781 // is expressed through these constants. |
788 enum FieldContent { | 782 enum FieldContent { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 // Create a frame for calling into runtime that preserves all volatile | 836 // Create a frame for calling into runtime that preserves all volatile |
843 // registers. Frame's RSP is guaranteed to be correctly aligned and | 837 // registers. Frame's RSP is guaranteed to be correctly aligned and |
844 // frame_space bytes are reserved under it. | 838 // frame_space bytes are reserved under it. |
845 void EnterCallRuntimeFrame(intptr_t frame_space); | 839 void EnterCallRuntimeFrame(intptr_t frame_space); |
846 void LeaveCallRuntimeFrame(); | 840 void LeaveCallRuntimeFrame(); |
847 | 841 |
848 void CallRuntime(const RuntimeEntry& entry, intptr_t argument_count); | 842 void CallRuntime(const RuntimeEntry& entry, intptr_t argument_count); |
849 | 843 |
850 // Call runtime function. Reserves shadow space on the stack before calling | 844 // Call runtime function. Reserves shadow space on the stack before calling |
851 // if platform ABI requires that. Does not restore RSP after the call itself. | 845 // if platform ABI requires that. Does not restore RSP after the call itself. |
852 void CallCFunction(const ExternalLabel* label); | |
853 void CallCFunction(Register reg); | 846 void CallCFunction(Register reg); |
854 | 847 |
855 /* | 848 /* |
856 * Loading and comparing classes of objects. | 849 * Loading and comparing classes of objects. |
857 */ | 850 */ |
858 void LoadClassId(Register result, Register object); | 851 void LoadClassId(Register result, Register object); |
859 | 852 |
860 void LoadClassById(Register result, Register class_id); | 853 void LoadClassById(Register result, Register class_id); |
861 | 854 |
862 void LoadClass(Register result, Register object); | 855 void LoadClass(Register result, Register object); |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1214 } | 1207 } |
1215 | 1208 |
1216 | 1209 |
1217 inline void Assembler::EmitOperandSizeOverride() { | 1210 inline void Assembler::EmitOperandSizeOverride() { |
1218 EmitUint8(0x66); | 1211 EmitUint8(0x66); |
1219 } | 1212 } |
1220 | 1213 |
1221 } // namespace dart | 1214 } // namespace dart |
1222 | 1215 |
1223 #endif // VM_ASSEMBLER_X64_H_ | 1216 #endif // VM_ASSEMBLER_X64_H_ |
OLD | NEW |