Index: src/compiler/ia32/instruction-selector-ia32.cc |
diff --git a/src/compiler/ia32/instruction-selector-ia32.cc b/src/compiler/ia32/instruction-selector-ia32.cc |
index 105ca8287b891088355715deaf1926ecdb2da10a..084024f1b3f89648d6cfcc8bf05aa045ff6c50f0 100644 |
--- a/src/compiler/ia32/instruction-selector-ia32.cc |
+++ b/src/compiler/ia32/instruction-selector-ia32.cc |
@@ -844,21 +844,23 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) { |
// Poke any stack arguments. |
for (size_t n = 0; n < buffer.pushed_nodes.size(); ++n) { |
- if (Node* node = buffer.pushed_nodes[n]) { |
+ if (Node* input = buffer.pushed_nodes[n]) { |
int const slot = static_cast<int>(n); |
- InstructionOperand value = |
- g.CanBeImmediate(node) ? g.UseImmediate(node) : g.UseRegister(node); |
+ InstructionOperand value = g.CanBeImmediate(node) |
+ ? g.UseImmediate(input) |
+ : g.UseRegister(input); |
Emit(kIA32Poke | MiscField::encode(slot), g.NoOutput(), value); |
} |
} |
} else { |
// Push any stack arguments. |
- for (Node* node : base::Reversed(buffer.pushed_nodes)) { |
- // TODO(titzer): handle pushing double parameters. |
+ for (Node* input : base::Reversed(buffer.pushed_nodes)) { |
+ // Skip any alignment holes in pushed nodes. |
+ if (input == nullptr) continue; |
InstructionOperand value = |
- g.CanBeImmediate(node) |
- ? g.UseImmediate(node) |
- : IsSupported(ATOM) ? g.UseRegister(node) : g.Use(node); |
+ g.CanBeImmediate(input) |
+ ? g.UseImmediate(input) |
+ : IsSupported(ATOM) ? g.UseRegister(input) : g.Use(input); |
Emit(kIA32Push, g.NoOutput(), value); |
} |
} |
@@ -948,12 +950,12 @@ void InstructionSelector::VisitTailCall(Node* node) { |
InitializeCallBuffer(node, &buffer, true, true); |
// Push any stack arguments. |
- for (Node* node : base::Reversed(buffer.pushed_nodes)) { |
+ for (Node* input : base::Reversed(buffer.pushed_nodes)) { |
// TODO(titzer): Handle pushing double parameters. |
InstructionOperand value = |
- g.CanBeImmediate(node) |
- ? g.UseImmediate(node) |
- : IsSupported(ATOM) ? g.UseRegister(node) : g.Use(node); |
+ g.CanBeImmediate(input) |
+ ? g.UseImmediate(input) |
+ : IsSupported(ATOM) ? g.UseRegister(input) : g.Use(input); |
Emit(kIA32Push, g.NoOutput(), value); |
} |