Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: src/crankshaft/s390/lithium-codegen-s390.cc

Issue 2028663002: S390: IC: Eliminate initialization_state as a factor in IC installation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/crankshaft/s390/lithium-s390.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // 2 //
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "src/crankshaft/s390/lithium-codegen-s390.h" 6 #include "src/crankshaft/s390/lithium-codegen-s390.h"
7 7
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2658 matching lines...) Expand 10 before | Expand all | Expand 10 after
2669 } 2669 }
2670 2670
2671 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { 2671 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) {
2672 DCHECK(ToRegister(instr->context()).is(cp)); 2672 DCHECK(ToRegister(instr->context()).is(cp));
2673 DCHECK(ToRegister(instr->global_object()) 2673 DCHECK(ToRegister(instr->global_object())
2674 .is(LoadDescriptor::ReceiverRegister())); 2674 .is(LoadDescriptor::ReceiverRegister()));
2675 DCHECK(ToRegister(instr->result()).is(r2)); 2675 DCHECK(ToRegister(instr->result()).is(r2));
2676 2676
2677 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); 2677 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
2678 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); 2678 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr);
2679 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 2679 Handle<Code> ic =
2680 isolate(), instr->typeof_mode(), PREMONOMORPHIC) 2680 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode())
2681 .code(); 2681 .code();
2682 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2682 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2683 } 2683 }
2684 2684
2685 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2685 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2686 Register context = ToRegister(instr->context()); 2686 Register context = ToRegister(instr->context());
2687 Register result = ToRegister(instr->result()); 2687 Register result = ToRegister(instr->result());
2688 __ LoadP(result, ContextMemOperand(context, instr->slot_index())); 2688 __ LoadP(result, ContextMemOperand(context, instr->slot_index()));
2689 if (instr->hydrogen()->RequiresHoleCheck()) { 2689 if (instr->hydrogen()->RequiresHoleCheck()) {
2690 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 2690 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
2691 if (instr->hydrogen()->DeoptimizesOnHole()) { 2691 if (instr->hydrogen()->DeoptimizesOnHole()) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
2772 } 2772 }
2773 2773
2774 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 2774 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2775 DCHECK(ToRegister(instr->context()).is(cp)); 2775 DCHECK(ToRegister(instr->context()).is(cp));
2776 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 2776 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
2777 DCHECK(ToRegister(instr->result()).is(r2)); 2777 DCHECK(ToRegister(instr->result()).is(r2));
2778 2778
2779 // Name is always in r4. 2779 // Name is always in r4.
2780 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); 2780 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name()));
2781 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); 2781 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
2782 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode( 2782 Handle<Code> ic =
2783 isolate(), NOT_INSIDE_TYPEOF, 2783 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_INSIDE_TYPEOF).code();
2784 instr->hydrogen()->initialization_state())
2785 .code();
2786 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2784 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2787 } 2785 }
2788 2786
2789 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 2787 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
2790 Register scratch = scratch0(); 2788 Register scratch = scratch0();
2791 Register function = ToRegister(instr->function()); 2789 Register function = ToRegister(instr->function());
2792 Register result = ToRegister(instr->result()); 2790 Register result = ToRegister(instr->result());
2793 2791
2794 // Get the prototype or initial map from the function. 2792 // Get the prototype or initial map from the function.
2795 __ LoadP(result, 2793 __ LoadP(result,
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
3122 __ AddP(scratch, Operand(base_offset)); 3120 __ AddP(scratch, Operand(base_offset));
3123 base_offset = 0; 3121 base_offset = 0;
3124 } 3122 }
3125 return MemOperand(scratch, base, base_offset); 3123 return MemOperand(scratch, base, base_offset);
3126 } 3124 }
3127 3125
3128 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3126 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3129 DCHECK(ToRegister(instr->context()).is(cp)); 3127 DCHECK(ToRegister(instr->context()).is(cp));
3130 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3128 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3131 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3129 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3130 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3132 3131
3133 if (instr->hydrogen()->HasVectorAndSlot()) { 3132 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate()).code();
3134 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3135 }
3136
3137 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(
3138 isolate(), instr->hydrogen()->initialization_state())
3139 .code();
3140 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3133 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3141 } 3134 }
3142 3135
3143 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3136 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3144 Register scratch = scratch0(); 3137 Register scratch = scratch0();
3145 Register result = ToRegister(instr->result()); 3138 Register result = ToRegister(instr->result());
3146 3139
3147 if (instr->hydrogen()->from_inlined()) { 3140 if (instr->hydrogen()->from_inlined()) {
3148 __ lay(result, MemOperand(sp, -2 * kPointerSize)); 3141 __ lay(result, MemOperand(sp, -2 * kPointerSize));
3149 } else if (instr->hydrogen()->arguments_adaptor()) { 3142 } else if (instr->hydrogen()->arguments_adaptor()) {
(...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after
3983 EMIT_REMEMBERED_SET, hinstr->SmiCheckForWriteBarrier(), 3976 EMIT_REMEMBERED_SET, hinstr->SmiCheckForWriteBarrier(),
3984 hinstr->PointersToHereCheckForValue()); 3977 hinstr->PointersToHereCheckForValue());
3985 } 3978 }
3986 } 3979 }
3987 3980
3988 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 3981 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
3989 DCHECK(ToRegister(instr->context()).is(cp)); 3982 DCHECK(ToRegister(instr->context()).is(cp));
3990 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); 3983 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
3991 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); 3984 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
3992 3985
3993 if (instr->hydrogen()->HasVectorAndSlot()) { 3986 EmitVectorStoreICRegisters<LStoreNamedGeneric>(instr);
3994 EmitVectorStoreICRegisters<LStoreNamedGeneric>(instr);
3995 }
3996 3987
3997 __ mov(StoreDescriptor::NameRegister(), Operand(instr->name())); 3988 __ mov(StoreDescriptor::NameRegister(), Operand(instr->name()));
3998 Handle<Code> ic = CodeFactory::StoreICInOptimizedCode( 3989 Handle<Code> ic =
3999 isolate(), instr->language_mode(), 3990 CodeFactory::StoreICInOptimizedCode(isolate(), instr->language_mode())
4000 instr->hydrogen()->initialization_state()) 3991 .code();
4001 .code();
4002 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3992 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4003 } 3993 }
4004 3994
4005 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) { 3995 void LCodeGen::DoBoundsCheck(LBoundsCheck* instr) {
4006 Representation representation = instr->hydrogen()->length()->representation(); 3996 Representation representation = instr->hydrogen()->length()->representation();
4007 DCHECK(representation.Equals(instr->hydrogen()->index()->representation())); 3997 DCHECK(representation.Equals(instr->hydrogen()->index()->representation()));
4008 DCHECK(representation.IsSmiOrInteger32()); 3998 DCHECK(representation.IsSmiOrInteger32());
4009 3999
4010 Condition cc = instr->hydrogen()->allow_equality() ? lt : le; 4000 Condition cc = instr->hydrogen()->allow_equality() ? lt : le;
4011 if (instr->length()->IsConstantOperand()) { 4001 if (instr->length()->IsConstantOperand()) {
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
4284 DoStoreKeyedFixedArray(instr); 4274 DoStoreKeyedFixedArray(instr);
4285 } 4275 }
4286 } 4276 }
4287 4277
4288 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 4278 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
4289 DCHECK(ToRegister(instr->context()).is(cp)); 4279 DCHECK(ToRegister(instr->context()).is(cp));
4290 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); 4280 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
4291 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister())); 4281 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
4292 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); 4282 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
4293 4283
4294 if (instr->hydrogen()->HasVectorAndSlot()) { 4284 EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
4295 EmitVectorStoreICRegisters<LStoreKeyedGeneric>(instr);
4296 }
4297 4285
4298 Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode( 4286 Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
4299 isolate(), instr->language_mode(), 4287 isolate(), instr->language_mode())
4300 instr->hydrogen()->initialization_state())
4301 .code(); 4288 .code();
4302 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4289 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4303 } 4290 }
4304 4291
4305 void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) { 4292 void LCodeGen::DoMaybeGrowElements(LMaybeGrowElements* instr) {
4306 class DeferredMaybeGrowElements final : public LDeferredCode { 4293 class DeferredMaybeGrowElements final : public LDeferredCode {
4307 public: 4294 public:
4308 DeferredMaybeGrowElements(LCodeGen* codegen, LMaybeGrowElements* instr) 4295 DeferredMaybeGrowElements(LCodeGen* codegen, LMaybeGrowElements* instr)
4309 : LDeferredCode(codegen), instr_(instr) {} 4296 : LDeferredCode(codegen), instr_(instr) {}
4310 void Generate() override { codegen()->DoDeferredMaybeGrowElements(instr_); } 4297 void Generate() override { codegen()->DoDeferredMaybeGrowElements(instr_); }
(...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
5704 __ LoadP(result, 5691 __ LoadP(result,
5705 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5692 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5706 __ bind(deferred->exit()); 5693 __ bind(deferred->exit());
5707 __ bind(&done); 5694 __ bind(&done);
5708 } 5695 }
5709 5696
5710 #undef __ 5697 #undef __
5711 5698
5712 } // namespace internal 5699 } // namespace internal
5713 } // namespace v8 5700 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/crankshaft/s390/lithium-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698