Index: src/x64/lithium-x64.cc |
diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc |
index 1175642d7ee80e1740778994678f5e08ce22606a..8f37505527f607eeab6db522f3357bcb342717d7 100644 |
--- a/src/x64/lithium-x64.cc |
+++ b/src/x64/lithium-x64.cc |
@@ -1113,10 +1113,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), rsi); |
+ 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()); |
} |
@@ -2523,7 +2531,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); |
} |
} |