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

Unified Diff: src/compiler/interpreter-linkage.cc

Issue 1272883003: [turbofan] Remove architecture-specific linkage files and LinkageTraits. Use macro-assembler-define… (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/interpreter-linkage.cc
diff --git a/src/compiler/interpreter-linkage.cc b/src/compiler/interpreter-linkage.cc
new file mode 100644
index 0000000000000000000000000000000000000000..20211f35fd3aa6ec3b84573576594806fcb4f99c
--- /dev/null
+++ b/src/compiler/interpreter-linkage.cc
@@ -0,0 +1,48 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/assembler.h"
+#include "src/macro-assembler.h"
+
+#include "src/compiler/linkage.h"
+#include "src/compiler/linkage-impl.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+CallDescriptor* Linkage::GetInterpreterDispatchDescriptor(Zone* zone) {
+ MachineSignature::Builder types(zone, 0, 3);
+ LocationSignature::Builder locations(zone, 0, 3);
+
+ // Add registers for fixed parameters passed via interpreter dispatch.
+ STATIC_ASSERT(0 == Linkage::kInterpreterBytecodeOffsetParameter);
+ types.AddParam(kMachIntPtr);
+ locations.AddParam(regloc(kInterpreterBytecodeOffsetRegister));
+
+ STATIC_ASSERT(1 == Linkage::kInterpreterBytecodeArrayParameter);
+ types.AddParam(kMachAnyTagged);
+ locations.AddParam(regloc(kInterpreterBytecodeArrayRegister));
+
+ STATIC_ASSERT(2 == Linkage::kInterpreterDispatchTableParameter);
+ types.AddParam(kMachPtr);
+ locations.AddParam(regloc(kInterpreterDispatchTableRegister));
+
+ LinkageLocation target_loc = LinkageLocation::ForAnyRegister();
+ return new (zone) CallDescriptor( // --
+ CallDescriptor::kInterpreterDispatch, // kind
+ kMachNone, // target MachineType
+ target_loc, // target location
+ types.Build(), // machine_sig
+ locations.Build(), // location_sig
+ 0, // stack_parameter_count
+ Operator::kNoProperties, // properties
+ kNoCalleeSaved, // callee-saved registers
+ kNoCalleeSaved, // callee-saved fp regs
+ CallDescriptor::kSupportsTailCalls, // flags
+ "interpreter-dispatch");
+}
+}
Michael Starzinger 2015/08/07 07:59:02 nit: } // namespace compiler } // namespace int
+}
+}

Powered by Google App Engine
This is Rietveld 408576698