| 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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 6 | 6 |
| 7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
| 9 #include "src/ic/ic-compiler.h" | 9 #include "src/ic/ic-compiler.h" |
| 10 #include "src/ic/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 __ bind(&index_name); | 436 __ bind(&index_name); |
| 437 __ IndexFromHash(r3, key); | 437 __ IndexFromHash(r3, key); |
| 438 // Now jump to the place where smi keys are handled. | 438 // Now jump to the place where smi keys are handled. |
| 439 __ jmp(&index_smi); | 439 __ jmp(&index_smi); |
| 440 } | 440 } |
| 441 | 441 |
| 442 | 442 |
| 443 static void StoreIC_PushArgs(MacroAssembler* masm) { | 443 static void StoreIC_PushArgs(MacroAssembler* masm) { |
| 444 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), | 444 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), |
| 445 StoreDescriptor::ValueRegister(), | 445 StoreDescriptor::ValueRegister(), |
| 446 VectorStoreICDescriptor::SlotRegister(), | 446 StoreWithVectorDescriptor::SlotRegister(), |
| 447 VectorStoreICDescriptor::VectorRegister()); | 447 StoreWithVectorDescriptor::VectorRegister()); |
| 448 } | 448 } |
| 449 | 449 |
| 450 | 450 |
| 451 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { | 451 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { |
| 452 StoreIC_PushArgs(masm); | 452 StoreIC_PushArgs(masm); |
| 453 | 453 |
| 454 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss); | 454 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss); |
| 455 } | 455 } |
| 456 | 456 |
| 457 | 457 |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 __ JumpIfNotUniqueNameInstanceType(r4, &slow); | 662 __ JumpIfNotUniqueNameInstanceType(r4, &slow); |
| 663 | 663 |
| 664 // We use register r8, because otherwise probing the megamorphic stub cache | 664 // We use register r8, because otherwise probing the megamorphic stub cache |
| 665 // would require pushing temporaries on the stack. | 665 // would require pushing temporaries on the stack. |
| 666 // TODO(mvstanton): quit using register r8 when | 666 // TODO(mvstanton): quit using register r8 when |
| 667 // FLAG_enable_embedded_constant_pool is turned on. | 667 // FLAG_enable_embedded_constant_pool is turned on. |
| 668 DCHECK(!FLAG_enable_embedded_constant_pool); | 668 DCHECK(!FLAG_enable_embedded_constant_pool); |
| 669 Register temporary2 = r8; | 669 Register temporary2 = r8; |
| 670 // The handlers in the stub cache expect a vector and slot. Since we won't | 670 // The handlers in the stub cache expect a vector and slot. Since we won't |
| 671 // change the IC from any downstream misses, a dummy vector can be used. | 671 // change the IC from any downstream misses, a dummy vector can be used. |
| 672 Register vector = VectorStoreICDescriptor::VectorRegister(); | 672 Register vector = StoreWithVectorDescriptor::VectorRegister(); |
| 673 Register slot = VectorStoreICDescriptor::SlotRegister(); | 673 Register slot = StoreWithVectorDescriptor::SlotRegister(); |
| 674 | 674 |
| 675 DCHECK(!AreAliased(vector, slot, r5, temporary2, r6, r9)); | 675 DCHECK(!AreAliased(vector, slot, r5, temporary2, r6, r9)); |
| 676 Handle<TypeFeedbackVector> dummy_vector = | 676 Handle<TypeFeedbackVector> dummy_vector = |
| 677 TypeFeedbackVector::DummyVector(masm->isolate()); | 677 TypeFeedbackVector::DummyVector(masm->isolate()); |
| 678 int slot_index = dummy_vector->GetIndex( | 678 int slot_index = dummy_vector->GetIndex( |
| 679 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); | 679 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); |
| 680 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); | 680 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); |
| 681 __ mov(slot, Operand(Smi::FromInt(slot_index))); | 681 __ mov(slot, Operand(Smi::FromInt(slot_index))); |
| 682 | 682 |
| 683 masm->isolate()->store_stub_cache()->GenerateProbe(masm, receiver, key, r5, | 683 masm->isolate()->store_stub_cache()->GenerateProbe(masm, receiver, key, r5, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 | 740 |
| 741 void StoreIC::GenerateNormal(MacroAssembler* masm) { | 741 void StoreIC::GenerateNormal(MacroAssembler* masm) { |
| 742 Label miss; | 742 Label miss; |
| 743 Register receiver = StoreDescriptor::ReceiverRegister(); | 743 Register receiver = StoreDescriptor::ReceiverRegister(); |
| 744 Register name = StoreDescriptor::NameRegister(); | 744 Register name = StoreDescriptor::NameRegister(); |
| 745 Register value = StoreDescriptor::ValueRegister(); | 745 Register value = StoreDescriptor::ValueRegister(); |
| 746 Register dictionary = r5; | 746 Register dictionary = r5; |
| 747 DCHECK(receiver.is(r1)); | 747 DCHECK(receiver.is(r1)); |
| 748 DCHECK(name.is(r2)); | 748 DCHECK(name.is(r2)); |
| 749 DCHECK(value.is(r0)); | 749 DCHECK(value.is(r0)); |
| 750 DCHECK(VectorStoreICDescriptor::VectorRegister().is(r3)); | 750 DCHECK(StoreWithVectorDescriptor::VectorRegister().is(r3)); |
| 751 DCHECK(VectorStoreICDescriptor::SlotRegister().is(r4)); | 751 DCHECK(StoreWithVectorDescriptor::SlotRegister().is(r4)); |
| 752 | 752 |
| 753 __ ldr(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); | 753 __ ldr(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); |
| 754 | 754 |
| 755 GenerateDictionaryStore(masm, &miss, dictionary, name, value, r6, r9); | 755 GenerateDictionaryStore(masm, &miss, dictionary, name, value, r6, r9); |
| 756 Counters* counters = masm->isolate()->counters(); | 756 Counters* counters = masm->isolate()->counters(); |
| 757 __ IncrementCounter(counters->ic_store_normal_hit(), 1, r6, r9); | 757 __ IncrementCounter(counters->ic_store_normal_hit(), 1, r6, r9); |
| 758 __ Ret(); | 758 __ Ret(); |
| 759 | 759 |
| 760 __ bind(&miss); | 760 __ bind(&miss); |
| 761 __ IncrementCounter(counters->ic_store_normal_miss(), 1, r6, r9); | 761 __ IncrementCounter(counters->ic_store_normal_miss(), 1, r6, r9); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 patcher.EmitCondition(ne); | 856 patcher.EmitCondition(ne); |
| 857 } else { | 857 } else { |
| 858 DCHECK(Assembler::GetCondition(branch_instr) == ne); | 858 DCHECK(Assembler::GetCondition(branch_instr) == ne); |
| 859 patcher.EmitCondition(eq); | 859 patcher.EmitCondition(eq); |
| 860 } | 860 } |
| 861 } | 861 } |
| 862 } // namespace internal | 862 } // namespace internal |
| 863 } // namespace v8 | 863 } // namespace v8 |
| 864 | 864 |
| 865 #endif // V8_TARGET_ARCH_ARM | 865 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |