Index: src/mips/code-stubs-mips.cc |
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc |
index 69cf51e700f0d5bd68528440d2c261c4f92b0e02..dca8c9d69a8407533351062fb1998312e9e9aacd 100644 |
--- a/src/mips/code-stubs-mips.cc |
+++ b/src/mips/code-stubs-mips.cc |
@@ -1380,12 +1380,8 @@ void LoadIndexedStringStub::Generate(MacroAssembler* masm) { |
Register result = v0; |
DCHECK(!scratch.is(receiver) && !scratch.is(index)); |
DCHECK(!FLAG_vector_ics || |
- (!scratch.is(VectorLoadICDescriptor::VectorRegister()) && |
- result.is(VectorLoadICDescriptor::SlotRegister()))); |
+ !scratch.is(VectorLoadICDescriptor::VectorRegister())); |
- // StringCharAtGenerator doesn't use the result register until it's passed |
- // the different miss possibilities. If it did, we would have a conflict |
- // when FLAG_vector_ics is true. |
StringCharAtGenerator char_at_generator(receiver, index, scratch, result, |
&miss, // When not a string. |
&miss, // When not a number. |
@@ -1396,7 +1392,7 @@ void LoadIndexedStringStub::Generate(MacroAssembler* masm) { |
__ Ret(); |
StubRuntimeCallHelper call_helper; |
- char_at_generator.GenerateSlow(masm, call_helper); |
+ char_at_generator.GenerateSlow(masm, PART_OF_IC_HANDLER, call_helper); |
__ bind(&miss); |
PropertyAccessCompiler::TailCallBuiltin( |
@@ -3050,7 +3046,7 @@ void StringCharCodeAtGenerator::GenerateFast(MacroAssembler* masm) { |
void StringCharCodeAtGenerator::GenerateSlow( |
- MacroAssembler* masm, |
+ MacroAssembler* masm, EmbedMode embed_mode, |
const RuntimeCallHelper& call_helper) { |
__ Abort(kUnexpectedFallthroughToCharCodeAtSlowCase); |
@@ -3064,7 +3060,12 @@ void StringCharCodeAtGenerator::GenerateSlow( |
DONT_DO_SMI_CHECK); |
call_helper.BeforeCall(masm); |
// Consumed by runtime conversion function: |
- __ Push(object_, index_); |
+ if (FLAG_vector_ics && embed_mode == PART_OF_IC_HANDLER) { |
+ __ Push(VectorLoadICDescriptor::VectorRegister(), |
+ VectorLoadICDescriptor::SlotRegister(), object_, index_); |
+ } else { |
+ __ Push(object_, index_); |
+ } |
if (index_flags_ == STRING_INDEX_IS_NUMBER) { |
__ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1); |
} else { |
@@ -3075,9 +3076,13 @@ void StringCharCodeAtGenerator::GenerateSlow( |
// Save the conversion result before the pop instructions below |
// have a chance to overwrite it. |
- |
__ Move(index_, v0); |
- __ pop(object_); |
+ if (FLAG_vector_ics && embed_mode == PART_OF_IC_HANDLER) { |
+ __ Pop(VectorLoadICDescriptor::SlotRegister(), |
+ VectorLoadICDescriptor::VectorRegister(), object_); |
+ } else { |
+ __ pop(object_); |
+ } |
// Reload the instance type. |
__ lw(result_, FieldMemOperand(object_, HeapObject::kMapOffset)); |
__ lbu(result_, FieldMemOperand(result_, Map::kInstanceTypeOffset)); |