V8 Project
linkage-arm64.cc
Go to the documentation of this file.
1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "src/v8.h"
6 
7 #include "src/assembler.h"
8 #include "src/code-stubs.h"
9 #include "src/compiler/linkage.h"
11 #include "src/zone.h"
12 
13 namespace v8 {
14 namespace internal {
15 namespace compiler {
16 
18  static Register ReturnValueReg() { return x0; }
19  static Register ReturnValue2Reg() { return x1; }
20  static Register JSCallFunctionReg() { return x1; }
21  static Register ContextReg() { return cp; }
22  static Register RuntimeCallFunctionReg() { return x1; }
23  static Register RuntimeCallArgCountReg() { return x0; }
25  // TODO(dcarney): correct callee saved registers.
26  return 0;
27  }
29  static Register register_parameters[] = {x0, x1, x2, x3, x4, x5, x6, x7};
30  return register_parameters[i];
31  }
32  static int CRegisterParametersLength() { return 8; }
33 };
34 
35 
36 typedef LinkageHelper<Arm64LinkageHelperTraits> LH;
37 
38 CallDescriptor* Linkage::GetJSCallDescriptor(int parameter_count, Zone* zone) {
39  return LH::GetJSCallDescriptor(zone, parameter_count);
40 }
41 
42 
43 CallDescriptor* Linkage::GetRuntimeCallDescriptor(
44  Runtime::FunctionId function, int parameter_count,
45  Operator::Properties properties, Zone* zone) {
46  return LH::GetRuntimeCallDescriptor(zone, function, parameter_count,
47  properties);
48 }
49 
50 
51 CallDescriptor* Linkage::GetStubCallDescriptor(
52  CallInterfaceDescriptor descriptor, int stack_parameter_count,
53  CallDescriptor::Flags flags, Zone* zone) {
54  return LH::GetStubCallDescriptor(zone, descriptor, stack_parameter_count,
55  flags);
56 }
57 
58 
59 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone,
60  MachineSignature* sig) {
61  return LH::GetSimplifiedCDescriptor(zone, sig);
62 }
63 
64 } // namespace compiler
65 } // namespace internal
66 } // namespace v8
static CallDescriptor * GetStubCallDescriptor(Zone *zone, CallInterfaceDescriptor descriptor, int stack_parameter_count, CallDescriptor::Flags flags)
Definition: linkage-impl.h:131
static CallDescriptor * GetRuntimeCallDescriptor(Zone *zone, Runtime::FunctionId function_id, int js_parameter_count, Operator::Properties properties)
Definition: linkage-impl.h:71
static CallDescriptor * GetSimplifiedCDescriptor(Zone *zone, MachineSignature *msig)
Definition: linkage-impl.h:182
static CallDescriptor * GetJSCallDescriptor(Zone *zone, int js_parameter_count)
Definition: linkage-impl.h:29
CallDescriptor * GetStubCallDescriptor(CallInterfaceDescriptor descriptor, int stack_parameter_count=0, CallDescriptor::Flags flags=CallDescriptor::kNoFlags)
Definition: linkage.cc:103
CallDescriptor * GetJSCallDescriptor(int parameter_count)
Definition: linkage.cc:90
CallDescriptor * GetRuntimeCallDescriptor(Runtime::FunctionId function, int parameter_count, Operator::Properties properties)
Definition: linkage.cc:95
static CallDescriptor * GetSimplifiedCDescriptor(Zone *zone, MachineSignature *sig)
Definition: linkage-arm.cc:59
base::Flags< Property, uint8_t > Properties
Definition: operator.h:48
Signature< MachineType > MachineSignature
Definition: machine-type.h:168
LinkageHelper< ArmLinkageHelperTraits > LH
Definition: linkage-arm.cc:36
const Register cp
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20