OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
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 3719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3730 HandleArrayCases(masm, feedback, receiver_map, scratch1, r10, false, &miss); | 3730 HandleArrayCases(masm, feedback, receiver_map, scratch1, r10, false, &miss); |
3731 | 3731 |
3732 __ bind(&miss); | 3732 __ bind(&miss); |
3733 KeyedLoadIC::GenerateMiss(masm); | 3733 KeyedLoadIC::GenerateMiss(masm); |
3734 | 3734 |
3735 __ bind(&load_smi_map); | 3735 __ bind(&load_smi_map); |
3736 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); | 3736 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); |
3737 __ b(&compare_map); | 3737 __ b(&compare_map); |
3738 } | 3738 } |
3739 | 3739 |
3740 | 3740 void StoreICTrampolineStub::Generate(MacroAssembler* masm) { |
3741 void VectorStoreICTrampolineStub::Generate(MacroAssembler* masm) { | |
3742 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister()); | 3741 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister()); |
3743 VectorStoreICStub stub(isolate(), state()); | 3742 StoreICStub stub(isolate(), state()); |
3744 stub.GenerateForTrampoline(masm); | 3743 stub.GenerateForTrampoline(masm); |
3745 } | 3744 } |
3746 | 3745 |
3747 | 3746 void KeyedStoreICTrampolineStub::Generate(MacroAssembler* masm) { |
3748 void VectorKeyedStoreICTrampolineStub::Generate(MacroAssembler* masm) { | |
3749 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister()); | 3747 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister()); |
3750 VectorKeyedStoreICStub stub(isolate(), state()); | 3748 KeyedStoreICStub stub(isolate(), state()); |
3751 stub.GenerateForTrampoline(masm); | 3749 stub.GenerateForTrampoline(masm); |
3752 } | 3750 } |
3753 | 3751 |
| 3752 void StoreICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); } |
3754 | 3753 |
3755 void VectorStoreICStub::Generate(MacroAssembler* masm) { | 3754 void StoreICStub::GenerateForTrampoline(MacroAssembler* masm) { |
3756 GenerateImpl(masm, false); | |
3757 } | |
3758 | |
3759 | |
3760 void VectorStoreICStub::GenerateForTrampoline(MacroAssembler* masm) { | |
3761 GenerateImpl(masm, true); | 3755 GenerateImpl(masm, true); |
3762 } | 3756 } |
3763 | 3757 |
3764 | 3758 void StoreICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { |
3765 void VectorStoreICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { | |
3766 Register receiver = VectorStoreICDescriptor::ReceiverRegister(); // r4 | 3759 Register receiver = VectorStoreICDescriptor::ReceiverRegister(); // r4 |
3767 Register key = VectorStoreICDescriptor::NameRegister(); // r5 | 3760 Register key = VectorStoreICDescriptor::NameRegister(); // r5 |
3768 Register vector = VectorStoreICDescriptor::VectorRegister(); // r6 | 3761 Register vector = VectorStoreICDescriptor::VectorRegister(); // r6 |
3769 Register slot = VectorStoreICDescriptor::SlotRegister(); // r7 | 3762 Register slot = VectorStoreICDescriptor::SlotRegister(); // r7 |
3770 DCHECK(VectorStoreICDescriptor::ValueRegister().is(r3)); // r3 | 3763 DCHECK(VectorStoreICDescriptor::ValueRegister().is(r3)); // r3 |
3771 Register feedback = r8; | 3764 Register feedback = r8; |
3772 Register receiver_map = r9; | 3765 Register receiver_map = r9; |
3773 Register scratch1 = r10; | 3766 Register scratch1 = r10; |
3774 | 3767 |
3775 __ SmiToPtrArrayOffset(r0, slot); | 3768 __ SmiToPtrArrayOffset(r0, slot); |
(...skipping 25 matching lines...) Expand all Loading... |
3801 masm, receiver, key, feedback, receiver_map, scratch1, scratch2); | 3794 masm, receiver, key, feedback, receiver_map, scratch1, scratch2); |
3802 | 3795 |
3803 __ bind(&miss); | 3796 __ bind(&miss); |
3804 StoreIC::GenerateMiss(masm); | 3797 StoreIC::GenerateMiss(masm); |
3805 | 3798 |
3806 __ bind(&load_smi_map); | 3799 __ bind(&load_smi_map); |
3807 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); | 3800 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); |
3808 __ b(&compare_map); | 3801 __ b(&compare_map); |
3809 } | 3802 } |
3810 | 3803 |
3811 | 3804 void KeyedStoreICStub::Generate(MacroAssembler* masm) { |
3812 void VectorKeyedStoreICStub::Generate(MacroAssembler* masm) { | |
3813 GenerateImpl(masm, false); | 3805 GenerateImpl(masm, false); |
3814 } | 3806 } |
3815 | 3807 |
3816 | 3808 void KeyedStoreICStub::GenerateForTrampoline(MacroAssembler* masm) { |
3817 void VectorKeyedStoreICStub::GenerateForTrampoline(MacroAssembler* masm) { | |
3818 GenerateImpl(masm, true); | 3809 GenerateImpl(masm, true); |
3819 } | 3810 } |
3820 | 3811 |
3821 | 3812 |
3822 static void HandlePolymorphicStoreCase(MacroAssembler* masm, Register feedback, | 3813 static void HandlePolymorphicStoreCase(MacroAssembler* masm, Register feedback, |
3823 Register receiver_map, Register scratch1, | 3814 Register receiver_map, Register scratch1, |
3824 Register scratch2, Label* miss) { | 3815 Register scratch2, Label* miss) { |
3825 // feedback initially contains the feedback array | 3816 // feedback initially contains the feedback array |
3826 Label next_loop, prepare_next; | 3817 Label next_loop, prepare_next; |
3827 Label start_polymorphic; | 3818 Label start_polymorphic; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3876 | 3867 |
3877 __ bind(&prepare_next); | 3868 __ bind(&prepare_next); |
3878 __ addi(pointer_reg, pointer_reg, Operand(kPointerSize * 3)); | 3869 __ addi(pointer_reg, pointer_reg, Operand(kPointerSize * 3)); |
3879 __ cmpl(pointer_reg, too_far); | 3870 __ cmpl(pointer_reg, too_far); |
3880 __ blt(&next_loop); | 3871 __ blt(&next_loop); |
3881 | 3872 |
3882 // We exhausted our array of map handler pairs. | 3873 // We exhausted our array of map handler pairs. |
3883 __ b(miss); | 3874 __ b(miss); |
3884 } | 3875 } |
3885 | 3876 |
3886 | 3877 void KeyedStoreICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { |
3887 void VectorKeyedStoreICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { | |
3888 Register receiver = VectorStoreICDescriptor::ReceiverRegister(); // r4 | 3878 Register receiver = VectorStoreICDescriptor::ReceiverRegister(); // r4 |
3889 Register key = VectorStoreICDescriptor::NameRegister(); // r5 | 3879 Register key = VectorStoreICDescriptor::NameRegister(); // r5 |
3890 Register vector = VectorStoreICDescriptor::VectorRegister(); // r6 | 3880 Register vector = VectorStoreICDescriptor::VectorRegister(); // r6 |
3891 Register slot = VectorStoreICDescriptor::SlotRegister(); // r7 | 3881 Register slot = VectorStoreICDescriptor::SlotRegister(); // r7 |
3892 DCHECK(VectorStoreICDescriptor::ValueRegister().is(r3)); // r3 | 3882 DCHECK(VectorStoreICDescriptor::ValueRegister().is(r3)); // r3 |
3893 Register feedback = r8; | 3883 Register feedback = r8; |
3894 Register receiver_map = r9; | 3884 Register receiver_map = r9; |
3895 Register scratch1 = r10; | 3885 Register scratch1 = r10; |
3896 | 3886 |
3897 __ SmiToPtrArrayOffset(r0, slot); | 3887 __ SmiToPtrArrayOffset(r0, slot); |
(...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5487 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); | 5477 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); |
5488 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5478 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
5489 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5479 kStackUnwindSpace, NULL, return_value_operand, NULL); |
5490 } | 5480 } |
5491 | 5481 |
5492 #undef __ | 5482 #undef __ |
5493 } // namespace internal | 5483 } // namespace internal |
5494 } // namespace v8 | 5484 } // namespace v8 |
5495 | 5485 |
5496 #endif // V8_TARGET_ARCH_PPC | 5486 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |