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

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

Issue 1534593004: [turbofan] Pass type information of arguments to EmitPrepareArguments. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Handle float32 and float64 differently. Created 5 years 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/ppc/instruction-selector-ppc.cc ('k') | src/compiler/x87/instruction-selector-x87.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 a710d07260c5583d60e27e4d3ab8ebe62fcbcaa4..b1e1548c17e8ab1d86fa3e3fd545f8ecd63bdacc 100644
--- a/src/compiler/x64/instruction-selector-x64.cc
+++ b/src/compiler/x64/instruction-selector-x64.cc
@@ -1233,9 +1233,9 @@ void InstructionSelector::VisitFloat64RoundTiesEven(Node* node) {
}
-void InstructionSelector::EmitPrepareArguments(NodeVector* arguments,
- const CallDescriptor* descriptor,
- Node* node) {
+void InstructionSelector::EmitPrepareArguments(
+ ZoneVector<PushParameter>* arguments, const CallDescriptor* descriptor,
+ Node* node) {
X64OperandGenerator g(this);
// Prepare for C function call.
@@ -1246,26 +1246,27 @@ void InstructionSelector::EmitPrepareArguments(NodeVector* arguments,
// Poke any stack arguments.
for (size_t n = 0; n < arguments->size(); ++n) {
- if (Node* input = (*arguments)[n]) {
+ PushParameter input = (*arguments)[n];
+ if (input.node()) {
int slot = static_cast<int>(n);
- InstructionOperand value = g.CanBeImmediate(input)
- ? g.UseImmediate(input)
- : g.UseRegister(input);
+ InstructionOperand value = g.CanBeImmediate(input.node())
+ ? g.UseImmediate(input.node())
+ : g.UseRegister(input.node());
Emit(kX64Poke | MiscField::encode(slot), g.NoOutput(), value);
}
}
} else {
// Push any stack arguments.
- for (Node* input : base::Reversed(*arguments)) {
+ for (PushParameter input : base::Reversed(*arguments)) {
// 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)
+ g.CanBeImmediate(input.node())
+ ? g.UseImmediate(input.node())
: IsSupported(ATOM) ||
- sequence()->IsFloat(GetVirtualRegister(input))
- ? g.UseRegister(input)
- : g.Use(input);
+ sequence()->IsFloat(GetVirtualRegister(input.node()))
+ ? g.UseRegister(input.node())
+ : g.Use(input.node());
Emit(kX64Push, g.NoOutput(), value);
}
}
« no previous file with comments | « src/compiler/ppc/instruction-selector-ppc.cc ('k') | src/compiler/x87/instruction-selector-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698