Index: src/mips/lithium-mips.cc |
diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc |
index e92bcf6b6a8b35fae2e3c50bfca95e124780f870..fd90584ea95abc2fc0673218c5554511aed71262 100644 |
--- a/src/mips/lithium-mips.cc |
+++ b/src/mips/lithium-mips.cc |
@@ -1097,10 +1097,18 @@ LInstruction* LChunkBuilder::DoCallWithDescriptor( |
LOperand* target = UseRegisterOrConstantAtStart(instr->target()); |
ZoneList<LOperand*> ops(instr->OperandCount(), zone()); |
+ // Target |
ops.Add(target, zone()); |
- for (int i = 1; i < instr->OperandCount(); i++) { |
- LOperand* op = |
- UseFixed(instr->OperandAt(i), descriptor.GetParameterRegister(i - 1)); |
+ // Context |
+ LOperand* op = UseFixed(instr->OperandAt(1), cp); |
+ ops.Add(op, zone()); |
+ // Other register parameters |
+ for (int i = LCallWithDescriptor::kImplicitRegisterParameterCount; |
+ i < instr->OperandCount(); i++) { |
+ op = |
+ UseFixed(instr->OperandAt(i), |
+ descriptor.GetRegisterParameter( |
+ i - LCallWithDescriptor::kImplicitRegisterParameterCount)); |
ops.Add(op, zone()); |
} |
@@ -2448,7 +2456,7 @@ LInstruction* LChunkBuilder::DoParameter(HParameter* instr) { |
CallInterfaceDescriptor descriptor = |
info()->code_stub()->GetCallInterfaceDescriptor(); |
int index = static_cast<int>(instr->index()); |
- Register reg = descriptor.GetEnvironmentParameterRegister(index); |
+ Register reg = descriptor.GetRegisterParameter(index); |
return DefineFixed(result, reg); |
} |
} |