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

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

Issue 1420543003: [x64] Implement vsqrtsd AVX instruction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/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 2651 matching lines...) Expand 10 before | Expand all | Expand 10 after
2662 void MacroAssembler::Movmskpd(Register dst, XMMRegister src) { 2662 void MacroAssembler::Movmskpd(Register dst, XMMRegister src) {
2663 if (CpuFeatures::IsSupported(AVX)) { 2663 if (CpuFeatures::IsSupported(AVX)) {
2664 CpuFeatureScope scope(this, AVX); 2664 CpuFeatureScope scope(this, AVX);
2665 vmovmskpd(dst, src); 2665 vmovmskpd(dst, src);
2666 } else { 2666 } else {
2667 movmskpd(dst, src); 2667 movmskpd(dst, src);
2668 } 2668 }
2669 } 2669 }
2670 2670
2671 2671
2672 void MacroAssembler::Sqrtsd(XMMRegister dst, XMMRegister src) {
2673 if (CpuFeatures::IsSupported(AVX)) {
2674 CpuFeatureScope scope(this, AVX);
2675 vsqrtsd(dst, dst, src);
2676 } else {
2677 sqrtsd(dst, src);
2678 }
2679 }
2680
2681
2682 void MacroAssembler::Sqrtsd(XMMRegister dst, const Operand& src) {
2683 if (CpuFeatures::IsSupported(AVX)) {
2684 CpuFeatureScope scope(this, AVX);
2685 vsqrtsd(dst, dst, src);
2686 } else {
2687 sqrtsd(dst, src);
2688 }
2689 }
2690
2691
2672 void MacroAssembler::Ucomiss(XMMRegister src1, XMMRegister src2) { 2692 void MacroAssembler::Ucomiss(XMMRegister src1, XMMRegister src2) {
2673 if (CpuFeatures::IsSupported(AVX)) { 2693 if (CpuFeatures::IsSupported(AVX)) {
2674 CpuFeatureScope scope(this, AVX); 2694 CpuFeatureScope scope(this, AVX);
2675 vucomiss(src1, src2); 2695 vucomiss(src1, src2);
2676 } else { 2696 } else {
2677 ucomiss(src1, src2); 2697 ucomiss(src1, src2);
2678 } 2698 }
2679 } 2699 }
2680 2700
2681 2701
(...skipping 2697 matching lines...) Expand 10 before | Expand all | Expand 10 after
5379 movl(rax, dividend); 5399 movl(rax, dividend);
5380 shrl(rax, Immediate(31)); 5400 shrl(rax, Immediate(31));
5381 addl(rdx, rax); 5401 addl(rdx, rax);
5382 } 5402 }
5383 5403
5384 5404
5385 } // namespace internal 5405 } // namespace internal
5386 } // namespace v8 5406 } // namespace v8
5387 5407
5388 #endif // V8_TARGET_ARCH_X64 5408 #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