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

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

Issue 1589363002: [turbofan] Add the RoundInt32ToFloat32 operator to turbofan. (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
« 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 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 CpuFeatureScope scope(this, AVX); 816 CpuFeatureScope scope(this, AVX);
817 vxorpd(dst, dst, dst); 817 vxorpd(dst, dst, dst);
818 vcvtlsi2sd(dst, dst, src); 818 vcvtlsi2sd(dst, dst, src);
819 } else { 819 } else {
820 xorpd(dst, dst); 820 xorpd(dst, dst);
821 cvtlsi2sd(dst, src); 821 cvtlsi2sd(dst, src);
822 } 822 }
823 } 823 }
824 824
825 825
826 void MacroAssembler::Cvtlsi2ss(XMMRegister dst, Register src) {
827 if (CpuFeatures::IsSupported(AVX)) {
828 CpuFeatureScope scope(this, AVX);
829 vxorps(dst, dst, dst);
830 vcvtlsi2ss(dst, dst, src);
831 } else {
832 xorps(dst, dst);
833 cvtlsi2ss(dst, src);
834 }
835 }
836
837
838 void MacroAssembler::Cvtlsi2ss(XMMRegister dst, const Operand& src) {
839 if (CpuFeatures::IsSupported(AVX)) {
840 CpuFeatureScope scope(this, AVX);
841 vxorps(dst, dst, dst);
842 vcvtlsi2ss(dst, dst, src);
843 } else {
844 xorps(dst, dst);
845 cvtlsi2ss(dst, src);
846 }
847 }
848
849
826 void MacroAssembler::Cvtqsi2ss(XMMRegister dst, Register src) { 850 void MacroAssembler::Cvtqsi2ss(XMMRegister dst, Register src) {
827 if (CpuFeatures::IsSupported(AVX)) { 851 if (CpuFeatures::IsSupported(AVX)) {
828 CpuFeatureScope scope(this, AVX); 852 CpuFeatureScope scope(this, AVX);
829 vxorps(dst, dst, dst); 853 vxorps(dst, dst, dst);
830 vcvtqsi2ss(dst, dst, src); 854 vcvtqsi2ss(dst, dst, src);
831 } else { 855 } else {
832 xorps(dst, dst); 856 xorps(dst, dst);
833 cvtqsi2ss(dst, src); 857 cvtqsi2ss(dst, src);
834 } 858 }
835 } 859 }
(...skipping 4642 matching lines...) Expand 10 before | Expand all | Expand 10 after
5478 movl(rax, dividend); 5502 movl(rax, dividend);
5479 shrl(rax, Immediate(31)); 5503 shrl(rax, Immediate(31));
5480 addl(rdx, rax); 5504 addl(rdx, rax);
5481 } 5505 }
5482 5506
5483 5507
5484 } // namespace internal 5508 } // namespace internal
5485 } // namespace v8 5509 } // namespace v8
5486 5510
5487 #endif // V8_TARGET_ARCH_X64 5511 #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