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

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

Issue 1476063002: [turbofan] Implemented the TruncateFloat32ToInt64 TurboFan operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Increased the type of opcodes from uint8_t to uint16_t. Created 5 years 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
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/compiler/test-run-machops.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/compiler/test-run-machops.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698