OLD | NEW |
| (Empty) |
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/assembler.h" | |
6 #include "src/code-stubs.h" | |
7 #include "src/compiler/linkage.h" | |
8 #include "src/compiler/linkage-impl.h" | |
9 #include "src/zone.h" | |
10 | |
11 namespace v8 { | |
12 namespace internal { | |
13 namespace compiler { | |
14 | |
15 struct IA32LinkageHelperTraits { | |
16 static Register ReturnValueReg() { return eax; } | |
17 static Register ReturnValue2Reg() { return edx; } | |
18 static Register JSCallFunctionReg() { return edi; } | |
19 static Register ContextReg() { return esi; } | |
20 static Register InterpreterBytecodeOffsetReg() { return ecx; } | |
21 static Register InterpreterBytecodeArrayReg() { return edi; } | |
22 static Register InterpreterDispatchTableReg() { return ebx; } | |
23 static Register RuntimeCallFunctionReg() { return ebx; } | |
24 static Register RuntimeCallArgCountReg() { return eax; } | |
25 }; | |
26 | |
27 typedef LinkageHelper<IA32LinkageHelperTraits> LH; | |
28 | |
29 CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr, | |
30 int parameter_count, | |
31 CallDescriptor::Flags flags) { | |
32 return LH::GetJSCallDescriptor(zone, is_osr, parameter_count, flags); | |
33 } | |
34 | |
35 | |
36 CallDescriptor* Linkage::GetRuntimeCallDescriptor( | |
37 Zone* zone, Runtime::FunctionId function, int parameter_count, | |
38 Operator::Properties properties) { | |
39 return LH::GetRuntimeCallDescriptor(zone, function, parameter_count, | |
40 properties); | |
41 } | |
42 | |
43 | |
44 CallDescriptor* Linkage::GetStubCallDescriptor( | |
45 Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor, | |
46 int stack_parameter_count, CallDescriptor::Flags flags, | |
47 Operator::Properties properties, MachineType return_type) { | |
48 return LH::GetStubCallDescriptor(isolate, zone, descriptor, | |
49 stack_parameter_count, flags, properties, | |
50 return_type); | |
51 } | |
52 | |
53 | |
54 CallDescriptor* Linkage::GetInterpreterDispatchDescriptor(Zone* zone) { | |
55 return LH::GetInterpreterDispatchDescriptor(zone); | |
56 } | |
57 | |
58 } // namespace compiler | |
59 } // namespace internal | |
60 } // namespace v8 | |
OLD | NEW |