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

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

Issue 508863002: [turbofan] Refactor code generation for calls. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/x64/instruction-selector-x64.cc
diff --git a/src/compiler/x64/instruction-selector-x64.cc b/src/compiler/x64/instruction-selector-x64.cc
index 33349225c967bf2a10a41c1bb71244c5ed57516e..015f1afb50d798720f8734cb1689ead565afdb43 100644
--- a/src/compiler/x64/instruction-selector-x64.cc
+++ b/src/compiler/x64/instruction-selector-x64.cc
@@ -686,25 +686,22 @@ void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation,
for (NodeVectorRIter input = buffer.pushed_nodes.rbegin();
input != buffer.pushed_nodes.rend(); input++) {
// TODO(titzer): handle pushing double parameters.
- if (g.CanBeImmediate(*input)) {
- Emit(kX64PushI, NULL, g.UseImmediate(*input));
- } else {
- Emit(kX64Push, NULL, g.Use(*input));
- }
+ Emit(kX64Push, NULL,
+ g.CanBeImmediate(*input) ? g.UseImmediate(*input) : g.Use(*input));
}
// Select the appropriate opcode based on the call type.
InstructionCode opcode;
switch (descriptor->kind()) {
case CallDescriptor::kCallCodeObject: {
- opcode = kX64CallCodeObject;
+ opcode = kArchCallCodeObject;
break;
}
case CallDescriptor::kCallAddress:
- opcode = kX64CallAddress;
+ opcode = kArchCallAddress;
break;
case CallDescriptor::kCallJSFunction:
- opcode = kX64CallJSFunction;
+ opcode = kArchCallJSFunction;
break;
default:
UNREACHABLE();
@@ -727,7 +724,7 @@ void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation,
if (descriptor->kind() == CallDescriptor::kCallAddress &&
!buffer.pushed_nodes.empty()) {
DCHECK(deoptimization == NULL && continuation == NULL);
- Emit(kPopStack |
+ Emit(kArchDrop |
MiscField::encode(static_cast<int>(buffer.pushed_nodes.size())),
NULL);
}
« src/compiler/arm64/instruction-selector-arm64.cc ('K') | « src/compiler/x64/instruction-codes-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698