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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 esi; } | 14 const Register CallInterfaceDescriptor::ContextRegister() { return esi; } |
15 | 15 |
16 | 16 |
17 const Register LoadDescriptor::ReceiverRegister() { return edx; } | 17 const Register LoadDescriptor::ReceiverRegister() { return edx; } |
18 const Register LoadDescriptor::NameRegister() { return ecx; } | 18 const Register LoadDescriptor::NameRegister() { return ecx; } |
19 | 19 |
20 | 20 |
21 const Register VectorLoadICDescriptor::ReceiverRegister() { | 21 const Register VectorLoadICTrampolineDescriptor::SlotRegister() { return eax; } |
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 eax; } | |
32 const Register VectorLoadICDescriptor::VectorRegister() { return ebx; } | 24 const Register VectorLoadICDescriptor::VectorRegister() { return ebx; } |
33 | 25 |
34 | 26 |
35 const Register StoreDescriptor::ReceiverRegister() { return edx; } | 27 const Register StoreDescriptor::ReceiverRegister() { return edx; } |
36 const Register StoreDescriptor::NameRegister() { return ecx; } | 28 const Register StoreDescriptor::NameRegister() { return ecx; } |
37 const Register StoreDescriptor::ValueRegister() { return eax; } | 29 const Register StoreDescriptor::ValueRegister() { return eax; } |
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 ebx; | 33 return ebx; |
57 } | 34 } |
58 | 35 |
59 | 36 |
60 const Register InstanceofDescriptor::left() { return eax; } | 37 const Register InstanceofDescriptor::left() { return eax; } |
61 const Register InstanceofDescriptor::right() { return edx; } | 38 const Register InstanceofDescriptor::right() { return edx; } |
62 | 39 |
63 | 40 |
| 41 const Register ArgumentsAccessReadDescriptor::index() { return edx; } |
| 42 const Register ArgumentsAccessReadDescriptor::parameter_count() { return eax; } |
| 43 |
| 44 |
| 45 const Register ApiGetterDescriptor::function_address() { return edx; } |
| 46 |
| 47 |
| 48 const Register MathPowTaggedDescriptor::exponent() { return eax; } |
| 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[] = {esi, ebx}; | 57 Register registers[] = {esi, ebx}; |
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[] = {esi, edi}; | 63 Register registers[] = {esi, edi}; |
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[] = {esi, ebx, edx}; | 100 Register registers[] = {esi, ebx, edx}; |
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[] = {esi, ecx, eax}; |
| 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[] = {esi, edi}; | 113 Register registers[] = {esi, edi}; |
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[] = {esi, edi, edx}; |
| 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 // eax : number of arguments | 129 // eax : number of arguments |
121 // ebx : feedback vector | 130 // ebx : feedback vector |
122 // edx : (only if ebx is not the megamorphic symbol) slot in feedback | 131 // edx : (only if ebx is not the megamorphic symbol) slot in feedback |
123 // vector (Smi) | 132 // vector (Smi) |
124 // edi : constructor function | 133 // edi : 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[] = {esi, eax, edi, ebx}; | 136 Register registers[] = {esi, eax, edi, ebx}; |
128 data->Initialize(arraysize(registers), registers, NULL); | 137 data->Initialize(arraysize(registers), registers, NULL); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 Representation::Tagged(), // call_data | 295 Representation::Tagged(), // call_data |
287 Representation::Tagged(), // holder | 296 Representation::Tagged(), // holder |
288 Representation::External(), // api_function_address | 297 Representation::External(), // api_function_address |
289 }; | 298 }; |
290 data->Initialize(arraysize(registers), registers, representations); | 299 data->Initialize(arraysize(registers), registers, representations); |
291 } | 300 } |
292 } | 301 } |
293 } // namespace v8::internal | 302 } // namespace v8::internal |
294 | 303 |
295 #endif // V8_TARGET_ARCH_IA32 | 304 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |