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

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

Issue 1124443004: New hydrogen instruction to reduce cost of growing an array on keyed stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 5 years, 7 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/lithium-x64.cc ('k') | no next file » | 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 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 if (value == 0) { 918 if (value == 0) {
919 xorl(kScratchRegister, kScratchRegister); 919 xorl(kScratchRegister, kScratchRegister);
920 return kScratchRegister; 920 return kScratchRegister;
921 } 921 }
922 LoadSmiConstant(kScratchRegister, source); 922 LoadSmiConstant(kScratchRegister, source);
923 return kScratchRegister; 923 return kScratchRegister;
924 } 924 }
925 925
926 926
927 void MacroAssembler::LoadSmiConstant(Register dst, Smi* source) { 927 void MacroAssembler::LoadSmiConstant(Register dst, Smi* source) {
928 // Special-casing 0 here to use xorl seems to make things slower, so we don't
929 // do it.
928 Move(dst, source, Assembler::RelocInfoNone()); 930 Move(dst, source, Assembler::RelocInfoNone());
929 } 931 }
930 932
931 933
932 void MacroAssembler::Integer32ToSmi(Register dst, Register src) { 934 void MacroAssembler::Integer32ToSmi(Register dst, Register src) {
933 STATIC_ASSERT(kSmiTag == 0); 935 STATIC_ASSERT(kSmiTag == 0);
934 if (!dst.is(src)) { 936 if (!dst.is(src)) {
935 movl(dst, src); 937 movl(dst, src);
936 } 938 }
937 shlp(dst, Immediate(kSmiShift)); 939 shlp(dst, Immediate(kSmiShift));
(...skipping 4152 matching lines...) Expand 10 before | Expand all | Expand 10 after
5090 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift)); 5092 if (mag.shift > 0) sarl(rdx, Immediate(mag.shift));
5091 movl(rax, dividend); 5093 movl(rax, dividend);
5092 shrl(rax, Immediate(31)); 5094 shrl(rax, Immediate(31));
5093 addl(rdx, rax); 5095 addl(rdx, rax);
5094 } 5096 }
5095 5097
5096 5098
5097 } } // namespace v8::internal 5099 } } // namespace v8::internal
5098 5100
5099 #endif // V8_TARGET_ARCH_X64 5101 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698