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

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

Issue 1315183002: PPC: Fix "[turbofan] Support unboxed float and double stack parameters." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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
Index: src/compiler/ppc/instruction-selector-ppc.cc
diff --git a/src/compiler/ppc/instruction-selector-ppc.cc b/src/compiler/ppc/instruction-selector-ppc.cc
index 194b95f90ddf03159837f7728851df3cecdc5421..197dcc13ea688e8cef0268bab731a6f395a96b89 100644
--- a/src/compiler/ppc/instruction-selector-ppc.cc
+++ b/src/compiler/ppc/instruction-selector-ppc.cc
@@ -1477,14 +1477,16 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
int num_slots = static_cast<int>(descriptor->StackParameterCount());
int slot = 0;
for (Node* input : buffer.pushed_nodes) {
- // Skip any alignment holes in pushed nodes.
- if (input == nullptr) continue;
if (slot == 0) {
+ DCHECK(input);
Emit(kPPC_PushFrame, g.NoOutput(), g.UseRegister(input),
g.TempImmediate(num_slots));
} else {
- Emit(kPPC_StoreToStackSlot, g.NoOutput(), g.UseRegister(input),
- g.TempImmediate(slot));
+ // Skip any alignment holes in pushed nodes.
+ if (input) {
+ Emit(kPPC_StoreToStackSlot, g.NoOutput(), g.UseRegister(input),
+ g.TempImmediate(slot));
+ }
}
++slot;
}
@@ -1580,9 +1582,17 @@ void InstructionSelector::VisitTailCall(Node* node) {
InitializeCallBuffer(node, &buffer, true, false);
// Push any stack arguments.
- for (Node* input : base::Reversed(buffer.pushed_nodes)) {
- if (input == nullptr) continue;
- Emit(kPPC_Push, g.NoOutput(), g.UseRegister(input));
+ int num_slots = static_cast<int>(descriptor->StackParameterCount());
+ int slot = 0;
+ for (Node* input : buffer.pushed_nodes) {
+ if (slot == 0) {
+ Emit(kPPC_PushFrame, g.NoOutput(), g.UseRegister(input),
+ g.TempImmediate(num_slots));
+ } else {
+ Emit(kPPC_StoreToStackSlot, g.NoOutput(), g.UseRegister(input),
+ g.TempImmediate(slot));
+ }
+ ++slot;
}
// Select the appropriate opcode based on the call type.
« src/compiler/ppc/code-generator-ppc.cc ('K') | « src/compiler/ppc/code-generator-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698