OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/interface-descriptors.h" | 7 #include "src/interface-descriptors.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
11 | 11 |
12 const Register CallInterfaceDescriptor::ContextRegister() { return rsi; } | 12 const Register CallInterfaceDescriptor::ContextRegister() { return rsi; } |
13 | 13 |
| 14 void CallInterfaceDescriptor::DefaultInitializePlatformSpecific( |
| 15 CallInterfaceDescriptorData* data, int register_parameter_count) { |
| 16 const Register default_stub_registers[] = {rax, rbx, rcx, rdx, rdi}; |
| 17 CHECK_LE(static_cast<size_t>(register_parameter_count), |
| 18 arraysize(default_stub_registers)); |
| 19 data->InitializePlatformSpecific(register_parameter_count, |
| 20 default_stub_registers); |
| 21 } |
14 | 22 |
15 const Register LoadDescriptor::ReceiverRegister() { return rdx; } | 23 const Register LoadDescriptor::ReceiverRegister() { return rdx; } |
16 const Register LoadDescriptor::NameRegister() { return rcx; } | 24 const Register LoadDescriptor::NameRegister() { return rcx; } |
17 const Register LoadDescriptor::SlotRegister() { return rax; } | 25 const Register LoadDescriptor::SlotRegister() { return rax; } |
18 | 26 |
19 | 27 |
20 const Register LoadWithVectorDescriptor::VectorRegister() { return rbx; } | 28 const Register LoadWithVectorDescriptor::VectorRegister() { return rbx; } |
21 | 29 |
22 | 30 |
23 const Register StoreDescriptor::ReceiverRegister() { return rdx; } | 31 const Register StoreDescriptor::ReceiverRegister() { return rdx; } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 64 |
57 | 65 |
58 const Register MathPowIntegerDescriptor::exponent() { | 66 const Register MathPowIntegerDescriptor::exponent() { |
59 return MathPowTaggedDescriptor::exponent(); | 67 return MathPowTaggedDescriptor::exponent(); |
60 } | 68 } |
61 | 69 |
62 | 70 |
63 const Register GrowArrayElementsDescriptor::ObjectRegister() { return rax; } | 71 const Register GrowArrayElementsDescriptor::ObjectRegister() { return rax; } |
64 const Register GrowArrayElementsDescriptor::KeyRegister() { return rbx; } | 72 const Register GrowArrayElementsDescriptor::KeyRegister() { return rbx; } |
65 | 73 |
66 const Register HasPropertyDescriptor::ObjectRegister() { return rax; } | |
67 const Register HasPropertyDescriptor::KeyRegister() { return rbx; } | |
68 | 74 |
69 void FastNewClosureDescriptor::InitializePlatformSpecific( | 75 void FastNewClosureDescriptor::InitializePlatformSpecific( |
70 CallInterfaceDescriptorData* data) { | 76 CallInterfaceDescriptorData* data) { |
71 Register registers[] = {rbx}; | 77 Register registers[] = {rbx}; |
72 data->InitializePlatformSpecific(arraysize(registers), registers); | 78 data->InitializePlatformSpecific(arraysize(registers), registers); |
73 } | 79 } |
74 | 80 |
75 | 81 |
76 void FastNewContextDescriptor::InitializePlatformSpecific( | 82 void FastNewContextDescriptor::InitializePlatformSpecific( |
77 CallInterfaceDescriptorData* data) { | 83 CallInterfaceDescriptorData* data) { |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 rbx, // the JSGeneratorObject to resume | 416 rbx, // the JSGeneratorObject to resume |
411 rdx // the resume mode (tagged) | 417 rdx // the resume mode (tagged) |
412 }; | 418 }; |
413 data->InitializePlatformSpecific(arraysize(registers), registers); | 419 data->InitializePlatformSpecific(arraysize(registers), registers); |
414 } | 420 } |
415 | 421 |
416 } // namespace internal | 422 } // namespace internal |
417 } // namespace v8 | 423 } // namespace v8 |
418 | 424 |
419 #endif // V8_TARGET_ARCH_X64 | 425 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |