OLD | NEW |
---|---|
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 Arm64LinkageHelperTraits { | 15 struct Arm64LinkageHelperTraits { |
16 static Register ReturnValueReg() { return x0; } | 16 static Register ReturnValueReg() { return x0; } |
17 static Register ReturnValue2Reg() { return x1; } | 17 static Register ReturnValue2Reg() { return x1; } |
18 static Register JSCallFunctionReg() { return x1; } | 18 static Register JSCallFunctionReg() { return x1; } |
19 static Register ContextReg() { return cp; } | 19 static Register ContextReg() { return cp; } |
20 static Register RuntimeCallFunctionReg() { return x1; } | 20 static Register RuntimeCallFunctionReg() { return x1; } |
21 static Register RuntimeCallArgCountReg() { return x0; } | 21 static Register RuntimeCallArgCountReg() { return x0; } |
22 static RegList CCalleeSaveRegisters() { | 22 static RegList CCalleeSaveRegisters() { |
23 // TODO(dcarney): correct callee saved registers. | 23 // TODO(dcarney): correct callee saved registers. |
24 return 0; | 24 return 0; |
25 } | 25 } |
26 static RegList CCalleeSaveFPURegisters() { | |
27 // TODO(palfia): finish. | |
28 return 0; | |
paul.l...
2015/06/15 23:05:17
arm64 has CPURegList::GetCallerSaved() & CPURegLis
akos.palfi.imgtec
2015/06/22 17:33:20
OK, I'm generating the same stp/ldp code.
| |
29 } | |
26 static Register CRegisterParameter(int i) { | 30 static Register CRegisterParameter(int i) { |
27 static Register register_parameters[] = {x0, x1, x2, x3, x4, x5, x6, x7}; | 31 static Register register_parameters[] = {x0, x1, x2, x3, x4, x5, x6, x7}; |
28 return register_parameters[i]; | 32 return register_parameters[i]; |
29 } | 33 } |
30 static int CRegisterParametersLength() { return 8; } | 34 static int CRegisterParametersLength() { return 8; } |
31 }; | 35 }; |
32 | 36 |
33 | 37 |
34 typedef LinkageHelper<Arm64LinkageHelperTraits> LH; | 38 typedef LinkageHelper<Arm64LinkageHelperTraits> LH; |
35 | 39 |
(...skipping 23 matching lines...) Expand all Loading... | |
59 | 63 |
60 | 64 |
61 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone, | 65 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone, |
62 const MachineSignature* sig) { | 66 const MachineSignature* sig) { |
63 return LH::GetSimplifiedCDescriptor(zone, sig); | 67 return LH::GetSimplifiedCDescriptor(zone, sig); |
64 } | 68 } |
65 | 69 |
66 } // namespace compiler | 70 } // namespace compiler |
67 } // namespace internal | 71 } // namespace internal |
68 } // namespace v8 | 72 } // namespace v8 |
OLD | NEW |