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

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

Issue 1424153003: VectorICs: Remove --vector-stores flag. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Response to Hannes comment. Created 5 years, 1 month 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/x64/access-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 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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 // a1: key. 666 // a1: key.
667 // a2: receiver. 667 // a2: receiver.
668 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode); 668 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode);
669 // Never returns to here. 669 // Never returns to here.
670 670
671 __ bind(&maybe_name_key); 671 __ bind(&maybe_name_key);
672 __ ld(a4, FieldMemOperand(key, HeapObject::kMapOffset)); 672 __ ld(a4, FieldMemOperand(key, HeapObject::kMapOffset));
673 __ lb(a4, FieldMemOperand(a4, Map::kInstanceTypeOffset)); 673 __ lb(a4, FieldMemOperand(a4, Map::kInstanceTypeOffset));
674 __ JumpIfNotUniqueNameInstanceType(a4, &slow); 674 __ JumpIfNotUniqueNameInstanceType(a4, &slow);
675 675
676 if (FLAG_vector_stores) { 676 // The handlers in the stub cache expect a vector and slot. Since we won't
677 // The handlers in the stub cache expect a vector and slot. Since we won't 677 // change the IC from any downstream misses, a dummy vector can be used.
678 // change the IC from any downstream misses, a dummy vector can be used. 678 Register vector = VectorStoreICDescriptor::VectorRegister();
679 Register vector = VectorStoreICDescriptor::VectorRegister(); 679 Register slot = VectorStoreICDescriptor::SlotRegister();
680 Register slot = VectorStoreICDescriptor::SlotRegister();
681 680
682 DCHECK(!AreAliased(vector, slot, a5, a6, a7, t0)); 681 DCHECK(!AreAliased(vector, slot, a5, a6, a7, t0));
683 Handle<TypeFeedbackVector> dummy_vector = 682 Handle<TypeFeedbackVector> dummy_vector =
684 TypeFeedbackVector::DummyVector(masm->isolate()); 683 TypeFeedbackVector::DummyVector(masm->isolate());
685 int slot_index = dummy_vector->GetIndex( 684 int slot_index = dummy_vector->GetIndex(
686 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); 685 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot));
687 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); 686 __ LoadRoot(vector, Heap::kDummyVectorRootIndex);
688 __ li(slot, Operand(Smi::FromInt(slot_index))); 687 __ li(slot, Operand(Smi::FromInt(slot_index)));
689 }
690 688
691 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 689 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
692 Code::ComputeHandlerFlags(Code::STORE_IC)); 690 Code::ComputeHandlerFlags(Code::STORE_IC));
693 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags, 691 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags,
694 receiver, key, a5, a6, a7, t0); 692 receiver, key, a5, a6, a7, t0);
695 // Cache miss. 693 // Cache miss.
696 __ Branch(&miss); 694 __ Branch(&miss);
697 695
698 // Extra capacity case: Check if there is extra capacity to 696 // Extra capacity case: Check if there is extra capacity to
699 // perform the store and update the length. Used for adding one 697 // perform the store and update the length. Used for adding one
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 &fast_double_grow, &slow, kDontCheckMap, 731 &fast_double_grow, &slow, kDontCheckMap,
734 kIncrementLength, value, key, receiver, 732 kIncrementLength, value, key, receiver,
735 receiver_map, elements_map, elements); 733 receiver_map, elements_map, elements);
736 734
737 __ bind(&miss); 735 __ bind(&miss);
738 GenerateMiss(masm); 736 GenerateMiss(masm);
739 } 737 }
740 738
741 739
742 static void StoreIC_PushArgs(MacroAssembler* masm) { 740 static void StoreIC_PushArgs(MacroAssembler* masm) {
743 if (FLAG_vector_stores) { 741 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
744 __ Push(StoreDescriptor::ReceiverRegister(), 742 StoreDescriptor::ValueRegister(),
745 StoreDescriptor::NameRegister(), StoreDescriptor::ValueRegister(), 743 VectorStoreICDescriptor::SlotRegister(),
746 VectorStoreICDescriptor::SlotRegister(), 744 VectorStoreICDescriptor::VectorRegister());
747 VectorStoreICDescriptor::VectorRegister());
748 } else {
749 __ Push(StoreDescriptor::ReceiverRegister(),
750 StoreDescriptor::NameRegister(), StoreDescriptor::ValueRegister());
751 }
752 } 745 }
753 746
754 747
755 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { 748 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) {
756 StoreIC_PushArgs(masm); 749 StoreIC_PushArgs(masm);
757 750
758 int args = FLAG_vector_stores ? 5 : 3; 751 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, 5, 1);
759 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss, args, 1);
760 } 752 }
761 753
762 754
763 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 755 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
764 Register receiver = StoreDescriptor::ReceiverRegister(); 756 Register receiver = StoreDescriptor::ReceiverRegister();
765 Register name = StoreDescriptor::NameRegister(); 757 Register name = StoreDescriptor::NameRegister();
766 DCHECK(receiver.is(a1)); 758 DCHECK(receiver.is(a1));
767 DCHECK(name.is(a2)); 759 DCHECK(name.is(a2));
768 DCHECK(StoreDescriptor::ValueRegister().is(a0)); 760 DCHECK(StoreDescriptor::ValueRegister().is(a0));
769 761
770 // Get the receiver from the stack and probe the stub cache. 762 // Get the receiver from the stack and probe the stub cache.
771 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( 763 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags(
772 Code::ComputeHandlerFlags(Code::STORE_IC)); 764 Code::ComputeHandlerFlags(Code::STORE_IC));
773 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags, 765 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags,
774 receiver, name, a3, a4, a5, a6); 766 receiver, name, a3, a4, a5, a6);
775 767
776 // Cache miss: Jump to runtime. 768 // Cache miss: Jump to runtime.
777 GenerateMiss(masm); 769 GenerateMiss(masm);
778 } 770 }
779 771
780 772
781 void StoreIC::GenerateMiss(MacroAssembler* masm) { 773 void StoreIC::GenerateMiss(MacroAssembler* masm) {
782 StoreIC_PushArgs(masm); 774 StoreIC_PushArgs(masm);
783 775
784 // Perform tail call to the entry. 776 // Perform tail call to the entry.
785 int args = FLAG_vector_stores ? 5 : 3; 777 __ TailCallRuntime(Runtime::kStoreIC_Miss, 5, 1);
786 __ TailCallRuntime(Runtime::kStoreIC_Miss, args, 1);
787 } 778 }
788 779
789 780
790 void StoreIC::GenerateNormal(MacroAssembler* masm) { 781 void StoreIC::GenerateNormal(MacroAssembler* masm) {
791 Label miss; 782 Label miss;
792 Register receiver = StoreDescriptor::ReceiverRegister(); 783 Register receiver = StoreDescriptor::ReceiverRegister();
793 Register name = StoreDescriptor::NameRegister(); 784 Register name = StoreDescriptor::NameRegister();
794 Register value = StoreDescriptor::ValueRegister(); 785 Register value = StoreDescriptor::ValueRegister();
795 Register dictionary = a5; 786 Register dictionary = a5;
796 DCHECK(!AreAliased( 787 DCHECK(!AreAliased(
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 patcher.ChangeBranchCondition(ne); 893 patcher.ChangeBranchCondition(ne);
903 } else { 894 } else {
904 DCHECK(Assembler::IsBne(branch_instr)); 895 DCHECK(Assembler::IsBne(branch_instr));
905 patcher.ChangeBranchCondition(eq); 896 patcher.ChangeBranchCondition(eq);
906 } 897 }
907 } 898 }
908 } // namespace internal 899 } // namespace internal
909 } // namespace v8 900 } // namespace v8
910 901
911 #endif // V8_TARGET_ARCH_MIPS64 902 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/ic/mips64/ic-compiler-mips64.cc ('k') | src/ic/x64/access-compiler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698