| Index: src/crankshaft/ia32/lithium-ia32.cc
|
| diff --git a/src/crankshaft/ia32/lithium-ia32.cc b/src/crankshaft/ia32/lithium-ia32.cc
|
| index a9f219c8b8f1c4c1c46c2cd9991a1537119331aa..e6077cc4ad95f9df51878809d0ad27b9dc063037 100644
|
| --- a/src/crankshaft/ia32/lithium-ia32.cc
|
| +++ b/src/crankshaft/ia32/lithium-ia32.cc
|
| @@ -1036,6 +1036,10 @@ LInstruction* LChunkBuilder::DoDeclareGlobals(HDeclareGlobals* instr) {
|
| LInstruction* LChunkBuilder::DoCallWithDescriptor(
|
| HCallWithDescriptor* instr) {
|
| CallInterfaceDescriptor descriptor = instr->descriptor();
|
| + DCHECK_EQ(descriptor.GetParameterCount() +
|
| + LCallWithDescriptor::kImplicitRegisterParameterCount,
|
| + instr->OperandCount());
|
| +
|
| LOperand* target = UseRegisterOrConstantAtStart(instr->target());
|
| ZoneList<LOperand*> ops(instr->OperandCount(), zone());
|
| // Target
|
| @@ -1043,15 +1047,20 @@ LInstruction* LChunkBuilder::DoCallWithDescriptor(
|
| // 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));
|
| + // Load register parameters.
|
| + int i = 0;
|
| + for (; i < descriptor.GetRegisterParameterCount(); i++) {
|
| + op = UseFixed(instr->OperandAt(
|
| + i + LCallWithDescriptor::kImplicitRegisterParameterCount),
|
| + descriptor.GetRegisterParameter(i));
|
| ops.Add(op, zone());
|
| }
|
| + // Push stack parameters.
|
| + for (; i < descriptor.GetParameterCount(); i++) {
|
| + op = UseAny(instr->OperandAt(
|
| + i + LCallWithDescriptor::kImplicitRegisterParameterCount));
|
| + AddInstruction(new (zone()) LPushArgument(op), instr);
|
| + }
|
|
|
| LCallWithDescriptor* result = new(zone()) LCallWithDescriptor(
|
| descriptor, ops, zone());
|
|
|