OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/ic/ic.h" | 7 #include "src/ic/ic.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 Register vector = LoadWithVectorDescriptor::VectorRegister(); | 405 Register vector = LoadWithVectorDescriptor::VectorRegister(); |
406 Register slot = LoadWithVectorDescriptor::SlotRegister(); | 406 Register slot = LoadWithVectorDescriptor::SlotRegister(); |
407 DCHECK(!AreAliased(vector, slot, r6, r7, r8, r9)); | 407 DCHECK(!AreAliased(vector, slot, r6, r7, r8, r9)); |
408 Handle<TypeFeedbackVector> dummy_vector = | 408 Handle<TypeFeedbackVector> dummy_vector = |
409 TypeFeedbackVector::DummyVector(masm->isolate()); | 409 TypeFeedbackVector::DummyVector(masm->isolate()); |
410 int slot_index = dummy_vector->GetIndex( | 410 int slot_index = dummy_vector->GetIndex( |
411 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot)); | 411 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedLoadICSlot)); |
412 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); | 412 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); |
413 __ LoadSmiLiteral(slot, Smi::FromInt(slot_index)); | 413 __ LoadSmiLiteral(slot, Smi::FromInt(slot_index)); |
414 | 414 |
415 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 415 Code::Flags flags = |
416 Code::ComputeHandlerFlags(Code::LOAD_IC)); | 416 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::LOAD_IC)); |
417 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags, | 417 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags, |
418 receiver, key, r6, r7, r8, r9); | 418 receiver, key, r6, r7, r8, r9); |
419 // Cache miss. | 419 // Cache miss. |
420 GenerateMiss(masm); | 420 GenerateMiss(masm); |
421 | 421 |
422 // Do a quick inline probe of the receiver's dictionary, if it | 422 // Do a quick inline probe of the receiver's dictionary, if it |
423 // exists. | 423 // exists. |
424 __ bind(&probe_dictionary); | 424 __ bind(&probe_dictionary); |
425 // r5: elements | 425 // r5: elements |
426 __ LoadP(r2, FieldMemOperand(receiver, HeapObject::kMapOffset)); | 426 __ LoadP(r2, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 Register vector = VectorStoreICDescriptor::VectorRegister(); | 664 Register vector = VectorStoreICDescriptor::VectorRegister(); |
665 Register slot = VectorStoreICDescriptor::SlotRegister(); | 665 Register slot = VectorStoreICDescriptor::SlotRegister(); |
666 DCHECK(!AreAliased(vector, slot, r7, r8, r9, ip)); | 666 DCHECK(!AreAliased(vector, slot, r7, r8, r9, ip)); |
667 Handle<TypeFeedbackVector> dummy_vector = | 667 Handle<TypeFeedbackVector> dummy_vector = |
668 TypeFeedbackVector::DummyVector(masm->isolate()); | 668 TypeFeedbackVector::DummyVector(masm->isolate()); |
669 int slot_index = dummy_vector->GetIndex( | 669 int slot_index = dummy_vector->GetIndex( |
670 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); | 670 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); |
671 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); | 671 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); |
672 __ LoadSmiLiteral(slot, Smi::FromInt(slot_index)); | 672 __ LoadSmiLiteral(slot, Smi::FromInt(slot_index)); |
673 | 673 |
674 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 674 Code::Flags flags = |
675 Code::ComputeHandlerFlags(Code::STORE_IC)); | 675 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::STORE_IC)); |
676 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags, | 676 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags, |
677 receiver, key, r7, r8, r9, ip); | 677 receiver, key, r7, r8, r9, ip); |
678 // Cache miss. | 678 // Cache miss. |
679 __ b(&miss); | 679 __ b(&miss); |
680 | 680 |
681 // Extra capacity case: Check if there is extra capacity to | 681 // Extra capacity case: Check if there is extra capacity to |
682 // perform the store and update the length. Used for adding one | 682 // perform the store and update the length. Used for adding one |
683 // element to the array by writing to array[array.length]. | 683 // element to the array by writing to array[array.length]. |
684 __ bind(&extra); | 684 __ bind(&extra); |
685 // Condition code from comparing key and array length is still available. | 685 // Condition code from comparing key and array length is still available. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 } | 721 } |
722 | 722 |
723 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { | 723 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { |
724 Register receiver = StoreDescriptor::ReceiverRegister(); | 724 Register receiver = StoreDescriptor::ReceiverRegister(); |
725 Register name = StoreDescriptor::NameRegister(); | 725 Register name = StoreDescriptor::NameRegister(); |
726 DCHECK(receiver.is(r3)); | 726 DCHECK(receiver.is(r3)); |
727 DCHECK(name.is(r4)); | 727 DCHECK(name.is(r4)); |
728 DCHECK(StoreDescriptor::ValueRegister().is(r2)); | 728 DCHECK(StoreDescriptor::ValueRegister().is(r2)); |
729 | 729 |
730 // Get the receiver from the stack and probe the stub cache. | 730 // Get the receiver from the stack and probe the stub cache. |
731 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 731 Code::Flags flags = |
732 Code::ComputeHandlerFlags(Code::STORE_IC)); | 732 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::STORE_IC)); |
733 | 733 |
734 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags, | 734 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::STORE_IC, flags, |
735 receiver, name, r5, r6, r7, r8); | 735 receiver, name, r5, r6, r7, r8); |
736 | 736 |
737 // Cache miss: Jump to runtime. | 737 // Cache miss: Jump to runtime. |
738 GenerateMiss(masm); | 738 GenerateMiss(masm); |
739 } | 739 } |
740 | 740 |
741 void StoreIC::GenerateMiss(MacroAssembler* masm) { | 741 void StoreIC::GenerateMiss(MacroAssembler* masm) { |
742 StoreIC_PushArgs(masm); | 742 StoreIC_PushArgs(masm); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 patcher.masm()->brcl(cc, Operand((branch_instr & 0xffffffff) << 1)); | 888 patcher.masm()->brcl(cc, Operand((branch_instr & 0xffffffff) << 1)); |
889 } else { | 889 } else { |
890 DCHECK(false); | 890 DCHECK(false); |
891 } | 891 } |
892 } | 892 } |
893 | 893 |
894 } // namespace internal | 894 } // namespace internal |
895 } // namespace v8 | 895 } // namespace v8 |
896 | 896 |
897 #endif // V8_TARGET_ARCH_S390 | 897 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |