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 #ifdef _WIN64 | 15 #ifdef _WIN64 |
16 const bool kWin64 = true; | 16 const bool kWin64 = true; |
17 #else | 17 #else |
18 const bool kWin64 = false; | 18 const bool kWin64 = false; |
19 #endif | 19 #endif |
20 | 20 |
21 struct X64LinkageHelperTraits { | 21 struct X64LinkageHelperTraits { |
22 static Register ReturnValueReg() { return rax; } | 22 static Register ReturnValueReg() { return rax; } |
23 static Register ReturnValue2Reg() { return rdx; } | 23 static Register ReturnValue2Reg() { return rdx; } |
24 static Register JSCallFunctionReg() { return rdi; } | 24 static Register JSCallFunctionReg() { return rdi; } |
25 static Register ContextReg() { return rsi; } | 25 static Register ContextReg() { return rsi; } |
| 26 static Register InterpreterBytecodePointerReg() { return rbx; } |
| 27 static Register InterpreterDispatchTableReg() { return rdi; } |
26 static Register RuntimeCallFunctionReg() { return rbx; } | 28 static Register RuntimeCallFunctionReg() { return rbx; } |
27 static Register RuntimeCallArgCountReg() { return rax; } | 29 static Register RuntimeCallArgCountReg() { return rax; } |
28 static RegList CCalleeSaveRegisters() { | 30 static RegList CCalleeSaveRegisters() { |
29 if (kWin64) { | 31 if (kWin64) { |
30 return rbx.bit() | rdi.bit() | rsi.bit() | r12.bit() | r13.bit() | | 32 return rbx.bit() | rdi.bit() | rsi.bit() | r12.bit() | r13.bit() | |
31 r14.bit() | r15.bit(); | 33 r14.bit() | r15.bit(); |
32 } else { | 34 } else { |
33 return rbx.bit() | r12.bit() | r13.bit() | r14.bit() | r15.bit(); | 35 return rbx.bit() | r12.bit() | r13.bit() | r14.bit() | r15.bit(); |
34 } | 36 } |
35 } | 37 } |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 return_type); | 84 return_type); |
83 } | 85 } |
84 | 86 |
85 | 87 |
86 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone, | 88 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone, |
87 const MachineSignature* sig) { | 89 const MachineSignature* sig) { |
88 return LH::GetSimplifiedCDescriptor(zone, sig); | 90 return LH::GetSimplifiedCDescriptor(zone, sig); |
89 } | 91 } |
90 | 92 |
91 | 93 |
92 CallDescriptor* Linkage::GetInterpreterDispatchDescriptor( | 94 CallDescriptor* Linkage::GetInterpreterDispatchDescriptor(Zone* zone) { |
93 Zone* zone, const MachineSignature* sig) { | 95 return LH::GetInterpreterDispatchDescriptor(zone); |
94 return LH::GetInterpreterDispatchDescriptor(zone, sig); | |
95 } | 96 } |
96 | 97 |
97 } // namespace compiler | 98 } // namespace compiler |
98 } // namespace internal | 99 } // namespace internal |
99 } // namespace v8 | 100 } // namespace v8 |
OLD | NEW |