| 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/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 350 |
| 351 | 351 |
| 352 void LoadIC::GenerateMiss(MacroAssembler* masm) { | 352 void LoadIC::GenerateMiss(MacroAssembler* masm) { |
| 353 // The return address is in lr. | 353 // The return address is in lr. |
| 354 Isolate* isolate = masm->isolate(); | 354 Isolate* isolate = masm->isolate(); |
| 355 ASM_LOCATION("LoadIC::GenerateMiss"); | 355 ASM_LOCATION("LoadIC::GenerateMiss"); |
| 356 | 356 |
| 357 __ IncrementCounter(isolate->counters()->load_miss(), 1, x3, x4); | 357 __ IncrementCounter(isolate->counters()->load_miss(), 1, x3, x4); |
| 358 | 358 |
| 359 // Perform tail call to the entry. | 359 // Perform tail call to the entry. |
| 360 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); | 360 if (FLAG_vector_ics) { |
| 361 __ Push(VectorLoadICDescriptor::ReceiverRegister(), |
| 362 VectorLoadICDescriptor::NameRegister(), |
| 363 VectorLoadICDescriptor::SlotRegister(), |
| 364 VectorLoadICDescriptor::VectorRegister()); |
| 365 } else { |
| 366 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); |
| 367 } |
| 361 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); | 368 ExternalReference ref = ExternalReference(IC_Utility(kLoadIC_Miss), isolate); |
| 362 __ TailCallExternalReference(ref, 2, 1); | 369 int arg_count = FLAG_vector_ics ? 4 : 2; |
| 370 __ TailCallExternalReference(ref, arg_count, 1); |
| 363 } | 371 } |
| 364 | 372 |
| 365 | 373 |
| 366 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { | 374 void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { |
| 367 // The return address is in lr. | 375 // The return address is in lr. |
| 368 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); | 376 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); |
| 369 __ TailCallRuntime(Runtime::kGetProperty, 2, 1); | 377 __ TailCallRuntime(Runtime::kGetProperty, 2, 1); |
| 370 } | 378 } |
| 371 | 379 |
| 372 | 380 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 GenerateMiss(masm); | 423 GenerateMiss(masm); |
| 416 } | 424 } |
| 417 | 425 |
| 418 | 426 |
| 419 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { | 427 void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { |
| 420 // The return address is in lr. | 428 // The return address is in lr. |
| 421 Isolate* isolate = masm->isolate(); | 429 Isolate* isolate = masm->isolate(); |
| 422 | 430 |
| 423 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, x10, x11); | 431 __ IncrementCounter(isolate->counters()->keyed_load_miss(), 1, x10, x11); |
| 424 | 432 |
| 425 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); | 433 if (FLAG_vector_ics) { |
| 434 __ Push(VectorLoadICDescriptor::ReceiverRegister(), |
| 435 VectorLoadICDescriptor::NameRegister(), |
| 436 VectorLoadICDescriptor::SlotRegister(), |
| 437 VectorLoadICDescriptor::VectorRegister()); |
| 438 } else { |
| 439 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); |
| 440 } |
| 426 | 441 |
| 427 // Perform tail call to the entry. | 442 // Perform tail call to the entry. |
| 428 ExternalReference ref = | 443 ExternalReference ref = |
| 429 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); | 444 ExternalReference(IC_Utility(kKeyedLoadIC_Miss), isolate); |
| 430 | 445 int arg_count = FLAG_vector_ics ? 4 : 2; |
| 431 __ TailCallExternalReference(ref, 2, 1); | 446 __ TailCallExternalReference(ref, arg_count, 1); |
| 432 } | 447 } |
| 433 | 448 |
| 434 | 449 |
| 435 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { | 450 void KeyedLoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { |
| 436 // The return address is in lr. | 451 // The return address is in lr. |
| 437 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); | 452 __ Push(LoadDescriptor::ReceiverRegister(), LoadDescriptor::NameRegister()); |
| 438 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); | 453 __ TailCallRuntime(Runtime::kKeyedGetProperty, 2, 1); |
| 439 } | 454 } |
| 440 | 455 |
| 441 | 456 |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1020 } else { | 1035 } else { |
| 1021 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); | 1036 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); |
| 1022 // This is JumpIfSmi(smi_reg, branch_imm). | 1037 // This is JumpIfSmi(smi_reg, branch_imm). |
| 1023 patcher.tbz(smi_reg, 0, branch_imm); | 1038 patcher.tbz(smi_reg, 0, branch_imm); |
| 1024 } | 1039 } |
| 1025 } | 1040 } |
| 1026 } | 1041 } |
| 1027 } // namespace v8::internal | 1042 } // namespace v8::internal |
| 1028 | 1043 |
| 1029 #endif // V8_TARGET_ARCH_ARM64 | 1044 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |