| OLD | NEW |
| 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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode); | 646 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode); |
| 647 // Never returns to here. | 647 // Never returns to here. |
| 648 | 648 |
| 649 __ bind(&maybe_name_key); | 649 __ bind(&maybe_name_key); |
| 650 __ ld(a4, FieldMemOperand(key, HeapObject::kMapOffset)); | 650 __ ld(a4, FieldMemOperand(key, HeapObject::kMapOffset)); |
| 651 __ lb(a4, FieldMemOperand(a4, Map::kInstanceTypeOffset)); | 651 __ lb(a4, FieldMemOperand(a4, Map::kInstanceTypeOffset)); |
| 652 __ JumpIfNotUniqueNameInstanceType(a4, &slow); | 652 __ JumpIfNotUniqueNameInstanceType(a4, &slow); |
| 653 | 653 |
| 654 // The handlers in the stub cache expect a vector and slot. Since we won't | 654 // The handlers in the stub cache expect a vector and slot. Since we won't |
| 655 // change the IC from any downstream misses, a dummy vector can be used. | 655 // change the IC from any downstream misses, a dummy vector can be used. |
| 656 Register vector = VectorStoreICDescriptor::VectorRegister(); | 656 Register vector = StoreWithVectorDescriptor::VectorRegister(); |
| 657 Register slot = VectorStoreICDescriptor::SlotRegister(); | 657 Register slot = StoreWithVectorDescriptor::SlotRegister(); |
| 658 | 658 |
| 659 DCHECK(!AreAliased(vector, slot, a5, a6, a7, t0)); | 659 DCHECK(!AreAliased(vector, slot, a5, a6, a7, t0)); |
| 660 Handle<TypeFeedbackVector> dummy_vector = | 660 Handle<TypeFeedbackVector> dummy_vector = |
| 661 TypeFeedbackVector::DummyVector(masm->isolate()); | 661 TypeFeedbackVector::DummyVector(masm->isolate()); |
| 662 int slot_index = dummy_vector->GetIndex( | 662 int slot_index = dummy_vector->GetIndex( |
| 663 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); | 663 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); |
| 664 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); | 664 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); |
| 665 __ li(slot, Operand(Smi::FromInt(slot_index))); | 665 __ li(slot, Operand(Smi::FromInt(slot_index))); |
| 666 | 666 |
| 667 masm->isolate()->store_stub_cache()->GenerateProbe(masm, receiver, key, a5, | 667 masm->isolate()->store_stub_cache()->GenerateProbe(masm, receiver, key, a5, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 709 receiver_map, elements_map, elements); | 709 receiver_map, elements_map, elements); |
| 710 | 710 |
| 711 __ bind(&miss); | 711 __ bind(&miss); |
| 712 GenerateMiss(masm); | 712 GenerateMiss(masm); |
| 713 } | 713 } |
| 714 | 714 |
| 715 | 715 |
| 716 static void StoreIC_PushArgs(MacroAssembler* masm) { | 716 static void StoreIC_PushArgs(MacroAssembler* masm) { |
| 717 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), | 717 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), |
| 718 StoreDescriptor::ValueRegister(), | 718 StoreDescriptor::ValueRegister(), |
| 719 VectorStoreICDescriptor::SlotRegister(), | 719 StoreWithVectorDescriptor::SlotRegister(), |
| 720 VectorStoreICDescriptor::VectorRegister()); | 720 StoreWithVectorDescriptor::VectorRegister()); |
| 721 } | 721 } |
| 722 | 722 |
| 723 | 723 |
| 724 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { | 724 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { |
| 725 StoreIC_PushArgs(masm); | 725 StoreIC_PushArgs(masm); |
| 726 | 726 |
| 727 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss); | 727 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss); |
| 728 } | 728 } |
| 729 | 729 |
| 730 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 730 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
| 731 StoreIC_PushArgs(masm); | 731 StoreIC_PushArgs(masm); |
| 732 | 732 |
| 733 // Perform tail call to the entry. | 733 // Perform tail call to the entry. |
| 734 __ TailCallRuntime(Runtime::kStoreIC_Miss); | 734 __ TailCallRuntime(Runtime::kStoreIC_Miss); |
| 735 } | 735 } |
| 736 | 736 |
| 737 | 737 |
| 738 void StoreIC::GenerateNormal(MacroAssembler* masm) { | 738 void StoreIC::GenerateNormal(MacroAssembler* masm) { |
| 739 Label miss; | 739 Label miss; |
| 740 Register receiver = StoreDescriptor::ReceiverRegister(); | 740 Register receiver = StoreDescriptor::ReceiverRegister(); |
| 741 Register name = StoreDescriptor::NameRegister(); | 741 Register name = StoreDescriptor::NameRegister(); |
| 742 Register value = StoreDescriptor::ValueRegister(); | 742 Register value = StoreDescriptor::ValueRegister(); |
| 743 Register dictionary = a5; | 743 Register dictionary = a5; |
| 744 DCHECK(!AreAliased( | 744 DCHECK(!AreAliased( |
| 745 value, receiver, name, VectorStoreICDescriptor::VectorRegister(), | 745 value, receiver, name, StoreWithVectorDescriptor::VectorRegister(), |
| 746 VectorStoreICDescriptor::SlotRegister(), dictionary, a6, a7)); | 746 StoreWithVectorDescriptor::SlotRegister(), dictionary, a6, a7)); |
| 747 | 747 |
| 748 __ ld(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); | 748 __ ld(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); |
| 749 | 749 |
| 750 GenerateDictionaryStore(masm, &miss, dictionary, name, value, a6, a7); | 750 GenerateDictionaryStore(masm, &miss, dictionary, name, value, a6, a7); |
| 751 Counters* counters = masm->isolate()->counters(); | 751 Counters* counters = masm->isolate()->counters(); |
| 752 __ IncrementCounter(counters->ic_store_normal_hit(), 1, a6, a7); | 752 __ IncrementCounter(counters->ic_store_normal_hit(), 1, a6, a7); |
| 753 __ Ret(); | 753 __ Ret(); |
| 754 | 754 |
| 755 __ bind(&miss); | 755 __ bind(&miss); |
| 756 __ IncrementCounter(counters->ic_store_normal_miss(), 1, a6, a7); | 756 __ IncrementCounter(counters->ic_store_normal_miss(), 1, a6, a7); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 break; | 881 break; |
| 882 default: | 882 default: |
| 883 UNIMPLEMENTED(); | 883 UNIMPLEMENTED(); |
| 884 } | 884 } |
| 885 patcher.ChangeBranchCondition(branch_instr, opcode); | 885 patcher.ChangeBranchCondition(branch_instr, opcode); |
| 886 } | 886 } |
| 887 } // namespace internal | 887 } // namespace internal |
| 888 } // namespace v8 | 888 } // namespace v8 |
| 889 | 889 |
| 890 #endif // V8_TARGET_ARCH_MIPS64 | 890 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |