| 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 3138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3149 .code(); | 3149 .code(); |
| 3150 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3150 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3151 } | 3151 } |
| 3152 | 3152 |
| 3153 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3153 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
| 3154 Register scratch = scratch0(); | 3154 Register scratch = scratch0(); |
| 3155 Register result = ToRegister(instr->result()); | 3155 Register result = ToRegister(instr->result()); |
| 3156 | 3156 |
| 3157 if (instr->hydrogen()->from_inlined()) { | 3157 if (instr->hydrogen()->from_inlined()) { |
| 3158 __ lay(result, MemOperand(sp, -2 * kPointerSize)); | 3158 __ lay(result, MemOperand(sp, -2 * kPointerSize)); |
| 3159 } else { | 3159 } else if (instr->hydrogen()->arguments_adaptor()) { |
| 3160 // Check if the calling frame is an arguments adaptor frame. | 3160 // Check if the calling frame is an arguments adaptor frame. |
| 3161 Label done, adapted; | 3161 Label done, adapted; |
| 3162 __ LoadP(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 3162 __ LoadP(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 3163 __ LoadP( | 3163 __ LoadP( |
| 3164 result, | 3164 result, |
| 3165 MemOperand(scratch, CommonFrameConstants::kContextOrFrameTypeOffset)); | 3165 MemOperand(scratch, CommonFrameConstants::kContextOrFrameTypeOffset)); |
| 3166 __ CmpSmiLiteral(result, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0); | 3166 __ CmpSmiLiteral(result, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0); |
| 3167 | 3167 |
| 3168 // Result is the frame pointer for the frame if not adapted and for the real | 3168 // Result is the frame pointer for the frame if not adapted and for the real |
| 3169 // frame below the adaptor frame if adapted. | 3169 // frame below the adaptor frame if adapted. |
| 3170 __ beq(&adapted, Label::kNear); | 3170 __ beq(&adapted, Label::kNear); |
| 3171 __ LoadRR(result, fp); | 3171 __ LoadRR(result, fp); |
| 3172 __ b(&done, Label::kNear); | 3172 __ b(&done, Label::kNear); |
| 3173 | 3173 |
| 3174 __ bind(&adapted); | 3174 __ bind(&adapted); |
| 3175 __ LoadRR(result, scratch); | 3175 __ LoadRR(result, scratch); |
| 3176 __ bind(&done); | 3176 __ bind(&done); |
| 3177 } else { |
| 3178 __ LoadRR(result, fp); |
| 3177 } | 3179 } |
| 3178 } | 3180 } |
| 3179 | 3181 |
| 3180 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { | 3182 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { |
| 3181 Register elem = ToRegister(instr->elements()); | 3183 Register elem = ToRegister(instr->elements()); |
| 3182 Register result = ToRegister(instr->result()); | 3184 Register result = ToRegister(instr->result()); |
| 3183 | 3185 |
| 3184 Label done; | 3186 Label done; |
| 3185 | 3187 |
| 3186 // If no arguments adaptor frame the number of arguments is fixed. | 3188 // If no arguments adaptor frame the number of arguments is fixed. |
| (...skipping 2474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5661 } | 5663 } |
| 5662 | 5664 |
| 5663 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { | 5665 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { |
| 5664 Register context = ToRegister(instr->context()); | 5666 Register context = ToRegister(instr->context()); |
| 5665 __ StoreP(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 5667 __ StoreP(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 5666 } | 5668 } |
| 5667 | 5669 |
| 5668 #undef __ | 5670 #undef __ |
| 5669 } // namespace internal | 5671 } // namespace internal |
| 5670 } // namespace v8 | 5672 } // namespace v8 |
| OLD | NEW |