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

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

Issue 974313002: [turbofan] Support for %_DoubleHi, %_DoubleLo and %_ConstructDouble. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed Svens comment. Created 5 years, 9 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/division-by-constant.h" 10 #include "src/base/division-by-constant.h"
(...skipping 2814 matching lines...) Expand 10 before | Expand all | Expand 10 after
2825 #endif 2825 #endif
2826 DCHECK(RelocInfo::IsCodeTarget(rmode) || 2826 DCHECK(RelocInfo::IsCodeTarget(rmode) ||
2827 rmode == RelocInfo::CODE_AGE_SEQUENCE); 2827 rmode == RelocInfo::CODE_AGE_SEQUENCE);
2828 call(code_object, rmode, ast_id); 2828 call(code_object, rmode, ast_id);
2829 #ifdef DEBUG 2829 #ifdef DEBUG
2830 CHECK_EQ(end_position, pc_offset()); 2830 CHECK_EQ(end_position, pc_offset());
2831 #endif 2831 #endif
2832 } 2832 }
2833 2833
2834 2834
2835 void MacroAssembler::Pextrd(Register dst, XMMRegister src, int8_t imm8) {
2836 if (imm8 == 0) {
2837 movd(dst, src);
2838 return;
2839 }
2840 DCHECK_EQ(1, imm8);
2841 if (CpuFeatures::IsSupported(SSE4_1)) {
2842 CpuFeatureScope sse_scope(this, SSE4_1);
2843 pextrd(dst, src, imm8);
2844 return;
2845 }
2846 movq(dst, src);
2847 shrq(dst, Immediate(32));
2848 }
2849
2850
2851 void MacroAssembler::Pinsrd(XMMRegister dst, Register src, int8_t imm8) {
2852 if (CpuFeatures::IsSupported(SSE4_1)) {
2853 CpuFeatureScope sse_scope(this, SSE4_1);
2854 pinsrd(dst, src, imm8);
2855 return;
2856 }
2857 movd(xmm0, src);
2858 if (imm8 == 1) {
2859 punpckldq(dst, xmm0);
2860 } else {
2861 DCHECK_EQ(0, imm8);
2862 psrlq(dst, 32);
2863 punpckldq(xmm0, dst);
2864 movaps(dst, xmm0);
2865 }
2866 }
2867
2868
2869 void MacroAssembler::Pinsrd(XMMRegister dst, const Operand& src, int8_t imm8) {
2870 DCHECK(imm8 == 0 || imm8 == 1);
2871 if (CpuFeatures::IsSupported(SSE4_1)) {
2872 CpuFeatureScope sse_scope(this, SSE4_1);
2873 pinsrd(dst, src, imm8);
2874 return;
2875 }
2876 movd(xmm0, src);
2877 if (imm8 == 1) {
2878 punpckldq(dst, xmm0);
2879 } else {
2880 DCHECK_EQ(0, imm8);
2881 psrlq(dst, 32);
2882 punpckldq(xmm0, dst);
2883 movaps(dst, xmm0);
2884 }
2885 }
2886
2887
2835 void MacroAssembler::Pushad() { 2888 void MacroAssembler::Pushad() {
2836 Push(rax); 2889 Push(rax);
2837 Push(rcx); 2890 Push(rcx);
2838 Push(rdx); 2891 Push(rdx);
2839 Push(rbx); 2892 Push(rbx);
2840 // Not pushing rsp or rbp. 2893 // Not pushing rsp or rbp.
2841 Push(rsi); 2894 Push(rsi);
2842 Push(rdi); 2895 Push(rdi);
2843 Push(r8); 2896 Push(r8);
2844 Push(r9); 2897 Push(r9);
(...skipping 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after
5034 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); 5087 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift));
5035 movl(rax, dividend); 5088 movl(rax, dividend);
5036 shrl(rax, Immediate(31)); 5089 shrl(rax, Immediate(31));
5037 addl(rdx, rax); 5090 addl(rdx, rax);
5038 } 5091 }
5039 5092
5040 5093
5041 } } // namespace v8::internal 5094 } } // namespace v8::internal
5042 5095
5043 #endif // V8_TARGET_ARCH_X64 5096 #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