OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { | 340 void CallDescriptors::InitializeForIsolate(Isolate* isolate) { |
341 static PlatformCallInterfaceDescriptor default_descriptor = | 341 static PlatformCallInterfaceDescriptor default_descriptor = |
342 PlatformCallInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS); | 342 PlatformCallInterfaceDescriptor(CAN_INLINE_TARGET_ADDRESS); |
343 | 343 |
344 static PlatformCallInterfaceDescriptor noInlineDescriptor = | 344 static PlatformCallInterfaceDescriptor noInlineDescriptor = |
345 PlatformCallInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS); | 345 PlatformCallInterfaceDescriptor(NEVER_INLINE_TARGET_ADDRESS); |
346 | 346 |
347 { | 347 { |
348 CallInterfaceDescriptor* descriptor = | 348 CallInterfaceDescriptor* descriptor = |
349 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); | 349 isolate->call_descriptor(Isolate::ArgumentAdaptorCall); |
350 static Register registers[] = { x1, // JSFunction | 350 Register registers[] = { x1, // JSFunction |
351 cp, // context | 351 cp, // context |
352 x0, // actual number of arguments | 352 x0, // actual number of arguments |
353 x2, // expected number of arguments | 353 x2, // expected number of arguments |
354 }; | 354 }; |
355 static Representation representations[] = { | 355 Representation representations[] = { |
356 Representation::Tagged(), // JSFunction | 356 Representation::Tagged(), // JSFunction |
357 Representation::Tagged(), // context | 357 Representation::Tagged(), // context |
358 Representation::Integer32(), // actual number of arguments | 358 Representation::Integer32(), // actual number of arguments |
359 Representation::Integer32(), // expected number of arguments | 359 Representation::Integer32(), // expected number of arguments |
360 }; | 360 }; |
361 descriptor->register_param_count_ = 4; | 361 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
362 descriptor->register_params_ = registers; | 362 representations, &default_descriptor); |
363 descriptor->param_representations_ = representations; | |
364 descriptor->platform_specific_descriptor_ = &default_descriptor; | |
365 } | 363 } |
366 { | 364 { |
367 CallInterfaceDescriptor* descriptor = | 365 CallInterfaceDescriptor* descriptor = |
368 isolate->call_descriptor(Isolate::KeyedCall); | 366 isolate->call_descriptor(Isolate::KeyedCall); |
369 static Register registers[] = { cp, // context | 367 Register registers[] = { cp, // context |
370 x2, // key | 368 x2, // key |
371 }; | 369 }; |
372 static Representation representations[] = { | 370 Representation representations[] = { |
373 Representation::Tagged(), // context | 371 Representation::Tagged(), // context |
374 Representation::Tagged(), // key | 372 Representation::Tagged(), // key |
375 }; | 373 }; |
376 descriptor->register_param_count_ = 2; | 374 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
377 descriptor->register_params_ = registers; | 375 representations, &noInlineDescriptor); |
378 descriptor->param_representations_ = representations; | |
379 descriptor->platform_specific_descriptor_ = &noInlineDescriptor; | |
380 } | 376 } |
381 { | 377 { |
382 CallInterfaceDescriptor* descriptor = | 378 CallInterfaceDescriptor* descriptor = |
383 isolate->call_descriptor(Isolate::NamedCall); | 379 isolate->call_descriptor(Isolate::NamedCall); |
384 static Register registers[] = { cp, // context | 380 Register registers[] = { cp, // context |
385 x2, // name | 381 x2, // name |
386 }; | 382 }; |
387 static Representation representations[] = { | 383 Representation representations[] = { |
388 Representation::Tagged(), // context | 384 Representation::Tagged(), // context |
389 Representation::Tagged(), // name | 385 Representation::Tagged(), // name |
390 }; | 386 }; |
391 descriptor->register_param_count_ = 2; | 387 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
392 descriptor->register_params_ = registers; | 388 representations, &noInlineDescriptor); |
393 descriptor->param_representations_ = representations; | |
394 descriptor->platform_specific_descriptor_ = &noInlineDescriptor; | |
395 } | 389 } |
396 { | 390 { |
397 CallInterfaceDescriptor* descriptor = | 391 CallInterfaceDescriptor* descriptor = |
398 isolate->call_descriptor(Isolate::CallHandler); | 392 isolate->call_descriptor(Isolate::CallHandler); |
399 static Register registers[] = { cp, // context | 393 Register registers[] = { cp, // context |
400 x0, // receiver | 394 x0, // receiver |
401 }; | 395 }; |
402 static Representation representations[] = { | 396 Representation representations[] = { |
403 Representation::Tagged(), // context | 397 Representation::Tagged(), // context |
404 Representation::Tagged(), // receiver | 398 Representation::Tagged(), // receiver |
405 }; | 399 }; |
406 descriptor->register_param_count_ = 2; | 400 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
407 descriptor->register_params_ = registers; | 401 representations, &default_descriptor); |
408 descriptor->param_representations_ = representations; | |
409 descriptor->platform_specific_descriptor_ = &default_descriptor; | |
410 } | 402 } |
411 { | 403 { |
412 CallInterfaceDescriptor* descriptor = | 404 CallInterfaceDescriptor* descriptor = |
413 isolate->call_descriptor(Isolate::ApiFunctionCall); | 405 isolate->call_descriptor(Isolate::ApiFunctionCall); |
414 static Register registers[] = { x0, // callee | 406 Register registers[] = { x0, // callee |
415 x4, // call_data | 407 x4, // call_data |
416 x2, // holder | 408 x2, // holder |
417 x1, // api_function_address | 409 x1, // api_function_address |
418 cp, // context | 410 cp, // context |
419 }; | 411 }; |
420 static Representation representations[] = { | 412 Representation representations[] = { |
421 Representation::Tagged(), // callee | 413 Representation::Tagged(), // callee |
422 Representation::Tagged(), // call_data | 414 Representation::Tagged(), // call_data |
423 Representation::Tagged(), // holder | 415 Representation::Tagged(), // holder |
424 Representation::External(), // api_function_address | 416 Representation::External(), // api_function_address |
425 Representation::Tagged(), // context | 417 Representation::Tagged(), // context |
426 }; | 418 }; |
427 descriptor->register_param_count_ = 5; | 419 descriptor->Initialize(ARRAY_SIZE(registers), registers, |
428 descriptor->register_params_ = registers; | 420 representations, &default_descriptor); |
429 descriptor->param_representations_ = representations; | |
430 descriptor->platform_specific_descriptor_ = &default_descriptor; | |
431 } | 421 } |
432 } | 422 } |
433 | 423 |
434 | 424 |
435 #define __ ACCESS_MASM(masm) | 425 #define __ ACCESS_MASM(masm) |
436 | 426 |
437 | 427 |
438 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { | 428 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { |
439 // Update the static counter each time a new code stub is generated. | 429 // Update the static counter each time a new code stub is generated. |
440 isolate()->counters()->code_stubs()->Increment(); | 430 isolate()->counters()->code_stubs()->Increment(); |
(...skipping 5038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5479 MemOperand(fp, 6 * kPointerSize), | 5469 MemOperand(fp, 6 * kPointerSize), |
5480 NULL); | 5470 NULL); |
5481 } | 5471 } |
5482 | 5472 |
5483 | 5473 |
5484 #undef __ | 5474 #undef __ |
5485 | 5475 |
5486 } } // namespace v8::internal | 5476 } } // namespace v8::internal |
5487 | 5477 |
5488 #endif // V8_TARGET_ARCH_ARM64 | 5478 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |