OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/x64/assembler-x64.h" | 5 #include "src/x64/assembler-x64.h" |
6 | 6 |
7 #include <cstring> | 7 #include <cstring> |
8 | 8 |
9 #if V8_TARGET_ARCH_X64 | 9 #if V8_TARGET_ARCH_X64 |
10 | 10 |
(...skipping 2667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2678 emit_optional_rex_32(dst, src); | 2678 emit_optional_rex_32(dst, src); |
2679 emit(0x0F); | 2679 emit(0x0F); |
2680 emit(0x3A); | 2680 emit(0x3A); |
2681 emit(0x22); | 2681 emit(0x22); |
2682 emit_sse_operand(dst, src); | 2682 emit_sse_operand(dst, src); |
2683 emit(imm8); | 2683 emit(imm8); |
2684 } | 2684 } |
2685 | 2685 |
2686 | 2686 |
2687 void Assembler::movsd(const Operand& dst, XMMRegister src) { | 2687 void Assembler::movsd(const Operand& dst, XMMRegister src) { |
| 2688 DCHECK(!IsEnabled(AVX)); |
2688 EnsureSpace ensure_space(this); | 2689 EnsureSpace ensure_space(this); |
2689 emit(0xF2); // double | 2690 emit(0xF2); // double |
2690 emit_optional_rex_32(src, dst); | 2691 emit_optional_rex_32(src, dst); |
2691 emit(0x0F); | 2692 emit(0x0F); |
2692 emit(0x11); // store | 2693 emit(0x11); // store |
2693 emit_sse_operand(src, dst); | 2694 emit_sse_operand(src, dst); |
2694 } | 2695 } |
2695 | 2696 |
2696 | 2697 |
2697 void Assembler::movsd(XMMRegister dst, XMMRegister src) { | 2698 void Assembler::movsd(XMMRegister dst, XMMRegister src) { |
| 2699 DCHECK(!IsEnabled(AVX)); |
2698 EnsureSpace ensure_space(this); | 2700 EnsureSpace ensure_space(this); |
2699 emit(0xF2); // double | 2701 emit(0xF2); // double |
2700 emit_optional_rex_32(dst, src); | 2702 emit_optional_rex_32(dst, src); |
2701 emit(0x0F); | 2703 emit(0x0F); |
2702 emit(0x10); // load | 2704 emit(0x10); // load |
2703 emit_sse_operand(dst, src); | 2705 emit_sse_operand(dst, src); |
2704 } | 2706 } |
2705 | 2707 |
2706 | 2708 |
2707 void Assembler::movsd(XMMRegister dst, const Operand& src) { | 2709 void Assembler::movsd(XMMRegister dst, const Operand& src) { |
| 2710 DCHECK(!IsEnabled(AVX)); |
2708 EnsureSpace ensure_space(this); | 2711 EnsureSpace ensure_space(this); |
2709 emit(0xF2); // double | 2712 emit(0xF2); // double |
2710 emit_optional_rex_32(dst, src); | 2713 emit_optional_rex_32(dst, src); |
2711 emit(0x0F); | 2714 emit(0x0F); |
2712 emit(0x10); // load | 2715 emit(0x10); // load |
2713 emit_sse_operand(dst, src); | 2716 emit_sse_operand(dst, src); |
2714 } | 2717 } |
2715 | 2718 |
2716 | 2719 |
2717 void Assembler::movaps(XMMRegister dst, XMMRegister src) { | 2720 void Assembler::movaps(XMMRegister dst, XMMRegister src) { |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3451 void Assembler::vfmass(byte op, XMMRegister dst, XMMRegister src1, | 3454 void Assembler::vfmass(byte op, XMMRegister dst, XMMRegister src1, |
3452 const Operand& src2) { | 3455 const Operand& src2) { |
3453 DCHECK(IsEnabled(FMA3)); | 3456 DCHECK(IsEnabled(FMA3)); |
3454 EnsureSpace ensure_space(this); | 3457 EnsureSpace ensure_space(this); |
3455 emit_vex_prefix(dst, src1, src2, kLIG, k66, k0F38, kW0); | 3458 emit_vex_prefix(dst, src1, src2, kLIG, k66, k0F38, kW0); |
3456 emit(op); | 3459 emit(op); |
3457 emit_sse_operand(dst, src2); | 3460 emit_sse_operand(dst, src2); |
3458 } | 3461 } |
3459 | 3462 |
3460 | 3463 |
| 3464 void Assembler::vmovapd(XMMRegister dst, XMMRegister src) { |
| 3465 DCHECK(IsEnabled(AVX)); |
| 3466 EnsureSpace ensure_space(this); |
| 3467 emit_vex_prefix(dst, xmm0, src, kLIG, k66, k0F, kWIG); |
| 3468 emit(0x28); |
| 3469 emit_sse_operand(dst, src); |
| 3470 } |
| 3471 |
| 3472 |
3461 void Assembler::vucomisd(XMMRegister dst, XMMRegister src) { | 3473 void Assembler::vucomisd(XMMRegister dst, XMMRegister src) { |
3462 DCHECK(IsEnabled(AVX)); | 3474 DCHECK(IsEnabled(AVX)); |
3463 EnsureSpace ensure_space(this); | 3475 EnsureSpace ensure_space(this); |
3464 emit_vex_prefix(dst, xmm0, src, kLIG, k66, k0F, kWIG); | 3476 emit_vex_prefix(dst, xmm0, src, kLIG, k66, k0F, kWIG); |
3465 emit(0x2e); | 3477 emit(0x2e); |
3466 emit_sse_operand(dst, src); | 3478 emit_sse_operand(dst, src); |
3467 } | 3479 } |
3468 | 3480 |
3469 | 3481 |
3470 void Assembler::vucomisd(XMMRegister dst, const Operand& src) { | 3482 void Assembler::vucomisd(XMMRegister dst, const Operand& src) { |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3929 | 3941 |
3930 bool RelocInfo::IsInConstantPool() { | 3942 bool RelocInfo::IsInConstantPool() { |
3931 return false; | 3943 return false; |
3932 } | 3944 } |
3933 | 3945 |
3934 | 3946 |
3935 } // namespace internal | 3947 } // namespace internal |
3936 } // namespace v8 | 3948 } // namespace v8 |
3937 | 3949 |
3938 #endif // V8_TARGET_ARCH_X64 | 3950 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |