Index: src/x64/code-stubs-x64.cc |
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
index f17389cc95a382f934348d72ca75c49a6f0ed6a4..da72c29f3b434a817f80efe650a727fe71cb3183 100644 |
--- a/src/x64/code-stubs-x64.cc |
+++ b/src/x64/code-stubs-x64.cc |
@@ -524,6 +524,11 @@ void MathPowStub::Generate(MacroAssembler* masm) { |
void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
Label miss; |
Register receiver = LoadDescriptor::ReceiverRegister(); |
+ // Ensure that the vector and slot registers won't be clobbered before |
+ // calling the miss handler. |
+ DCHECK(!FLAG_vector_ics || |
+ !AreAliased(r8, r9, VectorLoadICDescriptor::VectorRegister(), |
+ VectorLoadICDescriptor::SlotRegister())); |
NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8, |
r9, &miss); |
@@ -873,10 +878,16 @@ void LoadIndexedStringStub::Generate(MacroAssembler* masm) { |
Register receiver = LoadDescriptor::ReceiverRegister(); |
Register index = LoadDescriptor::NameRegister(); |
- Register scratch = rbx; |
+ Register scratch = rdi; |
Register result = rax; |
DCHECK(!scratch.is(receiver) && !scratch.is(index)); |
+ DCHECK(!FLAG_vector_ics || |
+ (!scratch.is(VectorLoadICDescriptor::VectorRegister()) && |
+ result.is(VectorLoadICDescriptor::SlotRegister()))); |
+ // 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. |