Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 1584663007: [turbofan] Implement rounding of floats on x64 and ia32 without sse4.1. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 void MacroAssembler::Cvttss2siq(Register dst, const Operand& src) { 951 void MacroAssembler::Cvttss2siq(Register dst, const Operand& src) {
952 if (CpuFeatures::IsSupported(AVX)) { 952 if (CpuFeatures::IsSupported(AVX)) {
953 CpuFeatureScope scope(this, AVX); 953 CpuFeatureScope scope(this, AVX);
954 vcvttss2siq(dst, src); 954 vcvttss2siq(dst, src);
955 } else { 955 } else {
956 cvttss2siq(dst, src); 956 cvttss2siq(dst, src);
957 } 957 }
958 } 958 }
959 959
960 960
961 void MacroAssembler::Cvtss2siq(Register dst, XMMRegister src) {
962 if (CpuFeatures::IsSupported(AVX)) {
963 CpuFeatureScope scope(this, AVX);
964 vcvtss2siq(dst, src);
965 } else {
966 cvtss2siq(dst, src);
967 }
968 }
969
970
971 void MacroAssembler::Cvtss2siq(Register dst, const Operand& src) {
972 if (CpuFeatures::IsSupported(AVX)) {
973 CpuFeatureScope scope(this, AVX);
974 vcvtss2siq(dst, src);
975 } else {
976 cvtss2siq(dst, src);
977 }
978 }
979
980
981 void MacroAssembler::Cvtsd2siq(Register dst, XMMRegister src) {
982 if (CpuFeatures::IsSupported(AVX)) {
983 CpuFeatureScope scope(this, AVX);
984 vcvtsd2siq(dst, src);
985 } else {
986 cvtsd2siq(dst, src);
987 }
988 }
989
990
991 void MacroAssembler::Cvtsd2siq(Register dst, const Operand& src) {
992 if (CpuFeatures::IsSupported(AVX)) {
993 CpuFeatureScope scope(this, AVX);
994 vcvtsd2siq(dst, src);
995 } else {
996 cvtsd2siq(dst, src);
997 }
998 }
999
1000
961 void MacroAssembler::Cvttsd2siq(Register dst, XMMRegister src) { 1001 void MacroAssembler::Cvttsd2siq(Register dst, XMMRegister src) {
962 if (CpuFeatures::IsSupported(AVX)) { 1002 if (CpuFeatures::IsSupported(AVX)) {
963 CpuFeatureScope scope(this, AVX); 1003 CpuFeatureScope scope(this, AVX);
964 vcvttsd2siq(dst, src); 1004 vcvttsd2siq(dst, src);
965 } else { 1005 } else {
966 cvttsd2siq(dst, src); 1006 cvttsd2siq(dst, src);
967 } 1007 }
968 } 1008 }
969 1009
970 1010
(...skipping 4486 matching lines...) Expand 10 before | Expand all | Expand 10 after
5457 movl(rax, dividend); 5497 movl(rax, dividend);
5458 shrl(rax, Immediate(31)); 5498 shrl(rax, Immediate(31));
5459 addl(rdx, rax); 5499 addl(rdx, rax);
5460 } 5500 }
5461 5501
5462 5502
5463 } // namespace internal 5503 } // namespace internal
5464 } // namespace v8 5504 } // namespace v8
5465 5505
5466 #endif // V8_TARGET_ARCH_X64 5506 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698