| Index: src/compiler/mips/instruction-selector-mips.cc
|
| diff --git a/src/compiler/mips/instruction-selector-mips.cc b/src/compiler/mips/instruction-selector-mips.cc
|
| index c2420ac0d816cc3b7688658cb79c0bb207b3ec9e..f95c82627b080a0bc03c27f0a9d9ccfeff8976f1 100644
|
| --- a/src/compiler/mips/instruction-selector-mips.cc
|
| +++ b/src/compiler/mips/instruction-selector-mips.cc
|
| @@ -533,23 +533,23 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
|
|
|
| // Poke any stack arguments.
|
| int slot = kCArgSlotCount;
|
| - for (Node* node : buffer.pushed_nodes) {
|
| - Emit(kMipsStoreToStackSlot, g.NoOutput(), g.UseRegister(node),
|
| + for (Node* input : buffer.pushed_nodes) {
|
| + Emit(kMipsStoreToStackSlot, g.NoOutput(), g.UseRegister(input),
|
| g.TempImmediate(slot << kPointerSizeLog2));
|
| ++slot;
|
| }
|
| } else {
|
| // Possibly align stack here for functions.
|
| - int push_count = buffer.pushed_nodes.size();
|
| + int push_count = static_cast<int>(descriptor->StackParameterCount());
|
| if (push_count > 0) {
|
| Emit(kMipsStackClaim, g.NoOutput(),
|
| g.TempImmediate(push_count << kPointerSizeLog2));
|
| }
|
| - int slot = buffer.pushed_nodes.size() - 1;
|
| - for (Node* node : base::Reversed(buffer.pushed_nodes)) {
|
| - Emit(kMipsStoreToStackSlot, g.NoOutput(), g.UseRegister(node),
|
| - g.TempImmediate(slot << kPointerSizeLog2));
|
| - slot--;
|
| + for (size_t n = 0; n < buffer.pushed_nodes.size(); ++n) {
|
| + if (Node* input = buffer.pushed_nodes[n]) {
|
| + Emit(kMipsStoreToStackSlot, g.NoOutput(), g.UseRegister(input),
|
| + g.TempImmediate(n << kPointerSizeLog2));
|
| + }
|
| }
|
| }
|
|
|
| @@ -636,14 +636,14 @@ void InstructionSelector::VisitTailCall(Node* node) {
|
| // Compute InstructionOperands for inputs and outputs.
|
| InitializeCallBuffer(node, &buffer, true, false);
|
| // Possibly align stack here for functions.
|
| - int push_count = buffer.pushed_nodes.size();
|
| + int push_count = static_cast<int>(descriptor->StackParameterCount());
|
| if (push_count > 0) {
|
| Emit(kMipsStackClaim, g.NoOutput(),
|
| g.TempImmediate(push_count << kPointerSizeLog2));
|
| }
|
| - int slot = buffer.pushed_nodes.size() - 1;
|
| - for (Node* node : base::Reversed(buffer.pushed_nodes)) {
|
| - Emit(kMipsStoreToStackSlot, g.NoOutput(), g.UseRegister(node),
|
| + int slot = static_cast<int>(buffer.pushed_nodes.size()) - 1;
|
| + for (Node* input : base::Reversed(buffer.pushed_nodes)) {
|
| + Emit(kMipsStoreToStackSlot, g.NoOutput(), g.UseRegister(input),
|
| g.TempImmediate(slot << kPointerSizeLog2));
|
| slot--;
|
| }
|
|
|