Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(765)

Side by Side Diff: src/arm/interface-descriptors-arm.cc

Issue 1211333003: Make context register implicit for CallInterfaceDescriptors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Platform ports Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return MathPowTaggedDescriptor::exponent(); 57 return MathPowTaggedDescriptor::exponent();
58 } 58 }
59 59
60 60
61 const Register GrowArrayElementsDescriptor::ObjectRegister() { return r0; } 61 const Register GrowArrayElementsDescriptor::ObjectRegister() { return r0; }
62 const Register GrowArrayElementsDescriptor::KeyRegister() { return r3; } 62 const Register GrowArrayElementsDescriptor::KeyRegister() { return r3; }
63 63
64 64
65 void FastNewClosureDescriptor::InitializePlatformSpecific( 65 void FastNewClosureDescriptor::InitializePlatformSpecific(
66 CallInterfaceDescriptorData* data) { 66 CallInterfaceDescriptorData* data) {
67 Register registers[] = {cp, r2}; 67 Register registers[] = {r2};
68 data->InitializePlatformSpecific(arraysize(registers), registers); 68 data->InitializePlatformSpecific(arraysize(registers), registers);
69 } 69 }
70 70
71 71
72 void FastNewContextDescriptor::InitializePlatformSpecific( 72 void FastNewContextDescriptor::InitializePlatformSpecific(
73 CallInterfaceDescriptorData* data) { 73 CallInterfaceDescriptorData* data) {
74 Register registers[] = {cp, r1}; 74 Register registers[] = {r1};
75 data->InitializePlatformSpecific(arraysize(registers), registers); 75 data->InitializePlatformSpecific(arraysize(registers), registers);
76 } 76 }
77 77
78 78
79 void ToNumberDescriptor::InitializePlatformSpecific( 79 void ToNumberDescriptor::InitializePlatformSpecific(
80 CallInterfaceDescriptorData* data) { 80 CallInterfaceDescriptorData* data) {
81 Register registers[] = {cp, r0}; 81 Register registers[] = {r0};
82 data->InitializePlatformSpecific(arraysize(registers), registers); 82 data->InitializePlatformSpecific(arraysize(registers), registers);
83 } 83 }
84 84
85 85
86 void NumberToStringDescriptor::InitializePlatformSpecific( 86 void NumberToStringDescriptor::InitializePlatformSpecific(
87 CallInterfaceDescriptorData* data) { 87 CallInterfaceDescriptorData* data) {
88 Register registers[] = {cp, r0}; 88 Register registers[] = {r0};
89 data->InitializePlatformSpecific(arraysize(registers), registers); 89 data->InitializePlatformSpecific(arraysize(registers), registers);
90 } 90 }
91 91
92 92
93 void TypeofDescriptor::InitializePlatformSpecific( 93 void TypeofDescriptor::InitializePlatformSpecific(
94 CallInterfaceDescriptorData* data) { 94 CallInterfaceDescriptorData* data) {
95 Register registers[] = {cp, r3}; 95 Register registers[] = {r3};
96 data->InitializePlatformSpecific(arraysize(registers), registers); 96 data->InitializePlatformSpecific(arraysize(registers), registers);
97 } 97 }
98 98
99 99
100 void FastCloneShallowArrayDescriptor::InitializePlatformSpecific( 100 void FastCloneShallowArrayDescriptor::InitializePlatformSpecific(
101 CallInterfaceDescriptorData* data) { 101 CallInterfaceDescriptorData* data) {
102 Register registers[] = {cp, r3, r2, r1}; 102 Register registers[] = {r3, r2, r1};
103 data->InitializePlatformSpecific(arraysize(registers), registers); 103 data->InitializePlatformSpecific(arraysize(registers), registers);
104 } 104 }
105 105
106 106
107 void FastCloneShallowObjectDescriptor::InitializePlatformSpecific( 107 void FastCloneShallowObjectDescriptor::InitializePlatformSpecific(
108 CallInterfaceDescriptorData* data) { 108 CallInterfaceDescriptorData* data) {
109 Register registers[] = {cp, r3, r2, r1, r0}; 109 Register registers[] = {r3, r2, r1, r0};
110 data->InitializePlatformSpecific(arraysize(registers), registers); 110 data->InitializePlatformSpecific(arraysize(registers), registers);
111 } 111 }
112 112
113 113
114 void CreateAllocationSiteDescriptor::InitializePlatformSpecific( 114 void CreateAllocationSiteDescriptor::InitializePlatformSpecific(
115 CallInterfaceDescriptorData* data) { 115 CallInterfaceDescriptorData* data) {
116 Register registers[] = {cp, r2, r3}; 116 Register registers[] = {r2, r3};
117 data->InitializePlatformSpecific(arraysize(registers), registers); 117 data->InitializePlatformSpecific(arraysize(registers), registers);
118 } 118 }
119 119
120 120
121 void CreateWeakCellDescriptor::InitializePlatformSpecific( 121 void CreateWeakCellDescriptor::InitializePlatformSpecific(
122 CallInterfaceDescriptorData* data) { 122 CallInterfaceDescriptorData* data) {
123 Register registers[] = {cp, r2, r3, r1}; 123 Register registers[] = {r2, r3, r1};
124 data->InitializePlatformSpecific(arraysize(registers), registers); 124 data->InitializePlatformSpecific(arraysize(registers), registers);
125 } 125 }
126 126
127 127
128 void StoreArrayLiteralElementDescriptor::InitializePlatformSpecific( 128 void StoreArrayLiteralElementDescriptor::InitializePlatformSpecific(
129 CallInterfaceDescriptorData* data) { 129 CallInterfaceDescriptorData* data) {
130 Register registers[] = {cp, r3, r0}; 130 Register registers[] = {r3, r0};
131 data->InitializePlatformSpecific(arraysize(registers), registers); 131 data->InitializePlatformSpecific(arraysize(registers), registers);
132 } 132 }
133 133
134 134
135 void CallFunctionDescriptor::InitializePlatformSpecific( 135 void CallFunctionDescriptor::InitializePlatformSpecific(
136 CallInterfaceDescriptorData* data) { 136 CallInterfaceDescriptorData* data) {
137 Register registers[] = {cp, r1}; 137 Register registers[] = {r1};
138 data->InitializePlatformSpecific(arraysize(registers), registers); 138 data->InitializePlatformSpecific(arraysize(registers), registers);
139 } 139 }
140 140
141 141
142 void CallFunctionWithFeedbackDescriptor::InitializePlatformSpecific( 142 void CallFunctionWithFeedbackDescriptor::InitializePlatformSpecific(
143 CallInterfaceDescriptorData* data) { 143 CallInterfaceDescriptorData* data) {
144 Register registers[] = {cp, r1, r3}; 144 Register registers[] = {r1, r3};
145 data->InitializePlatformSpecific(arraysize(registers), registers); 145 data->InitializePlatformSpecific(arraysize(registers), registers);
146 } 146 }
147 147
148 148
149 void CallFunctionWithFeedbackAndVectorDescriptor::InitializePlatformSpecific( 149 void CallFunctionWithFeedbackAndVectorDescriptor::InitializePlatformSpecific(
150 CallInterfaceDescriptorData* data) { 150 CallInterfaceDescriptorData* data) {
151 Register registers[] = {cp, r1, r3, r2}; 151 Register registers[] = {r1, r3, r2};
152 data->InitializePlatformSpecific(arraysize(registers), registers); 152 data->InitializePlatformSpecific(arraysize(registers), registers);
153 } 153 }
154 154
155 155
156 void CallConstructDescriptor::InitializePlatformSpecific( 156 void CallConstructDescriptor::InitializePlatformSpecific(
157 CallInterfaceDescriptorData* data) { 157 CallInterfaceDescriptorData* data) {
158 // r0 : number of arguments 158 // r0 : number of arguments
159 // r1 : the function to call 159 // r1 : the function to call
160 // r2 : feedback vector 160 // r2 : feedback vector
161 // r3 : (only if r2 is not the megamorphic symbol) slot in feedback 161 // r3 : (only if r2 is not the megamorphic symbol) slot in feedback
162 // vector (Smi) 162 // vector (Smi)
163 // TODO(turbofan): So far we don't gather type feedback and hence skip the 163 // TODO(turbofan): So far we don't gather type feedback and hence skip the
164 // slot parameter, but ArrayConstructStub needs the vector to be undefined. 164 // slot parameter, but ArrayConstructStub needs the vector to be undefined.
165 Register registers[] = {cp, r0, r1, r2}; 165 Register registers[] = {r0, r1, r2};
166 data->InitializePlatformSpecific(arraysize(registers), registers); 166 data->InitializePlatformSpecific(arraysize(registers), registers);
167 } 167 }
168 168
169 169
170 void RegExpConstructResultDescriptor::InitializePlatformSpecific( 170 void RegExpConstructResultDescriptor::InitializePlatformSpecific(
171 CallInterfaceDescriptorData* data) { 171 CallInterfaceDescriptorData* data) {
172 Register registers[] = {cp, r2, r1, r0}; 172 Register registers[] = {r2, r1, r0};
173 data->InitializePlatformSpecific(arraysize(registers), registers); 173 data->InitializePlatformSpecific(arraysize(registers), registers);
174 } 174 }
175 175
176 176
177 void TransitionElementsKindDescriptor::InitializePlatformSpecific( 177 void TransitionElementsKindDescriptor::InitializePlatformSpecific(
178 CallInterfaceDescriptorData* data) { 178 CallInterfaceDescriptorData* data) {
179 Register registers[] = {cp, r0, r1}; 179 Register registers[] = {r0, r1};
180 data->InitializePlatformSpecific(arraysize(registers), registers); 180 data->InitializePlatformSpecific(arraysize(registers), registers);
181 } 181 }
182 182
183 183
184 void AllocateHeapNumberDescriptor::InitializePlatformSpecific( 184 void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
185 CallInterfaceDescriptorData* data) { 185 CallInterfaceDescriptorData* data) {
186 // register state 186 data->InitializePlatformSpecific(0, nullptr, nullptr);
187 // cp -- context
188 Register registers[] = {cp};
189 data->InitializePlatformSpecific(arraysize(registers), registers, nullptr);
190 } 187 }
191 188
192 189
193 void ArrayConstructorConstantArgCountDescriptor::InitializePlatformSpecific( 190 void ArrayConstructorConstantArgCountDescriptor::InitializePlatformSpecific(
194 CallInterfaceDescriptorData* data) { 191 CallInterfaceDescriptorData* data) {
195 // register state 192 // register state
196 // cp -- context
197 // r0 -- number of arguments 193 // r0 -- number of arguments
198 // r1 -- function 194 // r1 -- function
199 // r2 -- allocation site with elements kind 195 // r2 -- allocation site with elements kind
200 Register registers[] = {cp, r1, r2}; 196 Register registers[] = {r1, r2};
201 data->InitializePlatformSpecific(arraysize(registers), registers); 197 data->InitializePlatformSpecific(arraysize(registers), registers);
202 } 198 }
203 199
204 200
205 void ArrayConstructorDescriptor::InitializePlatformSpecific( 201 void ArrayConstructorDescriptor::InitializePlatformSpecific(
206 CallInterfaceDescriptorData* data) { 202 CallInterfaceDescriptorData* data) {
207 // stack param count needs (constructor pointer, and single argument) 203 // stack param count needs (constructor pointer, and single argument)
208 Register registers[] = {cp, r1, r2, r0}; 204 Register registers[] = {r1, r2, r0};
209 data->InitializePlatformSpecific(arraysize(registers), registers); 205 data->InitializePlatformSpecific(arraysize(registers), registers);
210 } 206 }
211 207
212 208
213 void InternalArrayConstructorConstantArgCountDescriptor:: 209 void InternalArrayConstructorConstantArgCountDescriptor::
214 InitializePlatformSpecific(CallInterfaceDescriptorData* data) { 210 InitializePlatformSpecific(CallInterfaceDescriptorData* data) {
215 // register state 211 // register state
216 // cp -- context
217 // r0 -- number of arguments 212 // r0 -- number of arguments
218 // r1 -- constructor function 213 // r1 -- constructor function
219 Register registers[] = {cp, r1}; 214 Register registers[] = {r1};
220 data->InitializePlatformSpecific(arraysize(registers), registers); 215 data->InitializePlatformSpecific(arraysize(registers), registers);
221 } 216 }
222 217
223 218
224 void InternalArrayConstructorDescriptor::InitializePlatformSpecific( 219 void InternalArrayConstructorDescriptor::InitializePlatformSpecific(
225 CallInterfaceDescriptorData* data) { 220 CallInterfaceDescriptorData* data) {
226 // stack param count needs (constructor pointer, and single argument) 221 // stack param count needs (constructor pointer, and single argument)
227 Register registers[] = {cp, r1, r0}; 222 Register registers[] = {r1, r0};
228 data->InitializePlatformSpecific(arraysize(registers), registers); 223 data->InitializePlatformSpecific(arraysize(registers), registers);
229 } 224 }
230 225
231 226
232 void CompareDescriptor::InitializePlatformSpecific( 227 void CompareDescriptor::InitializePlatformSpecific(
233 CallInterfaceDescriptorData* data) { 228 CallInterfaceDescriptorData* data) {
234 Register registers[] = {cp, r1, r0}; 229 Register registers[] = {r1, r0};
235 data->InitializePlatformSpecific(arraysize(registers), registers); 230 data->InitializePlatformSpecific(arraysize(registers), registers);
236 } 231 }
237 232
238 233
239 void CompareNilDescriptor::InitializePlatformSpecific( 234 void CompareNilDescriptor::InitializePlatformSpecific(
240 CallInterfaceDescriptorData* data) { 235 CallInterfaceDescriptorData* data) {
241 Register registers[] = {cp, r0}; 236 Register registers[] = {r0};
242 data->InitializePlatformSpecific(arraysize(registers), registers); 237 data->InitializePlatformSpecific(arraysize(registers), registers);
243 } 238 }
244 239
245 240
246 void ToBooleanDescriptor::InitializePlatformSpecific( 241 void ToBooleanDescriptor::InitializePlatformSpecific(
247 CallInterfaceDescriptorData* data) { 242 CallInterfaceDescriptorData* data) {
248 Register registers[] = {cp, r0}; 243 Register registers[] = {r0};
249 data->InitializePlatformSpecific(arraysize(registers), registers); 244 data->InitializePlatformSpecific(arraysize(registers), registers);
250 } 245 }
251 246
252 247
253 void BinaryOpDescriptor::InitializePlatformSpecific( 248 void BinaryOpDescriptor::InitializePlatformSpecific(
254 CallInterfaceDescriptorData* data) { 249 CallInterfaceDescriptorData* data) {
255 Register registers[] = {cp, r1, r0}; 250 Register registers[] = {r1, r0};
256 data->InitializePlatformSpecific(arraysize(registers), registers); 251 data->InitializePlatformSpecific(arraysize(registers), registers);
257 } 252 }
258 253
259 254
260 void BinaryOpWithAllocationSiteDescriptor::InitializePlatformSpecific( 255 void BinaryOpWithAllocationSiteDescriptor::InitializePlatformSpecific(
261 CallInterfaceDescriptorData* data) { 256 CallInterfaceDescriptorData* data) {
262 Register registers[] = {cp, r2, r1, r0}; 257 Register registers[] = {r2, r1, r0};
263 data->InitializePlatformSpecific(arraysize(registers), registers); 258 data->InitializePlatformSpecific(arraysize(registers), registers);
264 } 259 }
265 260
266 261
267 void StringAddDescriptor::InitializePlatformSpecific( 262 void StringAddDescriptor::InitializePlatformSpecific(
268 CallInterfaceDescriptorData* data) { 263 CallInterfaceDescriptorData* data) {
269 Register registers[] = {cp, r1, r0}; 264 Register registers[] = {r1, r0};
270 data->InitializePlatformSpecific(arraysize(registers), registers); 265 data->InitializePlatformSpecific(arraysize(registers), registers);
271 } 266 }
272 267
273 268
274 void KeyedDescriptor::InitializePlatformSpecific( 269 void KeyedDescriptor::InitializePlatformSpecific(
275 CallInterfaceDescriptorData* data) { 270 CallInterfaceDescriptorData* data) {
276 static PlatformInterfaceDescriptor noInlineDescriptor = 271 static PlatformInterfaceDescriptor noInlineDescriptor =
277 PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS); 272 PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS);
278 273
279 Register registers[] = { 274 Register registers[] = {
280 cp, // context
281 r2, // key 275 r2, // key
282 }; 276 };
283 data->InitializePlatformSpecific(arraysize(registers), registers, 277 data->InitializePlatformSpecific(arraysize(registers), registers,
284 &noInlineDescriptor); 278 &noInlineDescriptor);
285 } 279 }
286 280
287 281
288 void NamedDescriptor::InitializePlatformSpecific( 282 void NamedDescriptor::InitializePlatformSpecific(
289 CallInterfaceDescriptorData* data) { 283 CallInterfaceDescriptorData* data) {
290 static PlatformInterfaceDescriptor noInlineDescriptor = 284 static PlatformInterfaceDescriptor noInlineDescriptor =
291 PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS); 285 PlatformInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS);
292 286
293 Register registers[] = { 287 Register registers[] = {
294 cp, // context
295 r2, // name 288 r2, // name
296 }; 289 };
297 data->InitializePlatformSpecific(arraysize(registers), registers, 290 data->InitializePlatformSpecific(arraysize(registers), registers,
298 &noInlineDescriptor); 291 &noInlineDescriptor);
299 } 292 }
300 293
301 294
302 void CallHandlerDescriptor::InitializePlatformSpecific( 295 void CallHandlerDescriptor::InitializePlatformSpecific(
303 CallInterfaceDescriptorData* data) { 296 CallInterfaceDescriptorData* data) {
304 static PlatformInterfaceDescriptor default_descriptor = 297 static PlatformInterfaceDescriptor default_descriptor =
305 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS); 298 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
306 299
307 Register registers[] = { 300 Register registers[] = {
308 cp, // context
309 r0, // receiver 301 r0, // receiver
310 }; 302 };
311 data->InitializePlatformSpecific(arraysize(registers), registers, 303 data->InitializePlatformSpecific(arraysize(registers), registers,
312 &default_descriptor); 304 &default_descriptor);
313 } 305 }
314 306
315 307
316 void ArgumentAdaptorDescriptor::InitializePlatformSpecific( 308 void ArgumentAdaptorDescriptor::InitializePlatformSpecific(
317 CallInterfaceDescriptorData* data) { 309 CallInterfaceDescriptorData* data) {
318 static PlatformInterfaceDescriptor default_descriptor = 310 static PlatformInterfaceDescriptor default_descriptor =
319 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS); 311 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
320 312
321 Register registers[] = { 313 Register registers[] = {
322 cp, // context
323 r1, // JSFunction 314 r1, // JSFunction
324 r0, // actual number of arguments 315 r0, // actual number of arguments
325 r2, // expected number of arguments 316 r2, // expected number of arguments
326 }; 317 };
327 data->InitializePlatformSpecific(arraysize(registers), registers, 318 data->InitializePlatformSpecific(arraysize(registers), registers,
328 &default_descriptor); 319 &default_descriptor);
329 } 320 }
330 321
331 322
332 void ApiFunctionDescriptor::InitializePlatformSpecific( 323 void ApiFunctionDescriptor::InitializePlatformSpecific(
333 CallInterfaceDescriptorData* data) { 324 CallInterfaceDescriptorData* data) {
334 static PlatformInterfaceDescriptor default_descriptor = 325 static PlatformInterfaceDescriptor default_descriptor =
335 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS); 326 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
336 327
337 Register registers[] = { 328 Register registers[] = {
338 cp, // context
339 r0, // callee 329 r0, // callee
340 r4, // call_data 330 r4, // call_data
341 r2, // holder 331 r2, // holder
342 r1, // api_function_address 332 r1, // api_function_address
343 r3, // actual number of arguments 333 r3, // actual number of arguments
344 }; 334 };
345 data->InitializePlatformSpecific(arraysize(registers), registers, 335 data->InitializePlatformSpecific(arraysize(registers), registers,
346 &default_descriptor); 336 &default_descriptor);
347 } 337 }
348 338
349 339
350 void ApiAccessorDescriptor::InitializePlatformSpecific( 340 void ApiAccessorDescriptor::InitializePlatformSpecific(
351 CallInterfaceDescriptorData* data) { 341 CallInterfaceDescriptorData* data) {
352 static PlatformInterfaceDescriptor default_descriptor = 342 static PlatformInterfaceDescriptor default_descriptor =
353 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS); 343 PlatformInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS);
354 344
355 Register registers[] = { 345 Register registers[] = {
356 cp, // context
357 r0, // callee 346 r0, // callee
358 r4, // call_data 347 r4, // call_data
359 r2, // holder 348 r2, // holder
360 r1, // api_function_address 349 r1, // api_function_address
361 }; 350 };
362 data->InitializePlatformSpecific(arraysize(registers), registers, 351 data->InitializePlatformSpecific(arraysize(registers), registers,
363 &default_descriptor); 352 &default_descriptor);
364 } 353 }
365 354
366 355
367 void MathRoundVariantDescriptor::InitializePlatformSpecific( 356 void MathRoundVariantDescriptor::InitializePlatformSpecific(
368 CallInterfaceDescriptorData* data) { 357 CallInterfaceDescriptorData* data) {
369 Register registers[] = { 358 Register registers[] = {
370 cp, // context
371 r1, // math rounding function 359 r1, // math rounding function
372 r3, // vector slot id 360 r3, // vector slot id
373 }; 361 };
374 data->InitializePlatformSpecific(arraysize(registers), registers); 362 data->InitializePlatformSpecific(arraysize(registers), registers);
375 } 363 }
376 } // namespace internal 364 } // namespace internal
377 } // namespace v8 365 } // namespace v8
378 366
379 #endif // V8_TARGET_ARCH_ARM 367 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-arm.h » ('j') | src/code-stubs.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698