Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: src/compiler/mips64/instruction-selector-mips64.cc

Issue 769283002: MIPS: Improve pushing arguments on stack. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/mips64/instruction-codes-mips64.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « src/compiler/mips64/instruction-codes-mips64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698