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 RUNTIME_VM_ASSEMBLER_X64_H_ | 5 #ifndef RUNTIME_VM_ASSEMBLER_X64_H_ |
6 #define RUNTIME_VM_ASSEMBLER_X64_H_ | 6 #define RUNTIME_VM_ASSEMBLER_X64_H_ |
7 | 7 |
8 #ifndef RUNTIME_VM_ASSEMBLER_H_ | 8 #ifndef RUNTIME_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 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 void j(Condition condition, Label* label, bool near = kFarJump); | 683 void j(Condition condition, Label* label, bool near = kFarJump); |
684 | 684 |
685 void jmp(Register reg); | 685 void jmp(Register reg); |
686 void jmp(const Address& address); | 686 void jmp(const Address& address); |
687 void jmp(Label* label, bool near = kFarJump); | 687 void jmp(Label* label, bool near = kFarJump); |
688 void jmp(const ExternalLabel* label); | 688 void jmp(const ExternalLabel* label); |
689 void jmp(const StubEntry& stub_entry); | 689 void jmp(const StubEntry& stub_entry); |
690 | 690 |
691 void lock(); | 691 void lock(); |
692 void cmpxchgl(const Address& address, Register reg); | 692 void cmpxchgl(const Address& address, Register reg); |
693 void lock_cmpxchgl(const Address& address, Register reg) { | |
694 lock(); | |
695 cmpxchgl(address, reg); | |
696 } | |
697 | 693 |
698 void cmpxchgq(const Address& address, Register reg); | 694 void cmpxchgq(const Address& address, Register reg); |
699 void lock_cmpxchgq(const Address& address, Register reg) { | |
700 lock(); | |
701 cmpxchgq(address, reg); | |
702 } | |
703 | 695 |
704 void cpuid(); | 696 void cpuid(); |
705 | 697 |
706 // Issue memory to memory move through a TMP register. | 698 // Issue memory to memory move through a TMP register. |
707 // TODO(koda): Assert that these are not used for heap objects. | 699 // TODO(koda): Assert that these are not used for heap objects. |
708 void MoveMemoryToMemory(const Address& dst, const Address& src) { | 700 void MoveMemoryToMemory(const Address& dst, const Address& src) { |
709 movq(TMP, src); | 701 movq(TMP, src); |
710 movq(dst, TMP); | 702 movq(dst, TMP); |
711 } | 703 } |
712 | 704 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 void DoubleNegate(XmmRegister d); | 786 void DoubleNegate(XmmRegister d); |
795 void FloatNegate(XmmRegister f); | 787 void FloatNegate(XmmRegister f); |
796 | 788 |
797 void DoubleAbs(XmmRegister reg); | 789 void DoubleAbs(XmmRegister reg); |
798 | 790 |
799 void LockCmpxchgq(const Address& address, Register reg) { | 791 void LockCmpxchgq(const Address& address, Register reg) { |
800 lock(); | 792 lock(); |
801 cmpxchgq(address, reg); | 793 cmpxchgq(address, reg); |
802 } | 794 } |
803 | 795 |
| 796 void LockCmpxchgl(const Address& address, Register reg) { |
| 797 lock(); |
| 798 cmpxchgl(address, reg); |
| 799 } |
| 800 |
804 void PushRegisters(intptr_t cpu_register_set, intptr_t xmm_register_set); | 801 void PushRegisters(intptr_t cpu_register_set, intptr_t xmm_register_set); |
805 void PopRegisters(intptr_t cpu_register_set, intptr_t xmm_register_set); | 802 void PopRegisters(intptr_t cpu_register_set, intptr_t xmm_register_set); |
806 | 803 |
807 void CheckCodePointer(); | 804 void CheckCodePointer(); |
808 | 805 |
809 void EnterFrame(intptr_t frame_space); | 806 void EnterFrame(intptr_t frame_space); |
810 void LeaveFrame(); | 807 void LeaveFrame(); |
811 void ReserveAlignedFrameSpace(intptr_t frame_space); | 808 void ReserveAlignedFrameSpace(intptr_t frame_space); |
812 | 809 |
813 // Create a frame for calling into runtime that preserves all volatile | 810 // Create a frame for calling into runtime that preserves all volatile |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1149 } | 1146 } |
1150 | 1147 |
1151 | 1148 |
1152 inline void Assembler::EmitOperandSizeOverride() { | 1149 inline void Assembler::EmitOperandSizeOverride() { |
1153 EmitUint8(0x66); | 1150 EmitUint8(0x66); |
1154 } | 1151 } |
1155 | 1152 |
1156 } // namespace dart | 1153 } // namespace dart |
1157 | 1154 |
1158 #endif // RUNTIME_VM_ASSEMBLER_X64_H_ | 1155 #endif // RUNTIME_VM_ASSEMBLER_X64_H_ |
OLD | NEW |