V8 Project
linkage-ia32.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 eax; }
19  static Register ReturnValue2Reg() { return edx; }
20  static Register JSCallFunctionReg() { return edi; }
21  static Register ContextReg() { return esi; }
22  static Register RuntimeCallFunctionReg() { return ebx; }
23  static Register RuntimeCallArgCountReg() { return eax; }
25  return esi.bit() | edi.bit() | ebx.bit();
26  }
27  static Register CRegisterParameter(int i) { return no_reg; }
28  static int CRegisterParametersLength() { return 0; }
29 };
30 
31 typedef LinkageHelper<IA32LinkageHelperTraits> LH;
32 
33 CallDescriptor* Linkage::GetJSCallDescriptor(int parameter_count, Zone* zone) {
34  return LH::GetJSCallDescriptor(zone, parameter_count);
35 }
36 
37 
38 CallDescriptor* Linkage::GetRuntimeCallDescriptor(
39  Runtime::FunctionId function, int parameter_count,
40  Operator::Properties properties, Zone* zone) {
41  return LH::GetRuntimeCallDescriptor(zone, function, parameter_count,
42  properties);
43 }
44 
45 
46 CallDescriptor* Linkage::GetStubCallDescriptor(
47  CallInterfaceDescriptor descriptor, int stack_parameter_count,
48  CallDescriptor::Flags flags, Zone* zone) {
49  return LH::GetStubCallDescriptor(zone, descriptor, stack_parameter_count,
50  flags);
51 }
52 
53 
54 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone,
55  MachineSignature* sig) {
56  return LH::GetSimplifiedCDescriptor(zone, sig);
57 }
58 
59 } // namespace compiler
60 } // namespace internal
61 } // 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 edx
const Register edi
const Register esi
const Register eax
const Register ebx
const Register no_reg
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20