| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
| (...skipping 3188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3199 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 3199 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 3200 } | 3200 } |
| 3201 | 3201 |
| 3202 | 3202 |
| 3203 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3203 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
| 3204 Register scratch = scratch0(); | 3204 Register scratch = scratch0(); |
| 3205 Register result = ToRegister(instr->result()); | 3205 Register result = ToRegister(instr->result()); |
| 3206 | 3206 |
| 3207 if (instr->hydrogen()->from_inlined()) { | 3207 if (instr->hydrogen()->from_inlined()) { |
| 3208 __ subi(result, sp, Operand(2 * kPointerSize)); | 3208 __ subi(result, sp, Operand(2 * kPointerSize)); |
| 3209 } else { | 3209 } else if (instr->hydrogen()->arguments_adaptor()) { |
| 3210 // Check if the calling frame is an arguments adaptor frame. | 3210 // Check if the calling frame is an arguments adaptor frame. |
| 3211 __ LoadP(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 3211 __ LoadP(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 3212 __ LoadP( | 3212 __ LoadP( |
| 3213 result, | 3213 result, |
| 3214 MemOperand(scratch, CommonFrameConstants::kContextOrFrameTypeOffset)); | 3214 MemOperand(scratch, CommonFrameConstants::kContextOrFrameTypeOffset)); |
| 3215 __ CmpSmiLiteral(result, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0); | 3215 __ CmpSmiLiteral(result, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR), r0); |
| 3216 | 3216 |
| 3217 // Result is the frame pointer for the frame if not adapted and for the real | 3217 // Result is the frame pointer for the frame if not adapted and for the real |
| 3218 // frame below the adaptor frame if adapted. | 3218 // frame below the adaptor frame if adapted. |
| 3219 if (CpuFeatures::IsSupported(ISELECT)) { | 3219 if (CpuFeatures::IsSupported(ISELECT)) { |
| 3220 __ isel(eq, result, scratch, fp); | 3220 __ isel(eq, result, scratch, fp); |
| 3221 } else { | 3221 } else { |
| 3222 Label done, adapted; | 3222 Label done, adapted; |
| 3223 __ beq(&adapted); | 3223 __ beq(&adapted); |
| 3224 __ mr(result, fp); | 3224 __ mr(result, fp); |
| 3225 __ b(&done); | 3225 __ b(&done); |
| 3226 | 3226 |
| 3227 __ bind(&adapted); | 3227 __ bind(&adapted); |
| 3228 __ mr(result, scratch); | 3228 __ mr(result, scratch); |
| 3229 __ bind(&done); | 3229 __ bind(&done); |
| 3230 } | 3230 } |
| 3231 } else { |
| 3232 __ mr(result, fp); |
| 3231 } | 3233 } |
| 3232 } | 3234 } |
| 3233 | 3235 |
| 3234 | 3236 |
| 3235 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { | 3237 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { |
| 3236 Register elem = ToRegister(instr->elements()); | 3238 Register elem = ToRegister(instr->elements()); |
| 3237 Register result = ToRegister(instr->result()); | 3239 Register result = ToRegister(instr->result()); |
| 3238 | 3240 |
| 3239 Label done; | 3241 Label done; |
| 3240 | 3242 |
| (...skipping 2513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5754 | 5756 |
| 5755 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { | 5757 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { |
| 5756 Register context = ToRegister(instr->context()); | 5758 Register context = ToRegister(instr->context()); |
| 5757 __ StoreP(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 5759 __ StoreP(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 5758 } | 5760 } |
| 5759 | 5761 |
| 5760 | 5762 |
| 5761 #undef __ | 5763 #undef __ |
| 5762 } // namespace internal | 5764 } // namespace internal |
| 5763 } // namespace v8 | 5765 } // namespace v8 |
| OLD | NEW |