Index: src/arm64/lithium-arm64.cc |
diff --git a/src/arm64/lithium-arm64.cc b/src/arm64/lithium-arm64.cc |
index eaa5c880aa6237a07dead68468d04abe3b3c4066..fef51c669b0d9d639f90bf7b99feca89037dcdb6 100644 |
--- a/src/arm64/lithium-arm64.cc |
+++ b/src/arm64/lithium-arm64.cc |
@@ -1050,10 +1050,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()); |
} |
@@ -2014,7 +2022,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); |
} |
} |