| Index: src/compiler/mips64/instruction-selector-mips64.cc
|
| diff --git a/src/compiler/mips64/instruction-selector-mips64.cc b/src/compiler/mips64/instruction-selector-mips64.cc
|
| index 80504ed72c3ea0471328eda3c5ed54fbaa1c2b69..24383f30de6481daaf8d37f572214553452f258b 100644
|
| --- a/src/compiler/mips64/instruction-selector-mips64.cc
|
| +++ b/src/compiler/mips64/instruction-selector-mips64.cc
|
| @@ -643,14 +643,16 @@ void InstructionSelector::VisitCall(Node* node) {
|
| // Compute InstructionOperands for inputs and outputs.
|
| InitializeCallBuffer(node, &buffer, true, false);
|
|
|
| - // TODO(dcarney): might be possible to use claim/poke instead
|
| - // Push any stack arguments.
|
| + int push_count = buffer.pushed_nodes.size();
|
| + if (push_count > 0) {
|
| + Emit(kMips64StackClaim | MiscField::encode(push_count), NULL);
|
| + }
|
| + int slot = buffer.pushed_nodes.size() - 1;
|
| for (NodeVectorRIter input = buffer.pushed_nodes.rbegin();
|
| input != buffer.pushed_nodes.rend(); input++) {
|
| - // TODO(plind): inefficient for MIPS, use MultiPush here.
|
| - // - Also need to align the stack. See arm64.
|
| - // - Maybe combine with arg slot stuff in DirectCEntry stub.
|
| - Emit(kMips64Push, NULL, g.UseRegister(*input));
|
| + Emit(kMips64StoreToStackSlot | MiscField::encode(slot), NULL,
|
| + g.UseRegister(*input));
|
| + slot--;
|
| }
|
|
|
| // Select the appropriate opcode based on the call type.
|
|
|