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

Side by Side Diff: src/ic/arm/ic-arm.cc

Issue 1255883002: VectorICs: vector [keyed]store ic MISS handling infrastructure. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix nit. Created 5 years, 4 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/arm/macro-assembler-arm.h ('k') | src/ic/arm64/ic-arm64.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_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 r3); 457 r3);
458 __ Ret(); 458 __ Ret();
459 459
460 __ bind(&index_name); 460 __ bind(&index_name);
461 __ IndexFromHash(r3, key); 461 __ IndexFromHash(r3, key);
462 // Now jump to the place where smi keys are handled. 462 // Now jump to the place where smi keys are handled.
463 __ jmp(&index_smi); 463 __ jmp(&index_smi);
464 } 464 }
465 465
466 466
467 static void StoreIC_PushArgs(MacroAssembler* masm) {
468 if (FLAG_vector_stores) {
469 __ Push(StoreDescriptor::ReceiverRegister(),
470 StoreDescriptor::NameRegister(), StoreDescriptor::ValueRegister(),
471 VectorStoreICDescriptor::SlotRegister(),
472 VectorStoreICDescriptor::VectorRegister());
473 } else {
474 __ Push(StoreDescriptor::ReceiverRegister(),
475 StoreDescriptor::NameRegister(), StoreDescriptor::ValueRegister());
476 }
477 }
478
479
467 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { 480 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
468 // Push receiver, key and value for runtime call. 481 StoreIC_PushArgs(masm);
469 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
470 StoreDescriptor::ValueRegister());
471 482
472 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 3, 1); 483 int args = FLAG_vector_stores ? 5 : 3;
484 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, args, 1);
473 } 485 }
474 486
475 487
476 static void KeyedStoreGenerateMegamorphicHelper( 488 static void KeyedStoreGenerateMegamorphicHelper(
477 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, 489 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow,
478 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length, 490 KeyedStoreCheckMap check_map, KeyedStoreIncrementLength increment_length,
479 Register value, Register key, Register receiver, Register receiver_map, 491 Register value, Register key, Register receiver, Register receiver_map,
480 Register elements_map, Register elements) { 492 Register elements_map, Register elements) {
481 Label transition_smi_elements; 493 Label transition_smi_elements;
482 Label finish_object_store, non_double_value, transition_double_elements; 494 Label finish_object_store, non_double_value, transition_double_elements;
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 772
761 masm->isolate()->stub_cache()->GenerateProbe( 773 masm->isolate()->stub_cache()->GenerateProbe(
762 masm, Code::STORE_IC, flags, false, receiver, name, r3, r4, r5, r6); 774 masm, Code::STORE_IC, flags, false, receiver, name, r3, r4, r5, r6);
763 775
764 // Cache miss: Jump to runtime. 776 // Cache miss: Jump to runtime.
765 GenerateMiss(masm); 777 GenerateMiss(masm);
766 } 778 }
767 779
768 780
769 void StoreIC::GenerateMiss(MacroAssembler* masm) { 781 void StoreIC::GenerateMiss(MacroAssembler* masm) {
770 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 782 StoreIC_PushArgs(masm);
771 StoreDescriptor::ValueRegister());
772 783
773 // Perform tail call to the entry. 784 // Perform tail call to the entry.
774 __ TailCallRuntime(Runtime::kStoreIC_Miss, 3, 1); 785 int args = FLAG_vector_stores ? 5 : 3;
786 __ TailCallRuntime(Runtime::kStoreIC_Miss, args, 1);
775 } 787 }
776 788
777 789
778 void StoreIC::GenerateNormal(MacroAssembler* masm) { 790 void StoreIC::GenerateNormal(MacroAssembler* masm) {
779 Label miss; 791 Label miss;
780 Register receiver = StoreDescriptor::ReceiverRegister(); 792 Register receiver = StoreDescriptor::ReceiverRegister();
781 Register name = StoreDescriptor::NameRegister(); 793 Register name = StoreDescriptor::NameRegister();
782 Register value = StoreDescriptor::ValueRegister(); 794 Register value = StoreDescriptor::ValueRegister();
783 Register dictionary = r3; 795 Register dictionary = r3;
784 DCHECK(receiver.is(r1)); 796 DCHECK(receiver.is(r1));
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 patcher.EmitCondition(ne); 901 patcher.EmitCondition(ne);
890 } else { 902 } else {
891 DCHECK(Assembler::GetCondition(branch_instr) == ne); 903 DCHECK(Assembler::GetCondition(branch_instr) == ne);
892 patcher.EmitCondition(eq); 904 patcher.EmitCondition(eq);
893 } 905 }
894 } 906 }
895 } // namespace internal 907 } // namespace internal
896 } // namespace v8 908 } // namespace v8
897 909
898 #endif // V8_TARGET_ARCH_ARM 910 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/ic/arm64/ic-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698