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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/interface-descriptors.h" | 9 #include "src/interface-descriptors.h" |
10 | 10 |
11 namespace v8 { | 11 namespace v8 { |
12 namespace internal { | 12 namespace internal { |
13 | 13 |
14 const Register CallInterfaceDescriptor::ContextRegister() { return rsi; } | 14 const Register CallInterfaceDescriptor::ContextRegister() { return rsi; } |
15 | 15 |
16 | 16 |
17 const Register LoadDescriptor::ReceiverRegister() { return rdx; } | 17 const Register LoadDescriptor::ReceiverRegister() { return rdx; } |
18 const Register LoadDescriptor::NameRegister() { return rcx; } | 18 const Register LoadDescriptor::NameRegister() { return rcx; } |
19 | 19 |
20 | 20 |
21 const Register VectorLoadICDescriptor::ReceiverRegister() { | 21 const Register VectorLoadICTrampolineDescriptor::SlotRegister() { return rax; } |
22 return LoadDescriptor::ReceiverRegister(); | |
23 } | |
24 | 22 |
25 | 23 |
26 const Register VectorLoadICDescriptor::NameRegister() { | |
27 return LoadDescriptor::NameRegister(); | |
28 } | |
29 | |
30 | |
31 const Register VectorLoadICDescriptor::SlotRegister() { return rax; } | |
32 const Register VectorLoadICDescriptor::VectorRegister() { return rbx; } | 24 const Register VectorLoadICDescriptor::VectorRegister() { return rbx; } |
33 | 25 |
34 | 26 |
35 const Register StoreDescriptor::ReceiverRegister() { return rdx; } | 27 const Register StoreDescriptor::ReceiverRegister() { return rdx; } |
36 const Register StoreDescriptor::NameRegister() { return rcx; } | 28 const Register StoreDescriptor::NameRegister() { return rcx; } |
37 const Register StoreDescriptor::ValueRegister() { return rax; } | 29 const Register StoreDescriptor::ValueRegister() { return rax; } |
38 | 30 |
39 | 31 |
40 const Register ElementTransitionAndStoreDescriptor::ReceiverRegister() { | |
41 return StoreDescriptor::ReceiverRegister(); | |
42 } | |
43 | |
44 | |
45 const Register ElementTransitionAndStoreDescriptor::NameRegister() { | |
46 return StoreDescriptor::NameRegister(); | |
47 } | |
48 | |
49 | |
50 const Register ElementTransitionAndStoreDescriptor::ValueRegister() { | |
51 return StoreDescriptor::ValueRegister(); | |
52 } | |
53 | |
54 | |
55 const Register ElementTransitionAndStoreDescriptor::MapRegister() { | 32 const Register ElementTransitionAndStoreDescriptor::MapRegister() { |
56 return rbx; | 33 return rbx; |
57 } | 34 } |
58 | 35 |
59 | 36 |
60 const Register InstanceofDescriptor::left() { return rax; } | 37 const Register InstanceofDescriptor::left() { return rax; } |
61 const Register InstanceofDescriptor::right() { return rdx; } | 38 const Register InstanceofDescriptor::right() { return rdx; } |
62 | 39 |
63 | 40 |
| 41 const Register ArgumentsAccessReadDescriptor::index() { return rdx; } |
| 42 const Register ArgumentsAccessReadDescriptor::parameter_count() { return rax; } |
| 43 |
| 44 |
| 45 const Register ApiGetterDescriptor::function_address() { return r8; } |
| 46 |
| 47 |
| 48 const Register MathPowTaggedDescriptor::exponent() { return rdx; } |
| 49 |
| 50 |
| 51 const Register MathPowIntegerDescriptor::exponent() { |
| 52 return MathPowTaggedDescriptor::exponent(); |
| 53 } |
| 54 |
| 55 |
64 void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) { | 56 void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) { |
65 Register registers[] = {rsi, rbx}; | 57 Register registers[] = {rsi, rbx}; |
66 data->Initialize(arraysize(registers), registers, NULL); | 58 data->Initialize(arraysize(registers), registers, NULL); |
67 } | 59 } |
68 | 60 |
69 | 61 |
70 void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) { | 62 void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) { |
71 Register registers[] = {rsi, rdi}; | 63 Register registers[] = {rsi, rdi}; |
72 data->Initialize(arraysize(registers), registers, NULL); | 64 data->Initialize(arraysize(registers), registers, NULL); |
73 } | 65 } |
(...skipping 29 matching lines...) Expand all Loading... |
103 } | 95 } |
104 | 96 |
105 | 97 |
106 void CreateAllocationSiteDescriptor::Initialize( | 98 void CreateAllocationSiteDescriptor::Initialize( |
107 CallInterfaceDescriptorData* data) { | 99 CallInterfaceDescriptorData* data) { |
108 Register registers[] = {rsi, rbx, rdx}; | 100 Register registers[] = {rsi, rbx, rdx}; |
109 data->Initialize(arraysize(registers), registers, NULL); | 101 data->Initialize(arraysize(registers), registers, NULL); |
110 } | 102 } |
111 | 103 |
112 | 104 |
| 105 void StoreArrayLiteralElementDescriptor::Initialize( |
| 106 CallInterfaceDescriptorData* data) { |
| 107 Register registers[] = {rsi, rcx, rax}; |
| 108 data->Initialize(arraysize(registers), registers, NULL); |
| 109 } |
| 110 |
| 111 |
113 void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) { | 112 void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) { |
114 Register registers[] = {rsi, rdi}; | 113 Register registers[] = {rsi, rdi}; |
115 data->Initialize(arraysize(registers), registers, NULL); | 114 data->Initialize(arraysize(registers), registers, NULL); |
116 } | 115 } |
117 | 116 |
118 | 117 |
| 118 void CallFunctionWithFeedbackDescriptor::Initialize( |
| 119 CallInterfaceDescriptorData* data) { |
| 120 Register registers[] = {rsi, rdi, rdx}; |
| 121 Representation representations[] = {Representation::Tagged(), |
| 122 Representation::Tagged(), |
| 123 Representation::Smi()}; |
| 124 data->Initialize(arraysize(registers), registers, representations); |
| 125 } |
| 126 |
| 127 |
119 void CallConstructDescriptor::Initialize(CallInterfaceDescriptorData* data) { | 128 void CallConstructDescriptor::Initialize(CallInterfaceDescriptorData* data) { |
120 // rax : number of arguments | 129 // rax : number of arguments |
121 // rbx : feedback vector | 130 // rbx : feedback vector |
122 // rdx : (only if rbx is not the megamorphic symbol) slot in feedback | 131 // rdx : (only if rbx is not the megamorphic symbol) slot in feedback |
123 // vector (Smi) | 132 // vector (Smi) |
124 // rdi : constructor function | 133 // rdi : constructor function |
125 // TODO(turbofan): So far we don't gather type feedback and hence skip the | 134 // TODO(turbofan): So far we don't gather type feedback and hence skip the |
126 // slot parameter, but ArrayConstructStub needs the vector to be undefined. | 135 // slot parameter, but ArrayConstructStub needs the vector to be undefined. |
127 Register registers[] = {rsi, rax, rdi, rbx}; | 136 Register registers[] = {rsi, rax, rdi, rbx}; |
128 data->Initialize(arraysize(registers), registers, NULL); | 137 data->Initialize(arraysize(registers), registers, NULL); |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 Representation::Tagged(), // call_data | 296 Representation::Tagged(), // call_data |
288 Representation::Tagged(), // holder | 297 Representation::Tagged(), // holder |
289 Representation::External(), // api_function_address | 298 Representation::External(), // api_function_address |
290 }; | 299 }; |
291 data->Initialize(arraysize(registers), registers, representations); | 300 data->Initialize(arraysize(registers), registers, representations); |
292 } | 301 } |
293 } | 302 } |
294 } // namespace v8::internal | 303 } // namespace v8::internal |
295 | 304 |
296 #endif // V8_TARGET_ARCH_X64 | 305 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |