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

Side by Side Diff: src/compiler/ppc/linkage-ppc.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/mips64/linkage-mips64.cc ('k') | src/compiler/x64/linkage-x64.cc » ('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 PPCLinkageHelperTraits { 15 struct PPCLinkageHelperTraits {
16 static Register ReturnValueReg() { return r3; } 16 static Register ReturnValueReg() { return r3; }
17 static Register ReturnValue2Reg() { return r4; } 17 static Register ReturnValue2Reg() { return r4; }
18 static Register JSCallFunctionReg() { return r4; } 18 static Register JSCallFunctionReg() { return r4; }
19 static Register ContextReg() { return cp; } 19 static Register ContextReg() { return cp; }
20 static Register InterpreterBytecodePointerReg() { return r14; } 20 static Register InterpreterBytecodePointerReg() { return r14; }
21 static Register InterpreterDispatchTableReg() { return r15; } 21 static Register InterpreterDispatchTableReg() { return r15; }
22 static Register RuntimeCallFunctionReg() { return r4; } 22 static Register RuntimeCallFunctionReg() { return r4; }
23 static Register RuntimeCallArgCountReg() { return r3; } 23 static Register RuntimeCallArgCountReg() { return r3; }
24 static RegList CCalleeSaveRegisters() {
25 return r14.bit() | r15.bit() | r16.bit() | r17.bit() | r18.bit() |
26 r19.bit() | r20.bit() | r21.bit() | r22.bit() | r23.bit() |
27 r24.bit() | r25.bit() | r26.bit() | r27.bit() | r28.bit() |
28 r29.bit() | r30.bit() | fp.bit();
29 }
30 static RegList CCalleeSaveFPRegisters() { return 0; }
31 static Register CRegisterParameter(int i) {
32 static Register register_parameters[] = {r3, r4, r5, r6, r7, r8, r9, r10};
33 return register_parameters[i];
34 }
35 static int CRegisterParametersLength() { return 8; }
36 static int CStackBackingStoreLength() { return 0; }
37 }; 24 };
38 25
39 26
40 typedef LinkageHelper<PPCLinkageHelperTraits> LH; 27 typedef LinkageHelper<PPCLinkageHelperTraits> LH;
41 28
42 CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr, 29 CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr,
43 int parameter_count, 30 int parameter_count,
44 CallDescriptor::Flags flags) { 31 CallDescriptor::Flags flags) {
45 return LH::GetJSCallDescriptor(zone, is_osr, parameter_count, flags); 32 return LH::GetJSCallDescriptor(zone, is_osr, parameter_count, flags);
46 } 33 }
(...skipping 10 matching lines...) Expand all
57 CallDescriptor* Linkage::GetStubCallDescriptor( 44 CallDescriptor* Linkage::GetStubCallDescriptor(
58 Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor, 45 Isolate* isolate, Zone* zone, const CallInterfaceDescriptor& descriptor,
59 int stack_parameter_count, CallDescriptor::Flags flags, 46 int stack_parameter_count, CallDescriptor::Flags flags,
60 Operator::Properties properties, MachineType return_type) { 47 Operator::Properties properties, MachineType return_type) {
61 return LH::GetStubCallDescriptor(isolate, zone, descriptor, 48 return LH::GetStubCallDescriptor(isolate, zone, descriptor,
62 stack_parameter_count, flags, properties, 49 stack_parameter_count, flags, properties,
63 return_type); 50 return_type);
64 } 51 }
65 52
66 53
67 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone,
68 const MachineSignature* sig) {
69 return LH::GetSimplifiedCDescriptor(zone, sig);
70 }
71
72
73 CallDescriptor* Linkage::GetInterpreterDispatchDescriptor(Zone* zone) { 54 CallDescriptor* Linkage::GetInterpreterDispatchDescriptor(Zone* zone) {
74 return LH::GetInterpreterDispatchDescriptor(zone); 55 return LH::GetInterpreterDispatchDescriptor(zone);
75 } 56 }
76 57
77 } // namespace compiler 58 } // namespace compiler
78 } // namespace internal 59 } // namespace internal
79 } // namespace v8 60 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips64/linkage-mips64.cc ('k') | src/compiler/x64/linkage-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698