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

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

Issue 2139513002: [Turbofan] Support 128 bit moves/swaps for x64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Macroassembler supports xorps/vxorps. Created 4 years, 5 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-disasm-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 2700 matching lines...) Expand 10 before | Expand all | Expand 10 after
2711 2711
2712 void MacroAssembler::Movaps(XMMRegister dst, XMMRegister src) { 2712 void MacroAssembler::Movaps(XMMRegister dst, XMMRegister src) {
2713 if (CpuFeatures::IsSupported(AVX)) { 2713 if (CpuFeatures::IsSupported(AVX)) {
2714 CpuFeatureScope scope(this, AVX); 2714 CpuFeatureScope scope(this, AVX);
2715 vmovaps(dst, src); 2715 vmovaps(dst, src);
2716 } else { 2716 } else {
2717 movaps(dst, src); 2717 movaps(dst, src);
2718 } 2718 }
2719 } 2719 }
2720 2720
2721 void MacroAssembler::Movups(XMMRegister dst, XMMRegister src) {
2722 if (CpuFeatures::IsSupported(AVX)) {
2723 CpuFeatureScope scope(this, AVX);
2724 vmovups(dst, src);
2725 } else {
2726 movups(dst, src);
2727 }
2728 }
2729
2730 void MacroAssembler::Movups(XMMRegister dst, const Operand& src) {
2731 if (CpuFeatures::IsSupported(AVX)) {
2732 CpuFeatureScope scope(this, AVX);
2733 vmovups(dst, src);
2734 } else {
2735 movups(dst, src);
2736 }
2737 }
2738
2739 void MacroAssembler::Movups(const Operand& dst, XMMRegister src) {
2740 if (CpuFeatures::IsSupported(AVX)) {
2741 CpuFeatureScope scope(this, AVX);
2742 vmovups(dst, src);
2743 } else {
2744 movups(dst, src);
2745 }
2746 }
2721 2747
2722 void MacroAssembler::Movapd(XMMRegister dst, XMMRegister src) { 2748 void MacroAssembler::Movapd(XMMRegister dst, XMMRegister src) {
2723 if (CpuFeatures::IsSupported(AVX)) { 2749 if (CpuFeatures::IsSupported(AVX)) {
2724 CpuFeatureScope scope(this, AVX); 2750 CpuFeatureScope scope(this, AVX);
2725 vmovapd(dst, src); 2751 vmovapd(dst, src);
2726 } else { 2752 } else {
2727 movapd(dst, src); 2753 movapd(dst, src);
2728 } 2754 }
2729 } 2755 }
2730 2756
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
2841 2867
2842 void MacroAssembler::Movmskpd(Register dst, XMMRegister src) { 2868 void MacroAssembler::Movmskpd(Register dst, XMMRegister src) {
2843 if (CpuFeatures::IsSupported(AVX)) { 2869 if (CpuFeatures::IsSupported(AVX)) {
2844 CpuFeatureScope scope(this, AVX); 2870 CpuFeatureScope scope(this, AVX);
2845 vmovmskpd(dst, src); 2871 vmovmskpd(dst, src);
2846 } else { 2872 } else {
2847 movmskpd(dst, src); 2873 movmskpd(dst, src);
2848 } 2874 }
2849 } 2875 }
2850 2876
2877 void MacroAssembler::Xorps(XMMRegister dst, XMMRegister src) {
2878 if (CpuFeatures::IsSupported(AVX)) {
2879 CpuFeatureScope scope(this, AVX);
2880 vxorps(dst, kScratchDoubleReg, src);
2881 } else {
2882 xorps(dst, src);
2883 }
2884 }
2885
2886 void MacroAssembler::Xorps(XMMRegister dst, const Operand& src) {
2887 if (CpuFeatures::IsSupported(AVX)) {
2888 CpuFeatureScope scope(this, AVX);
2889 vxorps(dst, kScratchDoubleReg, src);
2890 } else {
2891 xorps(dst, src);
2892 }
2893 }
2851 2894
2852 void MacroAssembler::Roundss(XMMRegister dst, XMMRegister src, 2895 void MacroAssembler::Roundss(XMMRegister dst, XMMRegister src,
2853 RoundingMode mode) { 2896 RoundingMode mode) {
2854 if (CpuFeatures::IsSupported(AVX)) { 2897 if (CpuFeatures::IsSupported(AVX)) {
2855 CpuFeatureScope scope(this, AVX); 2898 CpuFeatureScope scope(this, AVX);
2856 vroundss(dst, dst, src, mode); 2899 vroundss(dst, dst, src, mode);
2857 } else { 2900 } else {
2858 roundss(dst, src, mode); 2901 roundss(dst, src, mode);
2859 } 2902 }
2860 } 2903 }
(...skipping 2872 matching lines...) Expand 10 before | Expand all | Expand 10 after
5733 movl(rax, dividend); 5776 movl(rax, dividend);
5734 shrl(rax, Immediate(31)); 5777 shrl(rax, Immediate(31));
5735 addl(rdx, rax); 5778 addl(rdx, rax);
5736 } 5779 }
5737 5780
5738 5781
5739 } // namespace internal 5782 } // namespace internal
5740 } // namespace v8 5783 } // namespace v8
5741 5784
5742 #endif // V8_TARGET_ARCH_X64 5785 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/test-disasm-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698