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

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

Issue 1299023002: [turbofan] Fix stack->stack double moves for pushing on ia32 and x64. (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
« no previous file with comments | « src/compiler/instruction.h ('k') | test/cctest/compiler/test-run-native-calls.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/x64/instruction-selector-x64.cc
diff --git a/src/compiler/x64/instruction-selector-x64.cc b/src/compiler/x64/instruction-selector-x64.cc
index 4838f3b69b3e99d4a479ddf79df75a1c4d70503a..0bcd526322bcd7cef3f7710211b7ad96a4fb0914 100644
--- a/src/compiler/x64/instruction-selector-x64.cc
+++ b/src/compiler/x64/instruction-selector-x64.cc
@@ -1054,7 +1054,7 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
// Poke any stack arguments.
for (size_t n = 0; n < buffer.pushed_nodes.size(); ++n) {
if (Node* input = buffer.pushed_nodes[n]) {
- int const slot = static_cast<int>(n);
+ int slot = static_cast<int>(n);
InstructionOperand value = g.CanBeImmediate(input)
? g.UseImmediate(input)
: g.UseRegister(input);
@@ -1064,11 +1064,15 @@ void InstructionSelector::VisitCall(Node* node, BasicBlock* handler) {
} else {
// Push any stack arguments.
for (Node* input : base::Reversed(buffer.pushed_nodes)) {
- // TODO(titzer): handle pushing double parameters.
+ // TODO(titzer): X64Push cannot handle stack->stack double moves
+ // because there is no way to encode fixed double slots.
InstructionOperand value =
g.CanBeImmediate(input)
? g.UseImmediate(input)
- : IsSupported(ATOM) ? g.UseRegister(input) : g.Use(input);
+ : IsSupported(ATOM) ||
+ sequence()->IsFloat(GetVirtualRegister(input))
+ ? g.UseRegister(input)
+ : g.Use(input);
Emit(kX64Push, g.NoOutput(), value);
}
}
« no previous file with comments | « src/compiler/instruction.h ('k') | test/cctest/compiler/test-run-native-calls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698