| OLD | NEW |
| 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 Loading... |
| 2669 | 2669 |
| 2670 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2670 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 2671 DCHECK(ToRegister(instr->context()).is(cp)); | 2671 DCHECK(ToRegister(instr->context()).is(cp)); |
| 2672 DCHECK(ToRegister(instr->global_object()) | 2672 DCHECK(ToRegister(instr->global_object()) |
| 2673 .is(LoadDescriptor::ReceiverRegister())); | 2673 .is(LoadDescriptor::ReceiverRegister())); |
| 2674 DCHECK(ToRegister(instr->result()).is(r2)); | 2674 DCHECK(ToRegister(instr->result()).is(r2)); |
| 2675 | 2675 |
| 2676 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 2676 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
| 2677 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 2677 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
| 2678 Handle<Code> ic = | 2678 Handle<Code> ic = |
| 2679 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode()) | 2679 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode()) |
| 2680 .code(); | 2680 .code(); |
| 2681 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2681 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2682 } | 2682 } |
| 2683 | 2683 |
| 2684 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 2684 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
| 2685 Register context = ToRegister(instr->context()); | 2685 Register context = ToRegister(instr->context()); |
| 2686 Register result = ToRegister(instr->result()); | 2686 Register result = ToRegister(instr->result()); |
| 2687 __ LoadP(result, ContextMemOperand(context, instr->slot_index())); | 2687 __ LoadP(result, ContextMemOperand(context, instr->slot_index())); |
| 2688 if (instr->hydrogen()->RequiresHoleCheck()) { | 2688 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 2689 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); | 2689 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2771 } | 2771 } |
| 2772 | 2772 |
| 2773 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 2773 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
| 2774 DCHECK(ToRegister(instr->context()).is(cp)); | 2774 DCHECK(ToRegister(instr->context()).is(cp)); |
| 2775 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 2775 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
| 2776 DCHECK(ToRegister(instr->result()).is(r2)); | 2776 DCHECK(ToRegister(instr->result()).is(r2)); |
| 2777 | 2777 |
| 2778 // Name is always in r4. | 2778 // Name is always in r4. |
| 2779 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 2779 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
| 2780 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 2780 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
| 2781 Handle<Code> ic = | 2781 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate()).code(); |
| 2782 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_INSIDE_TYPEOF).code(); | |
| 2783 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2782 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2784 } | 2783 } |
| 2785 | 2784 |
| 2786 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 2785 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
| 2787 Register scratch = scratch0(); | 2786 Register scratch = scratch0(); |
| 2788 Register function = ToRegister(instr->function()); | 2787 Register function = ToRegister(instr->function()); |
| 2789 Register result = ToRegister(instr->result()); | 2788 Register result = ToRegister(instr->result()); |
| 2790 | 2789 |
| 2791 // Get the prototype or initial map from the function. | 2790 // Get the prototype or initial map from the function. |
| 2792 __ LoadP(result, | 2791 __ LoadP(result, |
| (...skipping 2908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5701 __ LoadP(result, | 5700 __ LoadP(result, |
| 5702 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5701 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
| 5703 __ bind(deferred->exit()); | 5702 __ bind(deferred->exit()); |
| 5704 __ bind(&done); | 5703 __ bind(&done); |
| 5705 } | 5704 } |
| 5706 | 5705 |
| 5707 #undef __ | 5706 #undef __ |
| 5708 | 5707 |
| 5709 } // namespace internal | 5708 } // namespace internal |
| 5710 } // namespace v8 | 5709 } // namespace v8 |
| OLD | NEW |