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_S390 | 5 #if V8_TARGET_ARCH_S390 |
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 3650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3661 HandleArrayCases(masm, feedback, receiver_map, scratch1, r9, false, &miss); | 3661 HandleArrayCases(masm, feedback, receiver_map, scratch1, r9, false, &miss); |
3662 | 3662 |
3663 __ bind(&miss); | 3663 __ bind(&miss); |
3664 KeyedLoadIC::GenerateMiss(masm); | 3664 KeyedLoadIC::GenerateMiss(masm); |
3665 | 3665 |
3666 __ bind(&load_smi_map); | 3666 __ bind(&load_smi_map); |
3667 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); | 3667 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); |
3668 __ b(&compare_map); | 3668 __ b(&compare_map); |
3669 } | 3669 } |
3670 | 3670 |
3671 void VectorStoreICTrampolineStub::Generate(MacroAssembler* masm) { | 3671 void StoreICTrampolineStub::Generate(MacroAssembler* masm) { |
3672 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister()); | 3672 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister()); |
3673 VectorStoreICStub stub(isolate(), state()); | 3673 StoreICStub stub(isolate(), state()); |
3674 stub.GenerateForTrampoline(masm); | 3674 stub.GenerateForTrampoline(masm); |
3675 } | 3675 } |
3676 | 3676 |
3677 void VectorKeyedStoreICTrampolineStub::Generate(MacroAssembler* masm) { | 3677 void KeyedStoreICTrampolineStub::Generate(MacroAssembler* masm) { |
3678 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister()); | 3678 __ EmitLoadTypeFeedbackVector(VectorStoreICDescriptor::VectorRegister()); |
3679 VectorKeyedStoreICStub stub(isolate(), state()); | 3679 KeyedStoreICStub stub(isolate(), state()); |
3680 stub.GenerateForTrampoline(masm); | 3680 stub.GenerateForTrampoline(masm); |
3681 } | 3681 } |
3682 | 3682 |
3683 void VectorStoreICStub::Generate(MacroAssembler* masm) { | 3683 void StoreICStub::Generate(MacroAssembler* masm) { GenerateImpl(masm, false); } |
3684 GenerateImpl(masm, false); | |
3685 } | |
3686 | 3684 |
3687 void VectorStoreICStub::GenerateForTrampoline(MacroAssembler* masm) { | 3685 void StoreICStub::GenerateForTrampoline(MacroAssembler* masm) { |
3688 GenerateImpl(masm, true); | 3686 GenerateImpl(masm, true); |
3689 } | 3687 } |
3690 | 3688 |
3691 void VectorStoreICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { | 3689 void StoreICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { |
3692 Register receiver = VectorStoreICDescriptor::ReceiverRegister(); // r3 | 3690 Register receiver = VectorStoreICDescriptor::ReceiverRegister(); // r3 |
3693 Register key = VectorStoreICDescriptor::NameRegister(); // r4 | 3691 Register key = VectorStoreICDescriptor::NameRegister(); // r4 |
3694 Register vector = VectorStoreICDescriptor::VectorRegister(); // r5 | 3692 Register vector = VectorStoreICDescriptor::VectorRegister(); // r5 |
3695 Register slot = VectorStoreICDescriptor::SlotRegister(); // r6 | 3693 Register slot = VectorStoreICDescriptor::SlotRegister(); // r6 |
3696 DCHECK(VectorStoreICDescriptor::ValueRegister().is(r2)); // r2 | 3694 DCHECK(VectorStoreICDescriptor::ValueRegister().is(r2)); // r2 |
3697 Register feedback = r7; | 3695 Register feedback = r7; |
3698 Register receiver_map = r8; | 3696 Register receiver_map = r8; |
3699 Register scratch1 = r9; | 3697 Register scratch1 = r9; |
3700 | 3698 |
3701 __ SmiToPtrArrayOffset(r0, slot); | 3699 __ SmiToPtrArrayOffset(r0, slot); |
(...skipping 25 matching lines...) Expand all Loading... |
3727 masm, receiver, key, feedback, receiver_map, scratch1, scratch2); | 3725 masm, receiver, key, feedback, receiver_map, scratch1, scratch2); |
3728 | 3726 |
3729 __ bind(&miss); | 3727 __ bind(&miss); |
3730 StoreIC::GenerateMiss(masm); | 3728 StoreIC::GenerateMiss(masm); |
3731 | 3729 |
3732 __ bind(&load_smi_map); | 3730 __ bind(&load_smi_map); |
3733 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); | 3731 __ LoadRoot(receiver_map, Heap::kHeapNumberMapRootIndex); |
3734 __ b(&compare_map); | 3732 __ b(&compare_map); |
3735 } | 3733 } |
3736 | 3734 |
3737 void VectorKeyedStoreICStub::Generate(MacroAssembler* masm) { | 3735 void KeyedStoreICStub::Generate(MacroAssembler* masm) { |
3738 GenerateImpl(masm, false); | 3736 GenerateImpl(masm, false); |
3739 } | 3737 } |
3740 | 3738 |
3741 void VectorKeyedStoreICStub::GenerateForTrampoline(MacroAssembler* masm) { | 3739 void KeyedStoreICStub::GenerateForTrampoline(MacroAssembler* masm) { |
3742 GenerateImpl(masm, true); | 3740 GenerateImpl(masm, true); |
3743 } | 3741 } |
3744 | 3742 |
3745 static void HandlePolymorphicStoreCase(MacroAssembler* masm, Register feedback, | 3743 static void HandlePolymorphicStoreCase(MacroAssembler* masm, Register feedback, |
3746 Register receiver_map, Register scratch1, | 3744 Register receiver_map, Register scratch1, |
3747 Register scratch2, Label* miss) { | 3745 Register scratch2, Label* miss) { |
3748 // feedback initially contains the feedback array | 3746 // feedback initially contains the feedback array |
3749 Label next_loop, prepare_next; | 3747 Label next_loop, prepare_next; |
3750 Label start_polymorphic; | 3748 Label start_polymorphic; |
3751 Label transition_call; | 3749 Label transition_call; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3799 | 3797 |
3800 __ bind(&prepare_next); | 3798 __ bind(&prepare_next); |
3801 __ AddP(pointer_reg, pointer_reg, Operand(kPointerSize * 3)); | 3799 __ AddP(pointer_reg, pointer_reg, Operand(kPointerSize * 3)); |
3802 __ CmpLogicalP(pointer_reg, too_far); | 3800 __ CmpLogicalP(pointer_reg, too_far); |
3803 __ blt(&next_loop); | 3801 __ blt(&next_loop); |
3804 | 3802 |
3805 // We exhausted our array of map handler pairs. | 3803 // We exhausted our array of map handler pairs. |
3806 __ b(miss); | 3804 __ b(miss); |
3807 } | 3805 } |
3808 | 3806 |
3809 void VectorKeyedStoreICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { | 3807 void KeyedStoreICStub::GenerateImpl(MacroAssembler* masm, bool in_frame) { |
3810 Register receiver = VectorStoreICDescriptor::ReceiverRegister(); // r3 | 3808 Register receiver = VectorStoreICDescriptor::ReceiverRegister(); // r3 |
3811 Register key = VectorStoreICDescriptor::NameRegister(); // r4 | 3809 Register key = VectorStoreICDescriptor::NameRegister(); // r4 |
3812 Register vector = VectorStoreICDescriptor::VectorRegister(); // r5 | 3810 Register vector = VectorStoreICDescriptor::VectorRegister(); // r5 |
3813 Register slot = VectorStoreICDescriptor::SlotRegister(); // r6 | 3811 Register slot = VectorStoreICDescriptor::SlotRegister(); // r6 |
3814 DCHECK(VectorStoreICDescriptor::ValueRegister().is(r2)); // r2 | 3812 DCHECK(VectorStoreICDescriptor::ValueRegister().is(r2)); // r2 |
3815 Register feedback = r7; | 3813 Register feedback = r7; |
3816 Register receiver_map = r8; | 3814 Register receiver_map = r8; |
3817 Register scratch1 = r9; | 3815 Register scratch1 = r9; |
3818 | 3816 |
3819 __ SmiToPtrArrayOffset(r0, slot); | 3817 __ SmiToPtrArrayOffset(r0, slot); |
(...skipping 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5393 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5391 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
5394 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5392 kStackUnwindSpace, NULL, return_value_operand, NULL); |
5395 } | 5393 } |
5396 | 5394 |
5397 #undef __ | 5395 #undef __ |
5398 | 5396 |
5399 } // namespace internal | 5397 } // namespace internal |
5400 } // namespace v8 | 5398 } // namespace v8 |
5401 | 5399 |
5402 #endif // V8_TARGET_ARCH_S390 | 5400 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |