Index: src/mips64/lithium-mips64.cc |
diff --git a/src/mips64/lithium-mips64.cc b/src/mips64/lithium-mips64.cc |
index c243671106a5f7e1a923d9c2b49b6ea986f5b5a4..3df4defc7af739a65a1a08650817fb20a4a6b049 100644 |
--- a/src/mips64/lithium-mips64.cc |
+++ b/src/mips64/lithium-mips64.cc |
@@ -1097,11 +1097,19 @@ 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)); |
- ops.Add(op, zone()); |
+ // 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()); |
} |
LCallWithDescriptor* result = new(zone()) LCallWithDescriptor( |
@@ -2453,7 +2461,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); |
} |
} |