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

Side by Side Diff: src/ic/x64/handler-compiler-x64.cc

Issue 1303053004: Revert of Vector ICs: platform support for vector-based stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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/ic/x64/access-compiler-x64.cc ('k') | src/ic/x64/ic-compiler-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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ic/call-optimization.h" 7 #include "src/ic/call-optimization.h"
8 #include "src/ic/handler-compiler.h" 8 #include "src/ic/handler-compiler.h"
9 #include "src/ic/ic.h" 9 #include "src/ic/ic.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 } 297 }
298 __ ret(0); 298 __ ret(0);
299 } 299 }
300 300
301 301
302 static void StoreIC_PushArgs(MacroAssembler* masm) { 302 static void StoreIC_PushArgs(MacroAssembler* masm) {
303 Register receiver = StoreDescriptor::ReceiverRegister(); 303 Register receiver = StoreDescriptor::ReceiverRegister();
304 Register name = StoreDescriptor::NameRegister(); 304 Register name = StoreDescriptor::NameRegister();
305 Register value = StoreDescriptor::ValueRegister(); 305 Register value = StoreDescriptor::ValueRegister();
306 306
307 if (FLAG_vector_stores) { 307 DCHECK(!rbx.is(receiver) && !rbx.is(name) && !rbx.is(value));
308 Register slot = VectorStoreICDescriptor::SlotRegister();
309 Register vector = VectorStoreICDescriptor::VectorRegister();
310 308
311 __ PopReturnAddressTo(r11); 309 __ PopReturnAddressTo(rbx);
312 __ Push(receiver); 310 __ Push(receiver);
313 __ Push(name); 311 __ Push(name);
314 __ Push(value); 312 __ Push(value);
315 __ Push(slot); 313 __ PushReturnAddressFrom(rbx);
316 __ Push(vector);
317 __ PushReturnAddressFrom(r11);
318 } else {
319 DCHECK(!rbx.is(receiver) && !rbx.is(name) && !rbx.is(value));
320
321 __ PopReturnAddressTo(rbx);
322 __ Push(receiver);
323 __ Push(name);
324 __ Push(value);
325 __ PushReturnAddressFrom(rbx);
326 }
327 } 314 }
328 315
329 316
330 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) { 317 void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
331 // Return address is on the stack. 318 // Return address is on the stack.
332 StoreIC_PushArgs(masm); 319 StoreIC_PushArgs(masm);
333 320
334 // Do tail-call to runtime routine. 321 // Do tail-call to runtime routine.
335 __ TailCallRuntime(Runtime::kStoreIC_Slow, FLAG_vector_stores ? 5 : 3, 1); 322 __ TailCallRuntime(Runtime::kStoreIC_Slow, 3, 1);
336 } 323 }
337 324
338 325
339 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) { 326 void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
340 // Return address is on the stack. 327 // Return address is on the stack.
341 StoreIC_PushArgs(masm); 328 StoreIC_PushArgs(masm);
342 329
343 // Do tail-call to runtime routine. 330 // Do tail-call to runtime routine.
344 __ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, FLAG_vector_stores ? 5 : 3, 331 __ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, 3, 1);
345 1);
346 } 332 }
347 333
348 334
349 #undef __ 335 #undef __
350 #define __ ACCESS_MASM((masm())) 336 #define __ ACCESS_MASM((masm()))
351 337
352 338
353 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, 339 void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label,
354 Handle<Name> name) { 340 Handle<Name> name) {
355 if (!label->is_unused()) { 341 if (!label->is_unused()) {
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 __ bind(&success); 568 __ bind(&success);
583 } 569 }
584 } 570 }
585 571
586 572
587 void NamedStoreHandlerCompiler::FrontendFooter(Handle<Name> name, Label* miss) { 573 void NamedStoreHandlerCompiler::FrontendFooter(Handle<Name> name, Label* miss) {
588 if (!miss->is_unused()) { 574 if (!miss->is_unused()) {
589 Label success; 575 Label success;
590 __ jmp(&success); 576 __ jmp(&success);
591 GenerateRestoreName(miss, name); 577 GenerateRestoreName(miss, name);
592 if (IC::ICUseVector(kind())) PopVectorAndSlot();
593 TailCallBuiltin(masm(), MissBuiltin(kind())); 578 TailCallBuiltin(masm(), MissBuiltin(kind()));
594 __ bind(&success); 579 __ bind(&success);
595 } 580 }
596 } 581 }
597 582
598 583
599 void NamedLoadHandlerCompiler::GenerateLoadCallback( 584 void NamedLoadHandlerCompiler::GenerateLoadCallback(
600 Register reg, Handle<ExecutableAccessorInfo> callback) { 585 Register reg, Handle<ExecutableAccessorInfo> callback) {
601 // Insert additional parameters into the stack frame above return address. 586 // Insert additional parameters into the stack frame above return address.
602 DCHECK(!scratch4().is(reg)); 587 DCHECK(!scratch4().is(reg));
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 // Return the generated code. 796 // Return the generated code.
812 return GetCode(kind(), Code::NORMAL, name); 797 return GetCode(kind(), Code::NORMAL, name);
813 } 798 }
814 799
815 800
816 #undef __ 801 #undef __
817 } // namespace internal 802 } // namespace internal
818 } // namespace v8 803 } // namespace v8
819 804
820 #endif // V8_TARGET_ARCH_X64 805 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ic/x64/access-compiler-x64.cc ('k') | src/ic/x64/ic-compiler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698