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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 // probe the dictionary. | 402 // probe the dictionary. |
403 __ Ldr(scratch2, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); | 403 __ Ldr(scratch2, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); |
404 __ Ldr(scratch3, FieldMemOperand(scratch2, HeapObject::kMapOffset)); | 404 __ Ldr(scratch3, FieldMemOperand(scratch2, HeapObject::kMapOffset)); |
405 __ JumpIfRoot(scratch3, Heap::kHashTableMapRootIndex, &probe_dictionary); | 405 __ JumpIfRoot(scratch3, Heap::kHashTableMapRootIndex, &probe_dictionary); |
406 | 406 |
407 // The handlers in the stub cache expect a vector and slot. Since we won't | 407 // The handlers in the stub cache expect a vector and slot. Since we won't |
408 // change the IC from any downstream misses, a dummy vector can be used. | 408 // change the IC from any downstream misses, a dummy vector can be used. |
409 Register vector = LoadWithVectorDescriptor::VectorRegister(); | 409 Register vector = LoadWithVectorDescriptor::VectorRegister(); |
410 Register slot = LoadWithVectorDescriptor::SlotRegister(); | 410 Register slot = LoadWithVectorDescriptor::SlotRegister(); |
411 DCHECK(!AreAliased(vector, slot, scratch1, scratch2, scratch3, scratch4)); | 411 DCHECK(!AreAliased(vector, slot, scratch1, scratch2, scratch3, scratch4)); |
412 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( | 412 Handle<TypeFeedbackVector> dummy_vector = |
413 masm->isolate()->factory()->keyed_load_dummy_vector()); | 413 TypeFeedbackVector::DummyVector(masm->isolate()); |
414 int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); | 414 int slot_index = dummy_vector->GetIndex( |
415 __ LoadRoot(vector, Heap::kKeyedLoadDummyVectorRootIndex); | 415 FeedbackVectorICSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot)); |
| 416 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); |
416 __ Mov(slot, Operand(Smi::FromInt(slot_index))); | 417 __ Mov(slot, Operand(Smi::FromInt(slot_index))); |
417 | 418 |
418 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 419 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
419 Code::ComputeHandlerFlags(Code::LOAD_IC)); | 420 Code::ComputeHandlerFlags(Code::LOAD_IC)); |
420 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags, | 421 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags, |
421 false, receiver, key, scratch1, | 422 false, receiver, key, scratch1, |
422 scratch2, scratch3, scratch4); | 423 scratch2, scratch3, scratch4); |
423 // Cache miss. | 424 // Cache miss. |
424 KeyedLoadIC::GenerateMiss(masm); | 425 KeyedLoadIC::GenerateMiss(masm); |
425 | 426 |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 __ Ldr(x10, FieldMemOperand(key, HeapObject::kMapOffset)); | 692 __ Ldr(x10, FieldMemOperand(key, HeapObject::kMapOffset)); |
692 __ Ldrb(x10, FieldMemOperand(x10, Map::kInstanceTypeOffset)); | 693 __ Ldrb(x10, FieldMemOperand(x10, Map::kInstanceTypeOffset)); |
693 __ JumpIfNotUniqueNameInstanceType(x10, &slow); | 694 __ JumpIfNotUniqueNameInstanceType(x10, &slow); |
694 | 695 |
695 if (FLAG_vector_stores) { | 696 if (FLAG_vector_stores) { |
696 // The handlers in the stub cache expect a vector and slot. Since we won't | 697 // The handlers in the stub cache expect a vector and slot. Since we won't |
697 // change the IC from any downstream misses, a dummy vector can be used. | 698 // change the IC from any downstream misses, a dummy vector can be used. |
698 Register vector = VectorStoreICDescriptor::VectorRegister(); | 699 Register vector = VectorStoreICDescriptor::VectorRegister(); |
699 Register slot = VectorStoreICDescriptor::SlotRegister(); | 700 Register slot = VectorStoreICDescriptor::SlotRegister(); |
700 DCHECK(!AreAliased(vector, slot, x3, x4, x5, x6)); | 701 DCHECK(!AreAliased(vector, slot, x3, x4, x5, x6)); |
701 Handle<TypeFeedbackVector> dummy_vector = Handle<TypeFeedbackVector>::cast( | 702 Handle<TypeFeedbackVector> dummy_vector = |
702 masm->isolate()->factory()->keyed_store_dummy_vector()); | 703 TypeFeedbackVector::DummyVector(masm->isolate()); |
703 int slot_index = dummy_vector->GetIndex(FeedbackVectorICSlot(0)); | 704 int slot_index = dummy_vector->GetIndex( |
704 __ LoadRoot(vector, Heap::kKeyedStoreDummyVectorRootIndex); | 705 FeedbackVectorICSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); |
| 706 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); |
705 __ Mov(slot, Operand(Smi::FromInt(slot_index))); | 707 __ Mov(slot, Operand(Smi::FromInt(slot_index))); |
706 } | 708 } |
707 | 709 |
708 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 710 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
709 Code::ComputeHandlerFlags(Code::STORE_IC)); | 711 Code::ComputeHandlerFlags(Code::STORE_IC)); |
710 masm->isolate()->stub_cache()->GenerateProbe( | 712 masm->isolate()->stub_cache()->GenerateProbe( |
711 masm, Code::STORE_IC, flags, false, receiver, key, x3, x4, x5, x6); | 713 masm, Code::STORE_IC, flags, false, receiver, key, x3, x4, x5, x6); |
712 // Cache miss. | 714 // Cache miss. |
713 __ B(&miss); | 715 __ B(&miss); |
714 | 716 |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 } else { | 890 } else { |
889 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); | 891 DCHECK(to_patch->Mask(TestBranchMask) == TBNZ); |
890 // This is JumpIfSmi(smi_reg, branch_imm). | 892 // This is JumpIfSmi(smi_reg, branch_imm). |
891 patcher.tbz(smi_reg, 0, branch_imm); | 893 patcher.tbz(smi_reg, 0, branch_imm); |
892 } | 894 } |
893 } | 895 } |
894 } // namespace internal | 896 } // namespace internal |
895 } // namespace v8 | 897 } // namespace v8 |
896 | 898 |
897 #endif // V8_TARGET_ARCH_ARM64 | 899 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |