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

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

Issue 901083004: Contribution of PowerPC port (continuation of 422063005) - PPC dir update (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Contribution of PowerPC port (continuation of 422063005) - PPC dir update -comments and rebase Created 5 years, 10 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/ppc/instruction-selector-ppc.cc ('k') | src/ic/ppc/handler-compiler-ppc.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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/assembler.h" 7 #include "src/assembler.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/compiler/linkage.h" 9 #include "src/compiler/linkage.h"
10 #include "src/compiler/linkage-impl.h" 10 #include "src/compiler/linkage-impl.h"
11 #include "src/zone.h" 11 #include "src/zone.h"
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 namespace compiler { 15 namespace compiler {
16 16
17 struct Arm64LinkageHelperTraits { 17 struct PPCLinkageHelperTraits {
18 static Register ReturnValueReg() { return x0; } 18 static Register ReturnValueReg() { return r3; }
19 static Register ReturnValue2Reg() { return x1; } 19 static Register ReturnValue2Reg() { return r4; }
20 static Register JSCallFunctionReg() { return x1; } 20 static Register JSCallFunctionReg() { return r4; }
21 static Register ContextReg() { return cp; } 21 static Register ContextReg() { return cp; }
22 static Register RuntimeCallFunctionReg() { return x1; } 22 static Register RuntimeCallFunctionReg() { return r4; }
23 static Register RuntimeCallArgCountReg() { return x0; } 23 static Register RuntimeCallArgCountReg() { return r3; }
24 static RegList CCalleeSaveRegisters() { 24 static RegList CCalleeSaveRegisters() {
25 // TODO(dcarney): correct callee saved registers. 25 return r14.bit() | r15.bit() | r16.bit() | r17.bit() | r18.bit() |
26 return 0; 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();
27 } 29 }
28 static Register CRegisterParameter(int i) { 30 static Register CRegisterParameter(int i) {
29 static Register register_parameters[] = {x0, x1, x2, x3, x4, x5, x6, x7}; 31 static Register register_parameters[] = {r3, r4, r5, r6, r7, r8, r9, r10};
30 return register_parameters[i]; 32 return register_parameters[i];
31 } 33 }
32 static int CRegisterParametersLength() { return 8; } 34 static int CRegisterParametersLength() { return 8; }
33 }; 35 };
34 36
35 37
36 typedef LinkageHelper<Arm64LinkageHelperTraits> LH; 38 typedef LinkageHelper<PPCLinkageHelperTraits> LH;
37 39
38 CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr, 40 CallDescriptor* Linkage::GetJSCallDescriptor(Zone* zone, bool is_osr,
39 int parameter_count, 41 int parameter_count,
40 CallDescriptor::Flags flags) { 42 CallDescriptor::Flags flags) {
41 return LH::GetJSCallDescriptor(zone, is_osr, parameter_count, flags); 43 return LH::GetJSCallDescriptor(zone, is_osr, parameter_count, flags);
42 } 44 }
43 45
44 46
45 CallDescriptor* Linkage::GetRuntimeCallDescriptor( 47 CallDescriptor* Linkage::GetRuntimeCallDescriptor(
46 Zone* zone, Runtime::FunctionId function, int parameter_count, 48 Zone* zone, Runtime::FunctionId function, int parameter_count,
(...skipping 13 matching lines...) Expand all
60 62
61 63
62 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone, 64 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone,
63 MachineSignature* sig) { 65 MachineSignature* sig) {
64 return LH::GetSimplifiedCDescriptor(zone, sig); 66 return LH::GetSimplifiedCDescriptor(zone, sig);
65 } 67 }
66 68
67 } // namespace compiler 69 } // namespace compiler
68 } // namespace internal 70 } // namespace internal
69 } // namespace v8 71 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ppc/instruction-selector-ppc.cc ('k') | src/ic/ppc/handler-compiler-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698