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

Side by Side Diff: src/ic/mips64/ic-mips64.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/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 = VectorStoreICDescriptor::VectorRegister(); 680 Register vector = LoadWithVectorDescriptor::VectorRegister();
681 Register slot = VectorStoreICDescriptor::SlotRegister(); 681 Register slot = LoadWithVectorDescriptor::SlotRegister();
682 682 DCHECK(!AreAliased(vector, slot, a3, a4, a5, a6));
683 DCHECK(!AreAliased(vector, slot, a5, a6, a7, t0));
684 Handle<TypeFeedbackVector> dummy_vector = 683 Handle<TypeFeedbackVector> dummy_vector =
685 TypeFeedbackVector::DummyVector(masm->isolate()); 684 TypeFeedbackVector::DummyVector(masm->isolate());
686 int slot_index = dummy_vector->GetIndex( 685 int slot_index = dummy_vector->GetIndex(
687 FeedbackVectorICSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); 686 FeedbackVectorICSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot));
688 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); 687 __ LoadRoot(vector, Heap::kDummyVectorRootIndex);
689 __ li(slot, Operand(Smi::FromInt(slot_index))); 688 __ li(slot, Operand(Smi::FromInt(slot_index)));
690 } 689 }
691 690
692 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 691 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
693 Code::ComputeHandlerFlags(Code::STORE_IC)); 692 Code::ComputeHandlerFlags(Code::STORE_IC));
694 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags, 693 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags,
695 receiver, key, a5, a6, a7, t0); 694 receiver, key, a3, a4, a5, a6);
696 // Cache miss. 695 // Cache miss.
697 __ Branch(&miss); 696 __ Branch(&miss);
698 697
699 // Extra capacity case: Check if there is extra capacity to 698 // Extra capacity case: Check if there is extra capacity to
700 // perform the store and update the length. Used for adding one 699 // perform the store and update the length. Used for adding one
701 // element to the array by writing to array[array.length]. 700 // element to the array by writing to array[array.length].
702 __ bind(&extra); 701 __ bind(&extra);
703 // Condition code from comparing key and array length is still available. 702 // Condition code from comparing key and array length is still available.
704 // Only support writing to array[array.length]. 703 // Only support writing to array[array.length].
705 __ Branch(&slow, ne, key, Operand(a4)); 704 __ Branch(&slow, ne, key, Operand(a4));
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 int args = FLAG_vector_stores ? 5 : 3; 785 int args = FLAG_vector_stores ? 5 : 3;
787 __ TailCallRuntime(Runtime::kStoreIC_Miss, args, 1); 786 __ TailCallRuntime(Runtime::kStoreIC_Miss, args, 1);
788 } 787 }
789 788
790 789
791 void StoreIC::GenerateNormal(MacroAssembler* masm) { 790 void StoreIC::GenerateNormal(MacroAssembler* masm) {
792 Label miss; 791 Label miss;
793 Register receiver = StoreDescriptor::ReceiverRegister(); 792 Register receiver = StoreDescriptor::ReceiverRegister();
794 Register name = StoreDescriptor::NameRegister(); 793 Register name = StoreDescriptor::NameRegister();
795 Register value = StoreDescriptor::ValueRegister(); 794 Register value = StoreDescriptor::ValueRegister();
796 Register dictionary = a5; 795 Register dictionary = a3;
797 DCHECK(!AreAliased( 796 DCHECK(!AreAliased(value, receiver, name, dictionary, a4, a5));
798 value, receiver, name, VectorStoreICDescriptor::VectorRegister(),
799 VectorStoreICDescriptor::SlotRegister(), dictionary, a6, a7));
800 797
801 __ ld(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); 798 __ ld(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset));
802 799
803 GenerateDictionaryStore(masm, &miss, dictionary, name, value, a6, a7); 800 GenerateDictionaryStore(masm, &miss, a3, name, value, a4, a5);
804 Counters* counters = masm->isolate()->counters(); 801 Counters* counters = masm->isolate()->counters();
805 __ IncrementCounter(counters->store_normal_hit(), 1, a6, a7); 802 __ IncrementCounter(counters->store_normal_hit(), 1, a4, a5);
806 __ Ret(); 803 __ Ret();
807 804
808 __ bind(&miss); 805 __ bind(&miss);
809 __ IncrementCounter(counters->store_normal_miss(), 1, a6, a7); 806 __ IncrementCounter(counters->store_normal_miss(), 1, a4, a5);
810 GenerateMiss(masm); 807 GenerateMiss(masm);
811 } 808 }
812 809
813 810
814 #undef __ 811 #undef __
815 812
816 813
817 Condition CompareIC::ComputeCondition(Token::Value op) { 814 Condition CompareIC::ComputeCondition(Token::Value op) {
818 switch (op) { 815 switch (op) {
819 case Token::EQ_STRICT: 816 case Token::EQ_STRICT:
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 patcher.ChangeBranchCondition(ne); 900 patcher.ChangeBranchCondition(ne);
904 } else { 901 } else {
905 DCHECK(Assembler::IsBne(branch_instr)); 902 DCHECK(Assembler::IsBne(branch_instr));
906 patcher.ChangeBranchCondition(eq); 903 patcher.ChangeBranchCondition(eq);
907 } 904 }
908 } 905 }
909 } // namespace internal 906 } // namespace internal
910 } // namespace v8 907 } // namespace v8
911 908
912 #endif // V8_TARGET_ARCH_MIPS64 909 #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