| 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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 | 432 |
| 433 __ bind(&index_name); | 433 __ bind(&index_name); |
| 434 __ IndexFromHash(r5, key); | 434 __ IndexFromHash(r5, key); |
| 435 // Now jump to the place where smi keys are handled. | 435 // Now jump to the place where smi keys are handled. |
| 436 __ b(&index_smi); | 436 __ b(&index_smi); |
| 437 } | 437 } |
| 438 | 438 |
| 439 static void StoreIC_PushArgs(MacroAssembler* masm) { | 439 static void StoreIC_PushArgs(MacroAssembler* masm) { |
| 440 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), | 440 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), |
| 441 StoreDescriptor::ValueRegister(), | 441 StoreDescriptor::ValueRegister(), |
| 442 VectorStoreICDescriptor::SlotRegister(), | 442 StoreWithVectorDescriptor::SlotRegister(), |
| 443 VectorStoreICDescriptor::VectorRegister()); | 443 StoreWithVectorDescriptor::VectorRegister()); |
| 444 } | 444 } |
| 445 | 445 |
| 446 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { | 446 void KeyedStoreIC::GenerateMiss(MacroAssembler* masm) { |
| 447 StoreIC_PushArgs(masm); | 447 StoreIC_PushArgs(masm); |
| 448 | 448 |
| 449 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss); | 449 __ TailCallRuntime(Runtime::kKeyedStoreIC_Miss); |
| 450 } | 450 } |
| 451 | 451 |
| 452 static void KeyedStoreGenerateMegamorphicHelper( | 452 static void KeyedStoreGenerateMegamorphicHelper( |
| 453 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, | 453 MacroAssembler* masm, Label* fast_object, Label* fast_double, Label* slow, |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode); | 651 PropertyICCompiler::GenerateRuntimeSetProperty(masm, language_mode); |
| 652 // Never returns to here. | 652 // Never returns to here. |
| 653 | 653 |
| 654 __ bind(&maybe_name_key); | 654 __ bind(&maybe_name_key); |
| 655 __ LoadP(r6, FieldMemOperand(key, HeapObject::kMapOffset)); | 655 __ LoadP(r6, FieldMemOperand(key, HeapObject::kMapOffset)); |
| 656 __ LoadlB(r6, FieldMemOperand(r6, Map::kInstanceTypeOffset)); | 656 __ LoadlB(r6, FieldMemOperand(r6, Map::kInstanceTypeOffset)); |
| 657 __ JumpIfNotUniqueNameInstanceType(r6, &slow); | 657 __ JumpIfNotUniqueNameInstanceType(r6, &slow); |
| 658 | 658 |
| 659 // The handlers in the stub cache expect a vector and slot. Since we won't | 659 // The handlers in the stub cache expect a vector and slot. Since we won't |
| 660 // change the IC from any downstream misses, a dummy vector can be used. | 660 // change the IC from any downstream misses, a dummy vector can be used. |
| 661 Register vector = VectorStoreICDescriptor::VectorRegister(); | 661 Register vector = StoreWithVectorDescriptor::VectorRegister(); |
| 662 Register slot = VectorStoreICDescriptor::SlotRegister(); | 662 Register slot = StoreWithVectorDescriptor::SlotRegister(); |
| 663 DCHECK(!AreAliased(vector, slot, r7, r8, r9, ip)); | 663 DCHECK(!AreAliased(vector, slot, r7, r8, r9, ip)); |
| 664 Handle<TypeFeedbackVector> dummy_vector = | 664 Handle<TypeFeedbackVector> dummy_vector = |
| 665 TypeFeedbackVector::DummyVector(masm->isolate()); | 665 TypeFeedbackVector::DummyVector(masm->isolate()); |
| 666 int slot_index = dummy_vector->GetIndex( | 666 int slot_index = dummy_vector->GetIndex( |
| 667 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); | 667 FeedbackVectorSlot(TypeFeedbackVector::kDummyKeyedStoreICSlot)); |
| 668 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); | 668 __ LoadRoot(vector, Heap::kDummyVectorRootIndex); |
| 669 __ LoadSmiLiteral(slot, Smi::FromInt(slot_index)); | 669 __ LoadSmiLiteral(slot, Smi::FromInt(slot_index)); |
| 670 | 670 |
| 671 masm->isolate()->store_stub_cache()->GenerateProbe(masm, receiver, key, r7, | 671 masm->isolate()->store_stub_cache()->GenerateProbe(masm, receiver, key, r7, |
| 672 r8, r9, ip); | 672 r8, r9, ip); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 | 724 |
| 725 void StoreIC::GenerateNormal(MacroAssembler* masm) { | 725 void StoreIC::GenerateNormal(MacroAssembler* masm) { |
| 726 Label miss; | 726 Label miss; |
| 727 Register receiver = StoreDescriptor::ReceiverRegister(); | 727 Register receiver = StoreDescriptor::ReceiverRegister(); |
| 728 Register name = StoreDescriptor::NameRegister(); | 728 Register name = StoreDescriptor::NameRegister(); |
| 729 Register value = StoreDescriptor::ValueRegister(); | 729 Register value = StoreDescriptor::ValueRegister(); |
| 730 Register dictionary = r7; | 730 Register dictionary = r7; |
| 731 DCHECK(receiver.is(r3)); | 731 DCHECK(receiver.is(r3)); |
| 732 DCHECK(name.is(r4)); | 732 DCHECK(name.is(r4)); |
| 733 DCHECK(value.is(r2)); | 733 DCHECK(value.is(r2)); |
| 734 DCHECK(VectorStoreICDescriptor::VectorRegister().is(r5)); | 734 DCHECK(StoreWithVectorDescriptor::VectorRegister().is(r5)); |
| 735 DCHECK(VectorStoreICDescriptor::SlotRegister().is(r6)); | 735 DCHECK(StoreWithVectorDescriptor::SlotRegister().is(r6)); |
| 736 | 736 |
| 737 __ LoadP(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); | 737 __ LoadP(dictionary, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); |
| 738 | 738 |
| 739 GenerateDictionaryStore(masm, &miss, dictionary, name, value, r8, r9); | 739 GenerateDictionaryStore(masm, &miss, dictionary, name, value, r8, r9); |
| 740 Counters* counters = masm->isolate()->counters(); | 740 Counters* counters = masm->isolate()->counters(); |
| 741 __ IncrementCounter(counters->ic_store_normal_hit(), 1, r8, r9); | 741 __ IncrementCounter(counters->ic_store_normal_hit(), 1, r8, r9); |
| 742 __ Ret(); | 742 __ Ret(); |
| 743 | 743 |
| 744 __ bind(&miss); | 744 __ bind(&miss); |
| 745 __ IncrementCounter(counters->ic_store_normal_miss(), 1, r8, r9); | 745 __ IncrementCounter(counters->ic_store_normal_miss(), 1, r8, r9); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 patcher.masm()->brcl(cc, Operand((branch_instr & 0xffffffff) << 1)); | 866 patcher.masm()->brcl(cc, Operand((branch_instr & 0xffffffff) << 1)); |
| 867 } else { | 867 } else { |
| 868 DCHECK(false); | 868 DCHECK(false); |
| 869 } | 869 } |
| 870 } | 870 } |
| 871 | 871 |
| 872 } // namespace internal | 872 } // namespace internal |
| 873 } // namespace v8 | 873 } // namespace v8 |
| 874 | 874 |
| 875 #endif // V8_TARGET_ARCH_S390 | 875 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |