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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
(...skipping 2596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2607 emit_optional_rex_32(dst, src); | 2607 emit_optional_rex_32(dst, src); |
2608 emit(0x0F); | 2608 emit(0x0F); |
2609 emit(0x11); // store | 2609 emit(0x11); // store |
2610 emit_sse_operand(dst, src); | 2610 emit_sse_operand(dst, src); |
2611 } | 2611 } |
2612 | 2612 |
2613 | 2613 |
2614 void Assembler::psllq(XMMRegister reg, byte imm8) { | 2614 void Assembler::psllq(XMMRegister reg, byte imm8) { |
2615 EnsureSpace ensure_space(this); | 2615 EnsureSpace ensure_space(this); |
2616 emit(0x66); | 2616 emit(0x66); |
| 2617 emit_optional_rex_32(reg); |
2617 emit(0x0F); | 2618 emit(0x0F); |
2618 emit(0x73); | 2619 emit(0x73); |
2619 emit_sse_operand(rsi, reg); // rsi == 6 | 2620 emit_sse_operand(rsi, reg); // rsi == 6 |
2620 emit(imm8); | 2621 emit(imm8); |
2621 } | 2622 } |
2622 | 2623 |
2623 | 2624 |
| 2625 void Assembler::psrlq(XMMRegister reg, byte imm8) { |
| 2626 EnsureSpace ensure_space(this); |
| 2627 emit(0x66); |
| 2628 emit_optional_rex_32(reg); |
| 2629 emit(0x0F); |
| 2630 emit(0x73); |
| 2631 emit_sse_operand(rdx, reg); // rdx == 2 |
| 2632 emit(imm8); |
| 2633 } |
| 2634 |
| 2635 |
| 2636 void Assembler::pslld(XMMRegister reg, byte imm8) { |
| 2637 EnsureSpace ensure_space(this); |
| 2638 emit(0x66); |
| 2639 emit_optional_rex_32(reg); |
| 2640 emit(0x0F); |
| 2641 emit(0x72); |
| 2642 emit_sse_operand(rsi, reg); // rsi == 6 |
| 2643 emit(imm8); |
| 2644 } |
| 2645 |
| 2646 |
| 2647 void Assembler::psrld(XMMRegister reg, byte imm8) { |
| 2648 EnsureSpace ensure_space(this); |
| 2649 emit(0x66); |
| 2650 emit_optional_rex_32(reg); |
| 2651 emit(0x0F); |
| 2652 emit(0x72); |
| 2653 emit_sse_operand(rdx, reg); // rdx == 2 |
| 2654 emit(imm8); |
| 2655 } |
| 2656 |
| 2657 |
2624 void Assembler::cvttss2si(Register dst, const Operand& src) { | 2658 void Assembler::cvttss2si(Register dst, const Operand& src) { |
2625 EnsureSpace ensure_space(this); | 2659 EnsureSpace ensure_space(this); |
2626 emit(0xF3); | 2660 emit(0xF3); |
2627 emit_optional_rex_32(dst, src); | 2661 emit_optional_rex_32(dst, src); |
2628 emit(0x0F); | 2662 emit(0x0F); |
2629 emit(0x2C); | 2663 emit(0x2C); |
2630 emit_operand(dst, src); | 2664 emit_operand(dst, src); |
2631 } | 2665 } |
2632 | 2666 |
2633 | 2667 |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2959 | 2993 |
2960 void Assembler::movmskps(Register dst, XMMRegister src) { | 2994 void Assembler::movmskps(Register dst, XMMRegister src) { |
2961 EnsureSpace ensure_space(this); | 2995 EnsureSpace ensure_space(this); |
2962 emit_optional_rex_32(dst, src); | 2996 emit_optional_rex_32(dst, src); |
2963 emit(0x0f); | 2997 emit(0x0f); |
2964 emit(0x50); | 2998 emit(0x50); |
2965 emit_sse_operand(dst, src); | 2999 emit_sse_operand(dst, src); |
2966 } | 3000 } |
2967 | 3001 |
2968 | 3002 |
| 3003 void Assembler::pcmpeqd(XMMRegister dst, XMMRegister src) { |
| 3004 EnsureSpace ensure_space(this); |
| 3005 emit(0x66); |
| 3006 emit_optional_rex_32(dst, src); |
| 3007 emit(0x0F); |
| 3008 emit(0x76); |
| 3009 emit_sse_operand(dst, src); |
| 3010 } |
| 3011 |
| 3012 |
2969 void Assembler::emit_sse_operand(XMMRegister reg, const Operand& adr) { | 3013 void Assembler::emit_sse_operand(XMMRegister reg, const Operand& adr) { |
2970 Register ireg = { reg.code() }; | 3014 Register ireg = { reg.code() }; |
2971 emit_operand(ireg, adr); | 3015 emit_operand(ireg, adr); |
2972 } | 3016 } |
2973 | 3017 |
2974 | 3018 |
2975 void Assembler::emit_sse_operand(Register reg, const Operand& adr) { | 3019 void Assembler::emit_sse_operand(Register reg, const Operand& adr) { |
2976 Register ireg = {reg.code()}; | 3020 Register ireg = {reg.code()}; |
2977 emit_operand(ireg, adr); | 3021 emit_operand(ireg, adr); |
2978 } | 3022 } |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3073 | 3117 |
3074 | 3118 |
3075 bool RelocInfo::IsInConstantPool() { | 3119 bool RelocInfo::IsInConstantPool() { |
3076 return false; | 3120 return false; |
3077 } | 3121 } |
3078 | 3122 |
3079 | 3123 |
3080 } } // namespace v8::internal | 3124 } } // namespace v8::internal |
3081 | 3125 |
3082 #endif // V8_TARGET_ARCH_X64 | 3126 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |