| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
| 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
| (...skipping 3147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3158 } | 3158 } |
| 3159 | 3159 |
| 3160 | 3160 |
| 3161 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3161 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
| 3162 Register scratch = scratch0(); | 3162 Register scratch = scratch0(); |
| 3163 Register temp = scratch1(); | 3163 Register temp = scratch1(); |
| 3164 Register result = ToRegister(instr->result()); | 3164 Register result = ToRegister(instr->result()); |
| 3165 | 3165 |
| 3166 if (instr->hydrogen()->from_inlined()) { | 3166 if (instr->hydrogen()->from_inlined()) { |
| 3167 __ Dsubu(result, sp, 2 * kPointerSize); | 3167 __ Dsubu(result, sp, 2 * kPointerSize); |
| 3168 } else { | 3168 } else if (instr->hydrogen()->arguments_adaptor()) { |
| 3169 // Check if the calling frame is an arguments adaptor frame. | 3169 // Check if the calling frame is an arguments adaptor frame. |
| 3170 Label done, adapted; | 3170 Label done, adapted; |
| 3171 __ ld(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 3171 __ ld(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 3172 __ ld(result, | 3172 __ ld(result, |
| 3173 MemOperand(scratch, CommonFrameConstants::kContextOrFrameTypeOffset)); | 3173 MemOperand(scratch, CommonFrameConstants::kContextOrFrameTypeOffset)); |
| 3174 __ Xor(temp, result, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 3174 __ Xor(temp, result, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
| 3175 | 3175 |
| 3176 // Result is the frame pointer for the frame if not adapted and for the real | 3176 // Result is the frame pointer for the frame if not adapted and for the real |
| 3177 // frame below the adaptor frame if adapted. | 3177 // frame below the adaptor frame if adapted. |
| 3178 __ Movn(result, fp, temp); // Move only if temp is not equal to zero (ne). | 3178 __ Movn(result, fp, temp); // Move only if temp is not equal to zero (ne). |
| 3179 __ Movz(result, scratch, temp); // Move only if temp is equal to zero (eq). | 3179 __ Movz(result, scratch, temp); // Move only if temp is equal to zero (eq). |
| 3180 } else { |
| 3181 __ mov(result, fp); |
| 3180 } | 3182 } |
| 3181 } | 3183 } |
| 3182 | 3184 |
| 3183 | 3185 |
| 3184 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { | 3186 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { |
| 3185 Register elem = ToRegister(instr->elements()); | 3187 Register elem = ToRegister(instr->elements()); |
| 3186 Register result = ToRegister(instr->result()); | 3188 Register result = ToRegister(instr->result()); |
| 3187 | 3189 |
| 3188 Label done; | 3190 Label done; |
| 3189 | 3191 |
| (...skipping 2572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5762 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { | 5764 void LCodeGen::DoStoreFrameContext(LStoreFrameContext* instr) { |
| 5763 Register context = ToRegister(instr->context()); | 5765 Register context = ToRegister(instr->context()); |
| 5764 __ sd(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 5766 __ sd(context, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 5765 } | 5767 } |
| 5766 | 5768 |
| 5767 | 5769 |
| 5768 #undef __ | 5770 #undef __ |
| 5769 | 5771 |
| 5770 } // namespace internal | 5772 } // namespace internal |
| 5771 } // namespace v8 | 5773 } // namespace v8 |
| OLD | NEW |