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

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

Issue 1207283002: MIPS: Followup to '[turbofan] Add basic support for calling to (a subset of) C functions.' Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 months 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 | « no previous file | src/compiler/mips/linkage-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ce40753995db0a93dded1fd3b1c8e03b1b6a4f84..e2ab0ed2dd9bc8498575663123547e5e6cc4e610 100644
--- a/src/compiler/mips/instruction-selector-mips.cc
+++ b/src/compiler/mips/instruction-selector-mips.cc
@@ -533,11 +533,12 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
0, nullptr, 0, nullptr);
// Poke any stack arguments.
- int slot = kCArgSlotCount;
- for (Node* node : 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* node = buffer.pushed_nodes[n]) {
+ int const slot = static_cast<int>(n);
+ Emit(kMipsStoreToStackSlot, g.NoOutput(), g.UseRegister(node),
+ g.TempImmediate(slot << kPointerSizeLog2));
+ }
}
} else {
// Possibly align stack here for functions.
« no previous file with comments | « no previous file | src/compiler/mips/linkage-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698