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

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

Issue 1328603003: Vector ICs: platform support for vector-based stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mips build fixes. 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/mips64/ic-compiler-mips64.cc ('k') | src/ic/mips64/stub-cache-mips64.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 #include "src/codegen.h" 7 #include "src/codegen.h"
8 #include "src/ic/ic.h" 8 #include "src/ic/ic.h"
9 #include "src/ic/ic-compiler.h" 9 #include "src/ic/ic-compiler.h"
10 #include "src/ic/stub-cache.h" 10 #include "src/ic/stub-cache.h"
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 // Never returns to here. 670 // Never returns to here.
671 671
672 __ bind(&maybe_name_key); 672 __ bind(&maybe_name_key);
673 __ ld(a4, FieldMemOperand(key, HeapObject::kMapOffset)); 673 __ ld(a4, FieldMemOperand(key, HeapObject::kMapOffset));
674 __ lb(a4, FieldMemOperand(a4, Map::kInstanceTypeOffset)); 674 __ lb(a4, FieldMemOperand(a4, Map::kInstanceTypeOffset));
675 __ JumpIfNotUniqueNameInstanceType(a4, &slow); 675 __ JumpIfNotUniqueNameInstanceType(a4, &slow);
676 676
677 if (FLAG_vector_stores) { 677 if (FLAG_vector_stores) {
678 // The handlers in the stub cache expect a vector and slot. Since we won't 678 // The handlers in the stub cache expect a vector and slot. Since we won't
679 // change the IC from any downstream misses, a dummy vector can be used. 679 // change the IC from any downstream misses, a dummy vector can be used.
680 Register vector = LoadWithVectorDescriptor::VectorRegister(); 680 Register vector = VectorStoreICDescriptor::VectorRegister();
681 Register slot = LoadWithVectorDescriptor::SlotRegister(); 681 Register slot = VectorStoreICDescriptor::SlotRegister();
682 DCHECK(!AreAliased(vector, slot, a3, a4, a5, a6)); 682
683 DCHECK(!AreAliased(vector, slot, a5, a6, a7, t0));
683 Handle<TypeFeedbackVector> dummy_vector = 684 Handle<TypeFeedbackVector> dummy_vector =
684 TypeFeedbackVector::DummyVector(masm->isolate()); 685 TypeFeedbackVector::DummyVector(masm->isolate());
685 int slot_index = dummy_vector->GetIndex( 686 int slot_index = dummy_vector->GetIndex(
686 FeedbackVectorICSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); 687 FeedbackVectorICSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot));
687 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); 688 __ LoadRoot(vector, Heap::kDummyVectorRootIndex);
688 __ li(slot, Operand(Smi::FromInt(slot_index))); 689 __ li(slot, Operand(Smi::FromInt(slot_index)));
689 } 690 }
690 691
691 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 692 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
692 Code::ComputeHandlerFlags(Code::STORE_IC)); 693 Code::ComputeHandlerFlags(Code::STORE_IC));
693 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags, 694 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags,
694 receiver, key, a3, a4, a5, a6); 695 receiver, key, a5, a6, a7, t0);
695 // Cache miss. 696 // Cache miss.
696 __ Branch(&miss); 697 __ Branch(&miss);
697 698
698 // Extra capacity case: Check if there is extra capacity to 699 // Extra capacity case: Check if there is extra capacity to
699 // perform the store and update the length. Used for adding one 700 // perform the store and update the length. Used for adding one
700 // element to the array by writing to array[array.length]. 701 // element to the array by writing to array[array.length].
701 __ bind(&extra); 702 __ bind(&extra);
702 // Condition code from comparing key and array length is still available. 703 // Condition code from comparing key and array length is still available.
703 // Only support writing to array[array.length]. 704 // Only support writing to array[array.length].
704 __ Branch(&slow, ne, key, Operand(a4)); 705 __ Branch(&slow, ne, key, Operand(a4));
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 int args = FLAG_vector_stores ? 5 : 3; 786 int args = FLAG_vector_stores ? 5 : 3;
786 __ TailCallRuntime(Runtime::kStoreIC_Miss, args, 1); 787 __ TailCallRuntime(Runtime::kStoreIC_Miss, args, 1);
787 } 788 }
788 789
789 790
790 void StoreIC::GenerateNormal(MacroAssembler* masm) { 791 void StoreIC::GenerateNormal(MacroAssembler* masm) {
791 Label miss; 792 Label miss;
792 Register receiver = StoreDescriptor::ReceiverRegister(); 793 Register receiver = StoreDescriptor::ReceiverRegister();
793 Register name = StoreDescriptor::NameRegister(); 794 Register name = StoreDescriptor::NameRegister();
794 Register value = StoreDescriptor::ValueRegister(); 795 Register value = StoreDescriptor::ValueRegister();
795 Register dictionary = a3; 796 Register dictionary = a5;
796 DCHECK(!AreAliased(value, receiver, name, dictionary, a4, a5)); 797 DCHECK(!AreAliased(
798 value, receiver, name, VectorStoreICDescriptor::VectorRegister(),
799 VectorStoreICDescriptor::SlotRegister(), dictionary, a6, a7));
797 800
798 __ ld(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); 801 __ ld(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset));
799 802
800 GenerateDictionaryStore(masm, &miss, a3, name, value, a4, a5); 803 GenerateDictionaryStore(masm, &miss, dictionary, name, value, a6, a7);
801 Counters* counters = masm->isolate()->counters(); 804 Counters* counters = masm->isolate()->counters();
802 __ IncrementCounter(counters->store_normal_hit(), 1, a4, a5); 805 __ IncrementCounter(counters->store_normal_hit(), 1, a6, a7);
803 __ Ret(); 806 __ Ret();
804 807
805 __ bind(&miss); 808 __ bind(&miss);
806 __ IncrementCounter(counters->store_normal_miss(), 1, a4, a5); 809 __ IncrementCounter(counters->store_normal_miss(), 1, a6, a7);
807 GenerateMiss(masm); 810 GenerateMiss(masm);
808 } 811 }
809 812
810 813
811 #undef __ 814 #undef __
812 815
813 816
814 Condition CompareIC::ComputeCondition(Token::Value op) { 817 Condition CompareIC::ComputeCondition(Token::Value op) {
815 switch (op) { 818 switch (op) {
816 case Token::EQ_STRICT: 819 case Token::EQ_STRICT:
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 patcher.ChangeBranchCondition(ne); 903 patcher.ChangeBranchCondition(ne);
901 } else { 904 } else {
902 DCHECK(Assembler::IsBne(branch_instr)); 905 DCHECK(Assembler::IsBne(branch_instr));
903 patcher.ChangeBranchCondition(eq); 906 patcher.ChangeBranchCondition(eq);
904 } 907 }
905 } 908 }
906 } // namespace internal 909 } // namespace internal
907 } // namespace v8 910 } // namespace v8
908 911
909 #endif // V8_TARGET_ARCH_MIPS64 912 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/ic/mips64/ic-compiler-mips64.cc ('k') | src/ic/mips64/stub-cache-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698