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 InterpreterBytecodeOffsetReg() { return r12; } | 26 static Register InterpreterBytecodeOffsetReg() { return r12; } |
27 static Register InterpreterBytecodeArrayReg() { return rbx; } | 27 static Register InterpreterBytecodeArrayReg() { return r14; } |
28 static Register InterpreterDispatchTableReg() { return rdi; } | 28 static Register InterpreterDispatchTableReg() { return r15; } |
29 static Register RuntimeCallFunctionReg() { return rbx; } | 29 static Register RuntimeCallFunctionReg() { return rbx; } |
30 static Register RuntimeCallArgCountReg() { return rax; } | 30 static Register RuntimeCallArgCountReg() { return rax; } |
31 static RegList CCalleeSaveRegisters() { | 31 static RegList CCalleeSaveRegisters() { |
32 if (kWin64) { | 32 if (kWin64) { |
33 return rbx.bit() | rdi.bit() | rsi.bit() | r12.bit() | r13.bit() | | 33 return rbx.bit() | rdi.bit() | rsi.bit() | r12.bit() | r13.bit() | |
34 r14.bit() | r15.bit(); | 34 r14.bit() | r15.bit(); |
35 } else { | 35 } else { |
36 return rbx.bit() | r12.bit() | r13.bit() | r14.bit() | r15.bit(); | 36 return rbx.bit() | r12.bit() | r13.bit() | r14.bit() | r15.bit(); |
37 } | 37 } |
38 } | 38 } |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 } | 92 } |
93 | 93 |
94 | 94 |
95 CallDescriptor* Linkage::GetInterpreterDispatchDescriptor(Zone* zone) { | 95 CallDescriptor* Linkage::GetInterpreterDispatchDescriptor(Zone* zone) { |
96 return LH::GetInterpreterDispatchDescriptor(zone); | 96 return LH::GetInterpreterDispatchDescriptor(zone); |
97 } | 97 } |
98 | 98 |
99 } // namespace compiler | 99 } // namespace compiler |
100 } // namespace internal | 100 } // namespace internal |
101 } // namespace v8 | 101 } // namespace v8 |
OLD | NEW |