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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 CpuFeatureScope scope(this, AVX); | 844 CpuFeatureScope scope(this, AVX); |
845 vxorpd(dst, dst, dst); | 845 vxorpd(dst, dst, dst); |
846 vcvtlsi2sd(dst, dst, src); | 846 vcvtlsi2sd(dst, dst, src); |
847 } else { | 847 } else { |
848 xorpd(dst, dst); | 848 xorpd(dst, dst); |
849 cvtlsi2sd(dst, src); | 849 cvtlsi2sd(dst, src); |
850 } | 850 } |
851 } | 851 } |
852 | 852 |
853 | 853 |
| 854 void MacroAssembler::Cvtqsi2ss(XMMRegister dst, Register src) { |
| 855 if (CpuFeatures::IsSupported(AVX)) { |
| 856 CpuFeatureScope scope(this, AVX); |
| 857 vxorps(dst, dst, dst); |
| 858 vcvtqsi2ss(dst, dst, src); |
| 859 } else { |
| 860 xorps(dst, dst); |
| 861 cvtqsi2ss(dst, src); |
| 862 } |
| 863 } |
| 864 |
| 865 |
| 866 void MacroAssembler::Cvtqsi2ss(XMMRegister dst, const Operand& src) { |
| 867 if (CpuFeatures::IsSupported(AVX)) { |
| 868 CpuFeatureScope scope(this, AVX); |
| 869 vxorps(dst, dst, dst); |
| 870 vcvtqsi2ss(dst, dst, src); |
| 871 } else { |
| 872 xorps(dst, dst); |
| 873 cvtqsi2ss(dst, src); |
| 874 } |
| 875 } |
| 876 |
| 877 |
854 void MacroAssembler::Cvtqsi2sd(XMMRegister dst, Register src) { | 878 void MacroAssembler::Cvtqsi2sd(XMMRegister dst, Register src) { |
855 if (CpuFeatures::IsSupported(AVX)) { | 879 if (CpuFeatures::IsSupported(AVX)) { |
856 CpuFeatureScope scope(this, AVX); | 880 CpuFeatureScope scope(this, AVX); |
857 vxorpd(dst, dst, dst); | 881 vxorpd(dst, dst, dst); |
858 vcvtqsi2sd(dst, dst, src); | 882 vcvtqsi2sd(dst, dst, src); |
859 } else { | 883 } else { |
860 xorpd(dst, dst); | 884 xorpd(dst, dst); |
861 cvtqsi2sd(dst, src); | 885 cvtqsi2sd(dst, src); |
862 } | 886 } |
863 } | 887 } |
(...skipping 4568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5432 movl(rax, dividend); | 5456 movl(rax, dividend); |
5433 shrl(rax, Immediate(31)); | 5457 shrl(rax, Immediate(31)); |
5434 addl(rdx, rax); | 5458 addl(rdx, rax); |
5435 } | 5459 } |
5436 | 5460 |
5437 | 5461 |
5438 } // namespace internal | 5462 } // namespace internal |
5439 } // namespace v8 | 5463 } // namespace v8 |
5440 | 5464 |
5441 #endif // V8_TARGET_ARCH_X64 | 5465 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |