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 |
(...skipping 15 matching lines...) Expand all Loading... |
26 static Register RuntimeCallFunctionReg() { return rbx; } | 26 static Register RuntimeCallFunctionReg() { return rbx; } |
27 static Register RuntimeCallArgCountReg() { return rax; } | 27 static Register RuntimeCallArgCountReg() { return rax; } |
28 static RegList CCalleeSaveRegisters() { | 28 static RegList CCalleeSaveRegisters() { |
29 if (kWin64) { | 29 if (kWin64) { |
30 return rbx.bit() | rdi.bit() | rsi.bit() | r12.bit() | r13.bit() | | 30 return rbx.bit() | rdi.bit() | rsi.bit() | r12.bit() | r13.bit() | |
31 r14.bit() | r15.bit(); | 31 r14.bit() | r15.bit(); |
32 } else { | 32 } else { |
33 return rbx.bit() | r12.bit() | r13.bit() | r14.bit() | r15.bit(); | 33 return rbx.bit() | r12.bit() | r13.bit() | r14.bit() | r15.bit(); |
34 } | 34 } |
35 } | 35 } |
| 36 static RegList CCalleeSaveFPRegisters() { |
| 37 if (kWin64) { |
| 38 return (1 << xmm6.code()) | (1 << xmm7.code()) | (1 << xmm8.code()) | |
| 39 (1 << xmm9.code()) | (1 << xmm10.code()) | (1 << xmm11.code()) | |
| 40 (1 << xmm12.code()) | (1 << xmm13.code()) | (1 << xmm14.code()) | |
| 41 (1 << xmm15.code()); |
| 42 } else { |
| 43 return 0; |
| 44 } |
| 45 } |
36 static Register CRegisterParameter(int i) { | 46 static Register CRegisterParameter(int i) { |
37 if (kWin64) { | 47 if (kWin64) { |
38 static Register register_parameters[] = {rcx, rdx, r8, r9}; | 48 static Register register_parameters[] = {rcx, rdx, r8, r9}; |
39 return register_parameters[i]; | 49 return register_parameters[i]; |
40 } else { | 50 } else { |
41 static Register register_parameters[] = {rdi, rsi, rdx, rcx, r8, r9}; | 51 static Register register_parameters[] = {rdi, rsi, rdx, rcx, r8, r9}; |
42 return register_parameters[i]; | 52 return register_parameters[i]; |
43 } | 53 } |
44 } | 54 } |
45 static int CRegisterParametersLength() { return kWin64 ? 4 : 6; } | 55 static int CRegisterParametersLength() { return kWin64 ? 4 : 6; } |
(...skipping 28 matching lines...) Expand all Loading... |
74 | 84 |
75 | 85 |
76 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone, | 86 CallDescriptor* Linkage::GetSimplifiedCDescriptor(Zone* zone, |
77 const MachineSignature* sig) { | 87 const MachineSignature* sig) { |
78 return LH::GetSimplifiedCDescriptor(zone, sig); | 88 return LH::GetSimplifiedCDescriptor(zone, sig); |
79 } | 89 } |
80 | 90 |
81 } // namespace compiler | 91 } // namespace compiler |
82 } // namespace internal | 92 } // namespace internal |
83 } // namespace v8 | 93 } // namespace v8 |
OLD | NEW |