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

Side by Side Diff: src/compiler/x87/linkage-x87.cc

Issue 1266603002: [turbofan] Factor C call descriptor building into compiler/c-linkage.cc. (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 unified diff | Download patch
« no previous file with comments | « src/compiler/x64/linkage-x64.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/assembler.h" 5 #include "src/assembler.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/linkage.h" 7 #include "src/compiler/linkage.h"
8 #include "src/compiler/linkage-impl.h" 8 #include "src/compiler/linkage-impl.h"
9 #include "src/zone.h" 9 #include "src/zone.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 namespace compiler { 13 namespace compiler {
14 14
15 struct X87LinkageHelperTraits { 15 struct X87LinkageHelperTraits {
16 static Register ReturnValueReg() { return eax; } 16 static Register ReturnValueReg() { return eax; }
17 static Register ReturnValue2Reg() { return edx; } 17 static Register ReturnValue2Reg() { return edx; }
18 static Register JSCallFunctionReg() { return edi; } 18 static Register JSCallFunctionReg() { return edi; }
19 static Register ContextReg() { return esi; } 19 static Register ContextReg() { return esi; }
20 static Register InterpreterBytecodePointerReg() { return edi; } 20 static Register InterpreterBytecodePointerReg() { return edi; }
21 static Register InterpreterDispatchTableReg() { return ebx; } 21 static Register InterpreterDispatchTableReg() { return ebx; }
22 static Register RuntimeCallFunctionReg() { return ebx; } 22 static Register RuntimeCallFunctionReg() { return ebx; }
23 static Register RuntimeCallArgCountReg() { return eax; } 23 static Register RuntimeCallArgCountReg() { return eax; }
24 static RegList CCalleeSaveRegisters() {
25 return esi.bit() | edi.bit() | ebx.bit();
26 }
27 static RegList CCalleeSaveFPRegisters() { return 0; }
28 static Register CRegisterParameter(int i) { return no_reg; }
29 static int CRegisterParametersLength() { return 0; }
30 static int CStackBackingStoreLength() { return 0; }
31 }; 24 };
32 25
33 typedef LinkageHelper<X87LinkageHelperTraits> LH; 26 typedef LinkageHelper<X87LinkageHelperTraits> LH;
34 27
35 CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr, 28 CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr,
36 int parameter_count, 29 int parameter_count,
37 CallDescriptor::Flags flags) { 30 CallDescriptor::Flags flags) {
38 return LH::GetJSCallDescriptor(zone, is_osr, parameter_count, flags); 31 return LH::GetJSCallDescriptor(zone, is_osr, parameter_count, flags);
39 } 32 }
40 33
41 34
42 CallDescriptor* Linkage::GetRuntimeCallDescriptor( 35 CallDescriptor* Linkage::GetRuntimeCallDescriptor(
43 Zone* zone, Runtime::FunctionId function, int parameter_count, 36 Zone* zone, Runtime::FunctionId function, int parameter_count,
44 Operator::Properties properties) { 37 Operator::Properties properties) {
45 return LH::GetRuntimeCallDescriptor(zone, function, parameter_count, 38 return LH::GetRuntimeCallDescriptor(zone, function, parameter_count,
46 properties); 39 properties);
47 } 40 }
48 41
49 42
50 CallDescriptor* Linkage::GetStubCallDescriptor( 43 CallDescriptor* Linkage::GetStubCallDescriptor(
51 Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor, 44 Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor,
52 int stack_parameter_count, CallDescriptor::Flags flags, 45 int stack_parameter_count, CallDescriptor::Flags flags,
53 Operator::Properties properties, MachineType return_type) { 46 Operator::Properties properties, MachineType return_type) {
54 return LH::GetStubCallDescriptor(isolate, zone, descriptor, 47 return LH::GetStubCallDescriptor(isolate, zone, descriptor,
55 stack_parameter_count, flags, properties, 48 stack_parameter_count, flags, properties,
56 return_type); 49 return_type);
57 } 50 }
58 51
59 52
60 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone,
61 const MachineSignature* sig) {
62 return LH::GetSimplifiedCDescriptor(zone, sig);
63 }
64
65
66 CallDescriptor* Linkage::GetInterpreterDispatchDescriptor(Zone* zone) { 53 CallDescriptor* Linkage::GetInterpreterDispatchDescriptor(Zone* zone) {
67 return LH::GetInterpreterDispatchDescriptor(zone); 54 return LH::GetInterpreterDispatchDescriptor(zone);
68 } 55 }
69 56
70 } // namespace compiler 57 } // namespace compiler
71 } // namespace internal 58 } // namespace internal
72 } // namespace v8 59 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/x64/linkage-x64.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698