| 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 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2522 void Assembler::movd(XMMRegister dst, Register src) { | 2522 void Assembler::movd(XMMRegister dst, Register src) { |
| 2523 EnsureSpace ensure_space(this); | 2523 EnsureSpace ensure_space(this); |
| 2524 emit(0x66); | 2524 emit(0x66); |
| 2525 emit_optional_rex_32(dst, src); | 2525 emit_optional_rex_32(dst, src); |
| 2526 emit(0x0F); | 2526 emit(0x0F); |
| 2527 emit(0x6E); | 2527 emit(0x6E); |
| 2528 emit_sse_operand(dst, src); | 2528 emit_sse_operand(dst, src); |
| 2529 } | 2529 } |
| 2530 | 2530 |
| 2531 | 2531 |
| 2532 void Assembler::movd(XMMRegister dst, const Operand& src) { |
| 2533 EnsureSpace ensure_space(this); |
| 2534 emit(0x66); |
| 2535 emit_optional_rex_32(dst, src); |
| 2536 emit(0x0F); |
| 2537 emit(0x6E); |
| 2538 emit_sse_operand(dst, src); |
| 2539 } |
| 2540 |
| 2541 |
| 2532 void Assembler::movd(Register dst, XMMRegister src) { | 2542 void Assembler::movd(Register dst, XMMRegister src) { |
| 2533 EnsureSpace ensure_space(this); | 2543 EnsureSpace ensure_space(this); |
| 2534 emit(0x66); | 2544 emit(0x66); |
| 2535 emit_optional_rex_32(src, dst); | 2545 emit_optional_rex_32(src, dst); |
| 2536 emit(0x0F); | 2546 emit(0x0F); |
| 2537 emit(0x7E); | 2547 emit(0x7E); |
| 2538 emit_sse_operand(src, dst); | 2548 emit_sse_operand(src, dst); |
| 2539 } | 2549 } |
| 2540 | 2550 |
| 2541 | 2551 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2625 emit(0x66); | 2635 emit(0x66); |
| 2626 emit_optional_rex_32(src, dst); | 2636 emit_optional_rex_32(src, dst); |
| 2627 emit(0x0F); | 2637 emit(0x0F); |
| 2628 emit(0x3A); | 2638 emit(0x3A); |
| 2629 emit(0x17); | 2639 emit(0x17); |
| 2630 emit_sse_operand(src, dst); | 2640 emit_sse_operand(src, dst); |
| 2631 emit(imm8); | 2641 emit(imm8); |
| 2632 } | 2642 } |
| 2633 | 2643 |
| 2634 | 2644 |
| 2645 void Assembler::pextrd(Register dst, XMMRegister src, int8_t imm8) { |
| 2646 DCHECK(IsEnabled(SSE4_1)); |
| 2647 EnsureSpace ensure_space(this); |
| 2648 emit(0x66); |
| 2649 emit_optional_rex_32(src, dst); |
| 2650 emit(0x0F); |
| 2651 emit(0x3A); |
| 2652 emit(0x16); |
| 2653 emit_sse_operand(src, dst); |
| 2654 emit(imm8); |
| 2655 } |
| 2656 |
| 2657 |
| 2658 void Assembler::pinsrd(XMMRegister dst, Register src, int8_t imm8) { |
| 2659 DCHECK(IsEnabled(SSE4_1)); |
| 2660 EnsureSpace ensure_space(this); |
| 2661 emit(0x66); |
| 2662 emit_optional_rex_32(dst, src); |
| 2663 emit(0x0F); |
| 2664 emit(0x3A); |
| 2665 emit(0x22); |
| 2666 emit_sse_operand(dst, src); |
| 2667 emit(imm8); |
| 2668 } |
| 2669 |
| 2670 |
| 2671 void Assembler::pinsrd(XMMRegister dst, const Operand& src, int8_t imm8) { |
| 2672 DCHECK(IsEnabled(SSE4_1)); |
| 2673 EnsureSpace ensure_space(this); |
| 2674 emit(0x66); |
| 2675 emit_optional_rex_32(dst, src); |
| 2676 emit(0x0F); |
| 2677 emit(0x3A); |
| 2678 emit(0x22); |
| 2679 emit_sse_operand(dst, src); |
| 2680 emit(imm8); |
| 2681 } |
| 2682 |
| 2683 |
| 2635 void Assembler::movsd(const Operand& dst, XMMRegister src) { | 2684 void Assembler::movsd(const Operand& dst, XMMRegister src) { |
| 2636 EnsureSpace ensure_space(this); | 2685 EnsureSpace ensure_space(this); |
| 2637 emit(0xF2); // double | 2686 emit(0xF2); // double |
| 2638 emit_optional_rex_32(src, dst); | 2687 emit_optional_rex_32(src, dst); |
| 2639 emit(0x0F); | 2688 emit(0x0F); |
| 2640 emit(0x11); // store | 2689 emit(0x11); // store |
| 2641 emit_sse_operand(src, dst); | 2690 emit_sse_operand(src, dst); |
| 2642 } | 2691 } |
| 2643 | 2692 |
| 2644 | 2693 |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3239 void Assembler::pcmpeqd(XMMRegister dst, XMMRegister src) { | 3288 void Assembler::pcmpeqd(XMMRegister dst, XMMRegister src) { |
| 3240 EnsureSpace ensure_space(this); | 3289 EnsureSpace ensure_space(this); |
| 3241 emit(0x66); | 3290 emit(0x66); |
| 3242 emit_optional_rex_32(dst, src); | 3291 emit_optional_rex_32(dst, src); |
| 3243 emit(0x0F); | 3292 emit(0x0F); |
| 3244 emit(0x76); | 3293 emit(0x76); |
| 3245 emit_sse_operand(dst, src); | 3294 emit_sse_operand(dst, src); |
| 3246 } | 3295 } |
| 3247 | 3296 |
| 3248 | 3297 |
| 3298 void Assembler::punpckldq(XMMRegister dst, XMMRegister src) { |
| 3299 EnsureSpace ensure_space(this); |
| 3300 emit(0x66); |
| 3301 emit_optional_rex_32(dst, src); |
| 3302 emit(0x0F); |
| 3303 emit(0x62); |
| 3304 emit_sse_operand(dst, src); |
| 3305 } |
| 3306 |
| 3307 |
| 3308 void Assembler::punpckhdq(XMMRegister dst, XMMRegister src) { |
| 3309 EnsureSpace ensure_space(this); |
| 3310 emit(0x66); |
| 3311 emit_optional_rex_32(dst, src); |
| 3312 emit(0x0F); |
| 3313 emit(0x6A); |
| 3314 emit_sse_operand(dst, src); |
| 3315 } |
| 3316 |
| 3317 |
| 3249 // AVX instructions | 3318 // AVX instructions |
| 3250 void Assembler::vfmasd(byte op, XMMRegister dst, XMMRegister src1, | 3319 void Assembler::vfmasd(byte op, XMMRegister dst, XMMRegister src1, |
| 3251 XMMRegister src2) { | 3320 XMMRegister src2) { |
| 3252 DCHECK(IsEnabled(FMA3)); | 3321 DCHECK(IsEnabled(FMA3)); |
| 3253 EnsureSpace ensure_space(this); | 3322 EnsureSpace ensure_space(this); |
| 3254 emit_vex_prefix(dst, src1, src2, kLIG, k66, k0F38, kW1); | 3323 emit_vex_prefix(dst, src1, src2, kLIG, k66, k0F38, kW1); |
| 3255 emit(op); | 3324 emit(op); |
| 3256 emit_sse_operand(dst, src2); | 3325 emit_sse_operand(dst, src2); |
| 3257 } | 3326 } |
| 3258 | 3327 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3413 | 3482 |
| 3414 | 3483 |
| 3415 bool RelocInfo::IsInConstantPool() { | 3484 bool RelocInfo::IsInConstantPool() { |
| 3416 return false; | 3485 return false; |
| 3417 } | 3486 } |
| 3418 | 3487 |
| 3419 | 3488 |
| 3420 } } // namespace v8::internal | 3489 } } // namespace v8::internal |
| 3421 | 3490 |
| 3422 #endif // V8_TARGET_ARCH_X64 | 3491 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |