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

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

Issue 1413013003: [x64] Implement vcvtqsi2sd AVX instruction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/test-assembler-x64.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 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 CpuFeatureScope scope(this, AVX); 844 CpuFeatureScope scope(this, AVX);
845 vxorpd(dst, dst, dst); 845 vxorpd(dst, dst, dst);
846 vcvtlsi2sd(dst, dst, src); 846 vcvtlsi2sd(dst, dst, src);
847 } else { 847 } else {
848 xorpd(dst, dst); 848 xorpd(dst, dst);
849 cvtlsi2sd(dst, src); 849 cvtlsi2sd(dst, src);
850 } 850 }
851 } 851 }
852 852
853 853
854 void MacroAssembler::Cvtqsi2sd(XMMRegister dst, Register src) {
855 if (CpuFeatures::IsSupported(AVX)) {
856 CpuFeatureScope scope(this, AVX);
857 vxorpd(dst, dst, dst);
858 vcvtqsi2sd(dst, dst, src);
859 } else {
860 xorpd(dst, dst);
861 cvtqsi2sd(dst, src);
862 }
863 }
864
865
854 void MacroAssembler::Cvttsd2si(Register dst, XMMRegister src) { 866 void MacroAssembler::Cvttsd2si(Register dst, XMMRegister src) {
855 if (CpuFeatures::IsSupported(AVX)) { 867 if (CpuFeatures::IsSupported(AVX)) {
856 CpuFeatureScope scope(this, AVX); 868 CpuFeatureScope scope(this, AVX);
857 vcvttsd2si(dst, src); 869 vcvttsd2si(dst, src);
858 } else { 870 } else {
859 cvttsd2si(dst, src); 871 cvttsd2si(dst, src);
860 } 872 }
861 } 873 }
862 874
863 875
(...skipping 2586 matching lines...) Expand 10 before | Expand all | Expand 10 after
3450 bind(&done); 3462 bind(&done);
3451 } 3463 }
3452 3464
3453 3465
3454 void MacroAssembler::LoadUint32(XMMRegister dst, 3466 void MacroAssembler::LoadUint32(XMMRegister dst,
3455 Register src) { 3467 Register src) {
3456 if (FLAG_debug_code) { 3468 if (FLAG_debug_code) {
3457 cmpq(src, Immediate(0xffffffff)); 3469 cmpq(src, Immediate(0xffffffff));
3458 Assert(below_equal, kInputGPRIsExpectedToHaveUpper32Cleared); 3470 Assert(below_equal, kInputGPRIsExpectedToHaveUpper32Cleared);
3459 } 3471 }
3460 cvtqsi2sd(dst, src); 3472 Cvtqsi2sd(dst, src);
3461 } 3473 }
3462 3474
3463 3475
3464 void MacroAssembler::SlowTruncateToI(Register result_reg, 3476 void MacroAssembler::SlowTruncateToI(Register result_reg,
3465 Register input_reg, 3477 Register input_reg,
3466 int offset) { 3478 int offset) {
3467 DoubleToIStub stub(isolate(), input_reg, result_reg, offset, true); 3479 DoubleToIStub stub(isolate(), input_reg, result_reg, offset, true);
3468 call(stub.GetCode(), RelocInfo::CODE_TARGET); 3480 call(stub.GetCode(), RelocInfo::CODE_TARGET);
3469 } 3481 }
3470 3482
(...skipping 1879 matching lines...) Expand 10 before | Expand all | Expand 10 after
5350 movl(rax, dividend); 5362 movl(rax, dividend);
5351 shrl(rax, Immediate(31)); 5363 shrl(rax, Immediate(31));
5352 addl(rdx, rax); 5364 addl(rdx, rax);
5353 } 5365 }
5354 5366
5355 5367
5356 } // namespace internal 5368 } // namespace internal
5357 } // namespace v8 5369 } // namespace v8
5358 5370
5359 #endif // V8_TARGET_ARCH_X64 5371 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/test-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698