Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index 6c2d67f231b4f0a1a781511b0b992b41fd72aff7..64677de83d4fd87939b022449f690173e922eacd 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -1133,10 +1133,18 @@ LInstruction* LChunkBuilder::DoCallWithDescriptor( |
CallInterfaceDescriptor descriptor = instr->descriptor(); |
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), esi); |
+ 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()); |
} |
@@ -2547,7 +2555,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); |
} |
} |