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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 void MacroAssembler::Cvttsd2si(Register dst, const Operand& src) { | 960 void MacroAssembler::Cvttsd2si(Register dst, const Operand& src) { |
961 if (CpuFeatures::IsSupported(AVX)) { | 961 if (CpuFeatures::IsSupported(AVX)) { |
962 CpuFeatureScope scope(this, AVX); | 962 CpuFeatureScope scope(this, AVX); |
963 vcvttsd2si(dst, src); | 963 vcvttsd2si(dst, src); |
964 } else { | 964 } else { |
965 cvttsd2si(dst, src); | 965 cvttsd2si(dst, src); |
966 } | 966 } |
967 } | 967 } |
968 | 968 |
969 | 969 |
| 970 void MacroAssembler::Cvttss2siq(Register dst, XMMRegister src) { |
| 971 if (CpuFeatures::IsSupported(AVX)) { |
| 972 CpuFeatureScope scope(this, AVX); |
| 973 vcvttss2siq(dst, src); |
| 974 } else { |
| 975 cvttss2siq(dst, src); |
| 976 } |
| 977 } |
| 978 |
| 979 |
| 980 void MacroAssembler::Cvttss2siq(Register dst, const Operand& src) { |
| 981 if (CpuFeatures::IsSupported(AVX)) { |
| 982 CpuFeatureScope scope(this, AVX); |
| 983 vcvttss2siq(dst, src); |
| 984 } else { |
| 985 cvttss2siq(dst, src); |
| 986 } |
| 987 } |
| 988 |
| 989 |
970 void MacroAssembler::Cvttsd2siq(Register dst, XMMRegister src) { | 990 void MacroAssembler::Cvttsd2siq(Register dst, XMMRegister src) { |
971 if (CpuFeatures::IsSupported(AVX)) { | 991 if (CpuFeatures::IsSupported(AVX)) { |
972 CpuFeatureScope scope(this, AVX); | 992 CpuFeatureScope scope(this, AVX); |
973 vcvttsd2siq(dst, src); | 993 vcvttsd2siq(dst, src); |
974 } else { | 994 } else { |
975 cvttsd2siq(dst, src); | 995 cvttsd2siq(dst, src); |
976 } | 996 } |
977 } | 997 } |
978 | 998 |
979 | 999 |
(...skipping 4544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5524 movl(rax, dividend); | 5544 movl(rax, dividend); |
5525 shrl(rax, Immediate(31)); | 5545 shrl(rax, Immediate(31)); |
5526 addl(rdx, rax); | 5546 addl(rdx, rax); |
5527 } | 5547 } |
5528 | 5548 |
5529 | 5549 |
5530 } // namespace internal | 5550 } // namespace internal |
5531 } // namespace v8 | 5551 } // namespace v8 |
5532 | 5552 |
5533 #endif // V8_TARGET_ARCH_X64 | 5553 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |