| 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 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/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 3791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3802 HandleArrayCases(masm, feedback, receiver_map, scratch1, a7, false, &miss); | 3802 HandleArrayCases(masm, feedback, receiver_map, scratch1, a7, false, &miss); |
| 3803 | 3803 |
| 3804 __ bind(&miss); | 3804 __ bind(&miss); |
| 3805 KeyedLoadIC::GenerateMiss(masm); | 3805 KeyedLoadIC::GenerateMiss(masm); |
| 3806 | 3806 |
| 3807 __ bind(&load_smi_map); | 3807 __ bind(&load_smi_map); |
| 3808 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); | 3808 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); |
| 3809 __ Branch(&compare_map); | 3809 __ Branch(&compare_map); |
| 3810 } | 3810 } |
| 3811 | 3811 |
| 3812 | 3812 void StoreICTrampolineStub::Generate(MacroAssembler* masm) { |
| 3813 void VectorStoreICTrampolineStub::Generate(MacroAssembler* masm) { | |
| 3814 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister()); | 3813 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister()); |
| 3815 VectorStoreICStub stub(isolate(), state()); | 3814 StoreICStub stub(isolate(), state()); |
| 3816 stub.GenerateForTrampoline(masm); | 3815 stub.GenerateForTrampoline(masm); |
| 3817 } | 3816 } |
| 3818 | 3817 |
| 3819 | 3818 void KeyedStoreICTrampolineStub::Generate(MacroAssembler* masm) { |
| 3820 void VectorKeyedStoreICTrampolineStub::Generate(MacroAssembler* masm) { | |
| 3821 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister()); | 3819 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister()); |
| 3822 VectorKeyedStoreICStub stub(isolate(), state()); | 3820 KeyedStoreICStub stub(isolate(), state()); |
| 3823 stub.GenerateForTrampoline(masm); | 3821 stub.GenerateForTrampoline(masm); |
| 3824 } | 3822 } |
| 3825 | 3823 |
| 3824 void StoreICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); } |
| 3826 | 3825 |
| 3827 void VectorStoreICStub::Generate(MacroAssembler* masm) { | 3826 void StoreICStub::GenerateForTrampoline(MacroAssembler* masm) { |
| 3828 GenerateImpl(masm, false); | |
| 3829 } | |
| 3830 | |
| 3831 | |
| 3832 void VectorStoreICStub::GenerateForTrampoline(MacroAssembler* masm) { | |
| 3833 GenerateImpl(masm, true); | 3827 GenerateImpl(masm, true); |
| 3834 } | 3828 } |
| 3835 | 3829 |
| 3836 | 3830 void StoreICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { |
| 3837 void VectorStoreICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { | |
| 3838 Register receiver = VectorStoreICDescriptor::ReceiverRegister(); // a1 | 3831 Register receiver = VectorStoreICDescriptor::ReceiverRegister(); // a1 |
| 3839 Register key = VectorStoreICDescriptor::NameRegister(); // a2 | 3832 Register key = VectorStoreICDescriptor::NameRegister(); // a2 |
| 3840 Register vector = VectorStoreICDescriptor::VectorRegister(); // a3 | 3833 Register vector = VectorStoreICDescriptor::VectorRegister(); // a3 |
| 3841 Register slot = VectorStoreICDescriptor::SlotRegister(); // a4 | 3834 Register slot = VectorStoreICDescriptor::SlotRegister(); // a4 |
| 3842 DCHECK(VectorStoreICDescriptor::ValueRegister().is(a0)); // a0 | 3835 DCHECK(VectorStoreICDescriptor::ValueRegister().is(a0)); // a0 |
| 3843 Register feedback = a5; | 3836 Register feedback = a5; |
| 3844 Register receiver_map = a6; | 3837 Register receiver_map = a6; |
| 3845 Register scratch1 = a7; | 3838 Register scratch1 = a7; |
| 3846 | 3839 |
| 3847 __ SmiScale(scratch1, slot, kPointerSizeLog2); | 3840 __ SmiScale(scratch1, slot, kPointerSizeLog2); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 3871 masm, receiver, key, feedback, receiver_map, scratch1, scratch2); | 3864 masm, receiver, key, feedback, receiver_map, scratch1, scratch2); |
| 3872 | 3865 |
| 3873 __ bind(&miss); | 3866 __ bind(&miss); |
| 3874 StoreIC::GenerateMiss(masm); | 3867 StoreIC::GenerateMiss(masm); |
| 3875 | 3868 |
| 3876 __ bind(&load_smi_map); | 3869 __ bind(&load_smi_map); |
| 3877 __ Branch(USE_DELAY_SLOT, &compare_map); | 3870 __ Branch(USE_DELAY_SLOT, &compare_map); |
| 3878 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); // In delay slot. | 3871 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); // In delay slot. |
| 3879 } | 3872 } |
| 3880 | 3873 |
| 3881 | 3874 void KeyedStoreICStub::Generate(MacroAssembler* masm) { |
| 3882 void VectorKeyedStoreICStub::Generate(MacroAssembler* masm) { | |
| 3883 GenerateImpl(masm, false); | 3875 GenerateImpl(masm, false); |
| 3884 } | 3876 } |
| 3885 | 3877 |
| 3886 | 3878 void KeyedStoreICStub::GenerateForTrampoline(MacroAssembler* masm) { |
| 3887 void VectorKeyedStoreICStub::GenerateForTrampoline(MacroAssembler* masm) { | |
| 3888 GenerateImpl(masm, true); | 3879 GenerateImpl(masm, true); |
| 3889 } | 3880 } |
| 3890 | 3881 |
| 3891 | 3882 |
| 3892 static void HandlePolymorphicStoreCase(MacroAssembler* masm, Register feedback, | 3883 static void HandlePolymorphicStoreCase(MacroAssembler* masm, Register feedback, |
| 3893 Register receiver_map, Register scratch1, | 3884 Register receiver_map, Register scratch1, |
| 3894 Register scratch2, Label* miss) { | 3885 Register scratch2, Label* miss) { |
| 3895 // feedback initially contains the feedback array | 3886 // feedback initially contains the feedback array |
| 3896 Label next_loop, prepare_next; | 3887 Label next_loop, prepare_next; |
| 3897 Label start_polymorphic; | 3888 Label start_polymorphic; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3944 __ Jump(t9); | 3935 __ Jump(t9); |
| 3945 | 3936 |
| 3946 __ bind(&prepare_next); | 3937 __ bind(&prepare_next); |
| 3947 __ Daddu(pointer_reg, pointer_reg, Operand(kPointerSize * 3)); | 3938 __ Daddu(pointer_reg, pointer_reg, Operand(kPointerSize * 3)); |
| 3948 __ Branch(&next_loop, lt, pointer_reg, Operand(too_far)); | 3939 __ Branch(&next_loop, lt, pointer_reg, Operand(too_far)); |
| 3949 | 3940 |
| 3950 // We exhausted our array of map handler pairs. | 3941 // We exhausted our array of map handler pairs. |
| 3951 __ Branch(miss); | 3942 __ Branch(miss); |
| 3952 } | 3943 } |
| 3953 | 3944 |
| 3954 | 3945 void KeyedStoreICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { |
| 3955 void VectorKeyedStoreICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { | |
| 3956 Register receiver = VectorStoreICDescriptor::ReceiverRegister(); // a1 | 3946 Register receiver = VectorStoreICDescriptor::ReceiverRegister(); // a1 |
| 3957 Register key = VectorStoreICDescriptor::NameRegister(); // a2 | 3947 Register key = VectorStoreICDescriptor::NameRegister(); // a2 |
| 3958 Register vector = VectorStoreICDescriptor::VectorRegister(); // a3 | 3948 Register vector = VectorStoreICDescriptor::VectorRegister(); // a3 |
| 3959 Register slot = VectorStoreICDescriptor::SlotRegister(); // a4 | 3949 Register slot = VectorStoreICDescriptor::SlotRegister(); // a4 |
| 3960 DCHECK(VectorStoreICDescriptor::ValueRegister().is(a0)); // a0 | 3950 DCHECK(VectorStoreICDescriptor::ValueRegister().is(a0)); // a0 |
| 3961 Register feedback = a5; | 3951 Register feedback = a5; |
| 3962 Register receiver_map = a6; | 3952 Register receiver_map = a6; |
| 3963 Register scratch1 = a7; | 3953 Register scratch1 = a7; |
| 3964 | 3954 |
| 3965 __ SmiScale(scratch1, slot, kPointerSizeLog2); | 3955 __ SmiScale(scratch1, slot, kPointerSizeLog2); |
| (...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5448 kStackUnwindSpace, kInvalidStackOffset, | 5438 kStackUnwindSpace, kInvalidStackOffset, |
| 5449 return_value_operand, NULL); | 5439 return_value_operand, NULL); |
| 5450 } | 5440 } |
| 5451 | 5441 |
| 5452 #undef __ | 5442 #undef __ |
| 5453 | 5443 |
| 5454 } // namespace internal | 5444 } // namespace internal |
| 5455 } // namespace v8 | 5445 } // namespace v8 |
| 5456 | 5446 |
| 5457 #endif // V8_TARGET_ARCH_MIPS64 | 5447 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |