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