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

Unified Diff: src/compiler/mips64/instruction-selector-mips64.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 | « src/compiler/mips/linkage-mips.cc ('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 48185a676ffb495c5104f86ff9998be100b74046..dc7497f519e2c1f3a88ee60b879d99c3f7fa5f49 100644
--- a/src/compiler/mips64/instruction-selector-mips64.cc
+++ b/src/compiler/mips64/instruction-selector-mips64.cc
@@ -682,11 +682,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(kMips64StoreToStackSlot, 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(kMips64StoreToStackSlot, g.NoOutput(), g.UseRegister(node),
+ g.TempImmediate(slot << kPointerSizeLog2));
+ }
}
} else {
const int32_t push_count = static_cast<int32_t>(buffer.pushed_nodes.size());
« no previous file with comments | « src/compiler/mips/linkage-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698