Index: src/ic/mips/ic-mips.cc |
diff --git a/src/ic/mips/ic-mips.cc b/src/ic/mips/ic-mips.cc |
index ea32f4e80144394b5ef9ed527578513a3468c0f8..42c7ad12413bfa29474834ff91c6c5db404c1ca0 100644 |
--- a/src/ic/mips/ic-mips.cc |
+++ b/src/ic/mips/ic-mips.cc |
@@ -536,10 +536,24 @@ void KeyedLoadIC::GenerateMegamorphic(MacroAssembler* masm) { |
__ LoadRoot(at, Heap::kHashTableMapRootIndex); |
__ Branch(&probe_dictionary, eq, t0, Operand(at)); |
+ if (FLAG_vector_ics) { |
+ // When vector ics are in use, the handlers in the stub cache expect a |
+ // vector and slot. Since we won't change the IC from any downstream |
+ // misses, a dummy vector can be used. |
+ Register vector = VectorLoadICDescriptor::VectorRegister(); |
+ Register slot = VectorLoadICDescriptor::SlotRegister(); |
+ DCHECK(!AreAliased(vector, slot, t0, t1, t2, t5)); |
+ Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( |
+ masm->isolate()->factory()->keyed_load_dummy_vector()); |
+ int int_slot = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); |
+ __ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex); |
+ __ li(slot, Operand(Smi::FromInt(int_slot))); |
+ } |
+ |
Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
Code::ComputeHandlerFlags(Code::LOAD_IC)); |
masm->isolate()->stub_cache()->GenerateProbe( |
- masm, Code::LOAD_IC, flags, false, receiver, key, a3, t0, t1, t2); |
+ masm, Code::LOAD_IC, flags, false, receiver, key, t0, t1, t2, t5); |
// Cache miss. |
GenerateMiss(masm); |