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

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

Issue 1583323004: [turbofan] Add the TruncateFloat32ToInt32 operator to turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed a small bug 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
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/compiler/codegen-tester.h » ('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 900 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 void MacroAssembler::Cvtsd2si(Register dst, XMMRegister src) { 911 void MacroAssembler::Cvtsd2si(Register dst, XMMRegister src) {
912 if (CpuFeatures::IsSupported(AVX)) { 912 if (CpuFeatures::IsSupported(AVX)) {
913 CpuFeatureScope scope(this, AVX); 913 CpuFeatureScope scope(this, AVX);
914 vcvtsd2si(dst, src); 914 vcvtsd2si(dst, src);
915 } else { 915 } else {
916 cvtsd2si(dst, src); 916 cvtsd2si(dst, src);
917 } 917 }
918 } 918 }
919 919
920 920
921 void MacroAssembler::Cvttss2si(Register dst, XMMRegister src) {
922 if (CpuFeatures::IsSupported(AVX)) {
923 CpuFeatureScope scope(this, AVX);
924 vcvttss2si(dst, src);
925 } else {
926 cvttss2si(dst, src);
927 }
928 }
929
930
931 void MacroAssembler::Cvttss2si(Register dst, const Operand& src) {
932 if (CpuFeatures::IsSupported(AVX)) {
933 CpuFeatureScope scope(this, AVX);
934 vcvttss2si(dst, src);
935 } else {
936 cvttss2si(dst, src);
937 }
938 }
939
940
921 void MacroAssembler::Cvttsd2si(Register dst, XMMRegister src) { 941 void MacroAssembler::Cvttsd2si(Register dst, XMMRegister src) {
922 if (CpuFeatures::IsSupported(AVX)) { 942 if (CpuFeatures::IsSupported(AVX)) {
923 CpuFeatureScope scope(this, AVX); 943 CpuFeatureScope scope(this, AVX);
924 vcvttsd2si(dst, src); 944 vcvttsd2si(dst, src);
925 } else { 945 } else {
926 cvttsd2si(dst, src); 946 cvttsd2si(dst, src);
927 } 947 }
928 } 948 }
929 949
930 950
(...skipping 4547 matching lines...) Expand 10 before | Expand all | Expand 10 after
5478 movl(rax, dividend); 5498 movl(rax, dividend);
5479 shrl(rax, Immediate(31)); 5499 shrl(rax, Immediate(31));
5480 addl(rdx, rax); 5500 addl(rdx, rax);
5481 } 5501 }
5482 5502
5483 5503
5484 } // namespace internal 5504 } // namespace internal
5485 } // namespace v8 5505 } // namespace v8
5486 5506
5487 #endif // V8_TARGET_ARCH_X64 5507 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/compiler/codegen-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698