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 = | 415 masm->isolate()->load_stub_cache()->GenerateProbe(masm, receiver, key, r6, r7, |
416 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::LOAD_IC)); | 416 r8, r9); |
417 masm->isolate()->stub_cache()->GenerateProbe(masm, Code::KEYED_LOAD_IC, flags, | |
418 receiver, key, r6, r7, r8, r9); | |
419 // Cache miss. | 417 // Cache miss. |
420 GenerateMiss(masm); | 418 GenerateMiss(masm); |
421 | 419 |
422 // Do a quick inline probe of the receiver's dictionary, if it | 420 // Do a quick inline probe of the receiver's dictionary, if it |
423 // exists. | 421 // exists. |
424 __ bind(&probe_dictionary); | 422 __ bind(&probe_dictionary); |
425 // r5: elements | 423 // r5: elements |
426 __ LoadP(r2, FieldMemOperand(receiver, HeapObject::kMapOffset)); | 424 __ LoadP(r2, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
427 __ LoadlB(r2, FieldMemOperand(r2, Map::kInstanceTypeOffset)); | 425 __ LoadlB(r2, FieldMemOperand(r2, Map::kInstanceTypeOffset)); |
428 GenerateGlobalInstanceTypeCheck(masm, r2, &slow); | 426 GenerateGlobalInstanceTypeCheck(masm, r2, &slow); |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 Register vector = VectorStoreICDescriptor::VectorRegister(); | 661 Register vector = VectorStoreICDescriptor::VectorRegister(); |
664 Register slot = VectorStoreICDescriptor::SlotRegister(); | 662 Register slot = VectorStoreICDescriptor::SlotRegister(); |
665 DCHECK(!AreAliased(vector, slot, r7, r8, r9, ip)); | 663 DCHECK(!AreAliased(vector, slot, r7, r8, r9, ip)); |
666 Handle<TypeFeedbackVector> dummy_vector = | 664 Handle<TypeFeedbackVector> dummy_vector = |
667 TypeFeedbackVector::DummyVector(masm->isolate()); | 665 TypeFeedbackVector::DummyVector(masm->isolate()); |
668 int slot_index = dummy_vector->GetIndex( | 666 int slot_index = dummy_vector->GetIndex( |
669 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); | 667 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); |
670 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); | 668 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); |
671 __ LoadSmiLiteral(slot, Smi::FromInt(slot_index)); | 669 __ LoadSmiLiteral(slot, Smi::FromInt(slot_index)); |
672 | 670 |
673 Code::Flags flags = | 671 masm->isolate()->store_stub_cache()->GenerateProbe(masm, receiver, key, r7, |
674 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::STORE_IC)); | 672 r8, r9, ip); |
675 masm->isolate()->stub_cache()->GenerateProbe( | |
676 masm, Code::KEYED_STORE_IC, flags, receiver, key, r7, r8, r9, ip); | |
677 // Cache miss. | 673 // Cache miss. |
678 __ b(&miss); | 674 __ b(&miss); |
679 | 675 |
680 // Extra capacity case: Check if there is extra capacity to | 676 // Extra capacity case: Check if there is extra capacity to |
681 // perform the store and update the length. Used for adding one | 677 // perform the store and update the length. Used for adding one |
682 // element to the array by writing to array[array.length]. | 678 // element to the array by writing to array[array.length]. |
683 __ bind(&extra); | 679 __ bind(&extra); |
684 // Condition code from comparing key and array length is still available. | 680 // Condition code from comparing key and array length is still available. |
685 __ bne(&slow); // Only support writing to writing to array[array.length]. | 681 __ bne(&slow); // Only support writing to writing to array[array.length]. |
686 // Check for room in the elements backing store. | 682 // Check for room in the elements backing store. |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 patcher.masm()->brcl(cc, Operand((branch_instr & 0xffffffff) << 1)); | 866 patcher.masm()->brcl(cc, Operand((branch_instr & 0xffffffff) << 1)); |
871 } else { | 867 } else { |
872 DCHECK(false); | 868 DCHECK(false); |
873 } | 869 } |
874 } | 870 } |
875 | 871 |
876 } // namespace internal | 872 } // namespace internal |
877 } // namespace v8 | 873 } // namespace v8 |
878 | 874 |
879 #endif // V8_TARGET_ARCH_S390 | 875 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |