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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 3780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3791 | 3791 |
3792 __ bind(&miss); | 3792 __ bind(&miss); |
3793 KeyedLoadIC::GenerateMiss(masm); | 3793 KeyedLoadIC::GenerateMiss(masm); |
3794 | 3794 |
3795 __ bind(&load_smi_map); | 3795 __ bind(&load_smi_map); |
3796 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); | 3796 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); |
3797 __ jmp(&compare_map); | 3797 __ jmp(&compare_map); |
3798 } | 3798 } |
3799 | 3799 |
3800 void StoreICTrampolineStub::Generate(MacroAssembler* masm) { | 3800 void StoreICTrampolineStub::Generate(MacroAssembler* masm) { |
3801 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister()); | 3801 __ EmitLoadTypeFeedbackVector(StoreWithVectorDescriptor::VectorRegister()); |
3802 StoreICStub stub(isolate(), state()); | 3802 StoreICStub stub(isolate(), state()); |
3803 stub.GenerateForTrampoline(masm); | 3803 stub.GenerateForTrampoline(masm); |
3804 } | 3804 } |
3805 | 3805 |
3806 void KeyedStoreICTrampolineStub::Generate(MacroAssembler* masm) { | 3806 void KeyedStoreICTrampolineStub::Generate(MacroAssembler* masm) { |
3807 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister()); | 3807 __ EmitLoadTypeFeedbackVector(StoreWithVectorDescriptor::VectorRegister()); |
3808 KeyedStoreICStub stub(isolate(), state()); | 3808 KeyedStoreICStub stub(isolate(), state()); |
3809 stub.GenerateForTrampoline(masm); | 3809 stub.GenerateForTrampoline(masm); |
3810 } | 3810 } |
3811 | 3811 |
3812 void StoreICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); } | 3812 void StoreICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); } |
3813 | 3813 |
3814 void StoreICStub::GenerateForTrampoline(MacroAssembler* masm) { | 3814 void StoreICStub::GenerateForTrampoline(MacroAssembler* masm) { |
3815 GenerateImpl(masm, true); | 3815 GenerateImpl(masm, true); |
3816 } | 3816 } |
3817 | 3817 |
3818 void StoreICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { | 3818 void StoreICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { |
3819 Register receiver = VectorStoreICDescriptor::ReceiverRegister(); // a1 | 3819 Register receiver = StoreWithVectorDescriptor::ReceiverRegister(); // a1 |
3820 Register key = VectorStoreICDescriptor::NameRegister(); // a2 | 3820 Register key = StoreWithVectorDescriptor::NameRegister(); // a2 |
3821 Register vector = VectorStoreICDescriptor::VectorRegister(); // a3 | 3821 Register vector = StoreWithVectorDescriptor::VectorRegister(); // a3 |
3822 Register slot = VectorStoreICDescriptor::SlotRegister(); // t0 | 3822 Register slot = StoreWithVectorDescriptor::SlotRegister(); // t0 |
3823 DCHECK(VectorStoreICDescriptor::ValueRegister().is(a0)); // a0 | 3823 DCHECK(StoreWithVectorDescriptor::ValueRegister().is(a0)); // a0 |
3824 Register feedback = t1; | 3824 Register feedback = t1; |
3825 Register receiver_map = t2; | 3825 Register receiver_map = t2; |
3826 Register scratch1 = t5; | 3826 Register scratch1 = t5; |
3827 | 3827 |
3828 __ Lsa(feedback, vector, slot, kPointerSizeLog2 - kSmiTagSize); | 3828 __ Lsa(feedback, vector, slot, kPointerSizeLog2 - kSmiTagSize); |
3829 __ lw(feedback, FieldMemOperand(feedback, FixedArray::kHeaderSize)); | 3829 __ lw(feedback, FieldMemOperand(feedback, FixedArray::kHeaderSize)); |
3830 | 3830 |
3831 // Try to quickly handle the monomorphic case without knowing for sure | 3831 // Try to quickly handle the monomorphic case without knowing for sure |
3832 // if we have a weak cell in feedback. We do know it's safe to look | 3832 // if we have a weak cell in feedback. We do know it's safe to look |
3833 // at WeakCell::kValueOffset. | 3833 // at WeakCell::kValueOffset. |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3924 | 3924 |
3925 __ bind(&prepare_next); | 3925 __ bind(&prepare_next); |
3926 __ Addu(pointer_reg, pointer_reg, Operand(kPointerSize * 3)); | 3926 __ Addu(pointer_reg, pointer_reg, Operand(kPointerSize * 3)); |
3927 __ Branch(&next_loop, lt, pointer_reg, Operand(too_far)); | 3927 __ Branch(&next_loop, lt, pointer_reg, Operand(too_far)); |
3928 | 3928 |
3929 // We exhausted our array of map handler pairs. | 3929 // We exhausted our array of map handler pairs. |
3930 __ jmp(miss); | 3930 __ jmp(miss); |
3931 } | 3931 } |
3932 | 3932 |
3933 void KeyedStoreICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { | 3933 void KeyedStoreICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { |
3934 Register receiver = VectorStoreICDescriptor::ReceiverRegister(); // a1 | 3934 Register receiver = StoreWithVectorDescriptor::ReceiverRegister(); // a1 |
3935 Register key = VectorStoreICDescriptor::NameRegister(); // a2 | 3935 Register key = StoreWithVectorDescriptor::NameRegister(); // a2 |
3936 Register vector = VectorStoreICDescriptor::VectorRegister(); // a3 | 3936 Register vector = StoreWithVectorDescriptor::VectorRegister(); // a3 |
3937 Register slot = VectorStoreICDescriptor::SlotRegister(); // t0 | 3937 Register slot = StoreWithVectorDescriptor::SlotRegister(); // t0 |
3938 DCHECK(VectorStoreICDescriptor::ValueRegister().is(a0)); // a0 | 3938 DCHECK(StoreWithVectorDescriptor::ValueRegister().is(a0)); // a0 |
3939 Register feedback = t1; | 3939 Register feedback = t1; |
3940 Register receiver_map = t2; | 3940 Register receiver_map = t2; |
3941 Register scratch1 = t5; | 3941 Register scratch1 = t5; |
3942 | 3942 |
3943 __ Lsa(feedback, vector, slot, kPointerSizeLog2 - kSmiTagSize); | 3943 __ Lsa(feedback, vector, slot, kPointerSizeLog2 - kSmiTagSize); |
3944 __ lw(feedback, FieldMemOperand(feedback, FixedArray::kHeaderSize)); | 3944 __ lw(feedback, FieldMemOperand(feedback, FixedArray::kHeaderSize)); |
3945 | 3945 |
3946 // Try to quickly handle the monomorphic case without knowing for sure | 3946 // Try to quickly handle the monomorphic case without knowing for sure |
3947 // if we have a weak cell in feedback. We do know it's safe to look | 3947 // if we have a weak cell in feedback. We do know it's safe to look |
3948 // at WeakCell::kValueOffset. | 3948 // at WeakCell::kValueOffset. |
(...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5405 kStackUnwindSpace, kInvalidStackOffset, | 5405 kStackUnwindSpace, kInvalidStackOffset, |
5406 return_value_operand, NULL); | 5406 return_value_operand, NULL); |
5407 } | 5407 } |
5408 | 5408 |
5409 #undef __ | 5409 #undef __ |
5410 | 5410 |
5411 } // namespace internal | 5411 } // namespace internal |
5412 } // namespace v8 | 5412 } // namespace v8 |
5413 | 5413 |
5414 #endif // V8_TARGET_ARCH_MIPS | 5414 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |