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_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 cp; } | 14 const Register CallInterfaceDescriptor::ContextRegister() { return cp; } |
15 | 15 |
16 | 16 |
17 const Register LoadDescriptor::ReceiverRegister() { return r1; } | 17 const Register LoadDescriptor::ReceiverRegister() { return r1; } |
18 const Register LoadDescriptor::NameRegister() { return r2; } | 18 const Register LoadDescriptor::NameRegister() { return r2; } |
19 | 19 |
20 | 20 |
21 const Register VectorLoadICDescriptor::ReceiverRegister() { | 21 const Register VectorLoadICTrampolineDescriptor::SlotRegister() { return r0; } |
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 r0; } | |
32 const Register VectorLoadICDescriptor::VectorRegister() { return r3; } | 24 const Register VectorLoadICDescriptor::VectorRegister() { return r3; } |
33 | 25 |
34 | 26 |
35 const Register StoreDescriptor::ReceiverRegister() { return r1; } | 27 const Register StoreDescriptor::ReceiverRegister() { return r1; } |
36 const Register StoreDescriptor::NameRegister() { return r2; } | 28 const Register StoreDescriptor::NameRegister() { return r2; } |
37 const Register StoreDescriptor::ValueRegister() { return r0; } | 29 const Register StoreDescriptor::ValueRegister() { return r0; } |
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() { return r3; } | 32 const Register ElementTransitionAndStoreDescriptor::MapRegister() { return r3; } |
56 | 33 |
57 | 34 |
58 const Register InstanceofDescriptor::left() { return r0; } | 35 const Register InstanceofDescriptor::left() { return r0; } |
59 const Register InstanceofDescriptor::right() { return r1; } | 36 const Register InstanceofDescriptor::right() { return r1; } |
60 | 37 |
61 | 38 |
| 39 const Register ArgumentsAccessReadDescriptor::index() { return r1; } |
| 40 const Register ArgumentsAccessReadDescriptor::parameter_count() { return r0; } |
| 41 |
| 42 |
| 43 const Register ApiGetterDescriptor::function_address() { return r2; } |
| 44 |
| 45 |
| 46 const Register MathPowTaggedDescriptor::exponent() { return r2; } |
| 47 |
| 48 |
| 49 const Register MathPowIntegerDescriptor::exponent() { |
| 50 return MathPowTaggedDescriptor::exponent(); |
| 51 } |
| 52 |
| 53 |
62 void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) { | 54 void FastNewClosureDescriptor::Initialize(CallInterfaceDescriptorData* data) { |
63 Register registers[] = {cp, r2}; | 55 Register registers[] = {cp, r2}; |
64 data->Initialize(arraysize(registers), registers, NULL); | 56 data->Initialize(arraysize(registers), registers, NULL); |
65 } | 57 } |
66 | 58 |
67 | 59 |
68 void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) { | 60 void FastNewContextDescriptor::Initialize(CallInterfaceDescriptorData* data) { |
69 Register registers[] = {cp, r1}; | 61 Register registers[] = {cp, r1}; |
70 data->Initialize(arraysize(registers), registers, NULL); | 62 data->Initialize(arraysize(registers), registers, NULL); |
71 } | 63 } |
(...skipping 28 matching lines...) Expand all Loading... |
100 } | 92 } |
101 | 93 |
102 | 94 |
103 void CreateAllocationSiteDescriptor::Initialize( | 95 void CreateAllocationSiteDescriptor::Initialize( |
104 CallInterfaceDescriptorData* data) { | 96 CallInterfaceDescriptorData* data) { |
105 Register registers[] = {cp, r2, r3}; | 97 Register registers[] = {cp, r2, r3}; |
106 data->Initialize(arraysize(registers), registers, NULL); | 98 data->Initialize(arraysize(registers), registers, NULL); |
107 } | 99 } |
108 | 100 |
109 | 101 |
| 102 void StoreArrayLiteralElementDescriptor::Initialize( |
| 103 CallInterfaceDescriptorData* data) { |
| 104 Register registers[] = {cp, r3, r0}; |
| 105 data->Initialize(arraysize(registers), registers, NULL); |
| 106 } |
| 107 |
| 108 |
110 void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) { | 109 void CallFunctionDescriptor::Initialize(CallInterfaceDescriptorData* data) { |
111 Register registers[] = {cp, r1}; | 110 Register registers[] = {cp, r1}; |
112 data->Initialize(arraysize(registers), registers, NULL); | 111 data->Initialize(arraysize(registers), registers, NULL); |
113 } | 112 } |
114 | 113 |
115 | 114 |
| 115 void CallFunctionWithFeedbackDescriptor::Initialize( |
| 116 CallInterfaceDescriptorData* data) { |
| 117 Register registers[] = {cp, r1, r3}; |
| 118 Representation representations[] = {Representation::Tagged(), |
| 119 Representation::Tagged(), |
| 120 Representation::Smi()}; |
| 121 data->Initialize(arraysize(registers), registers, representations); |
| 122 } |
| 123 |
| 124 |
116 void CallConstructDescriptor::Initialize(CallInterfaceDescriptorData* data) { | 125 void CallConstructDescriptor::Initialize(CallInterfaceDescriptorData* data) { |
117 // r0 : number of arguments | 126 // r0 : number of arguments |
118 // r1 : the function to call | 127 // r1 : the function to call |
119 // r2 : feedback vector | 128 // r2 : feedback vector |
120 // r3 : (only if r2 is not the megamorphic symbol) slot in feedback | 129 // r3 : (only if r2 is not the megamorphic symbol) slot in feedback |
121 // vector (Smi) | 130 // vector (Smi) |
122 // TODO(turbofan): So far we don't gather type feedback and hence skip the | 131 // TODO(turbofan): So far we don't gather type feedback and hence skip the |
123 // slot parameter, but ArrayConstructStub needs the vector to be undefined. | 132 // slot parameter, but ArrayConstructStub needs the vector to be undefined. |
124 Register registers[] = {cp, r0, r1, r2}; | 133 Register registers[] = {cp, r0, r1, r2}; |
125 data->Initialize(arraysize(registers), registers, NULL); | 134 data->Initialize(arraysize(registers), registers, NULL); |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 Representation::Tagged(), // holder | 314 Representation::Tagged(), // holder |
306 Representation::External(), // api_function_address | 315 Representation::External(), // api_function_address |
307 }; | 316 }; |
308 data->Initialize(arraysize(registers), registers, representations, | 317 data->Initialize(arraysize(registers), registers, representations, |
309 &default_descriptor); | 318 &default_descriptor); |
310 } | 319 } |
311 } | 320 } |
312 } // namespace v8::internal | 321 } // namespace v8::internal |
313 | 322 |
314 #endif // V8_TARGET_ARCH_ARM | 323 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |