| 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 #if V8_TARGET_ARCH_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 6 | 6 |
| 7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
| 8 // | 8 // |
| 9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
| 10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
| (...skipping 3001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3012 | 3012 |
| 3013 // Load function and argument count into a1 and a0. | 3013 // Load function and argument count into a1 and a0. |
| 3014 __ li(a0, Operand(arg_count)); | 3014 __ li(a0, Operand(arg_count)); |
| 3015 __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); | 3015 __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); |
| 3016 | 3016 |
| 3017 // Record call targets in unoptimized code. | 3017 // Record call targets in unoptimized code. |
| 3018 __ EmitLoadTypeFeedbackVector(a2); | 3018 __ EmitLoadTypeFeedbackVector(a2); |
| 3019 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); | 3019 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); |
| 3020 | 3020 |
| 3021 CallConstructStub stub(isolate()); | 3021 CallConstructStub stub(isolate()); |
| 3022 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3022 __ Call(stub.GetCode(), RelocInfo::CODE_TARGET); |
| 3023 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 3023 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
| 3024 // Restore context register. | 3024 // Restore context register. |
| 3025 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3025 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 3026 context()->Plug(v0); | 3026 context()->Plug(v0); |
| 3027 } | 3027 } |
| 3028 | 3028 |
| 3029 | 3029 |
| 3030 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 3030 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
| 3031 SuperCallReference* super_call_ref = | 3031 SuperCallReference* super_call_ref = |
| 3032 expr->expression()->AsSuperCallReference(); | 3032 expr->expression()->AsSuperCallReference(); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 3047 SetConstructCallPosition(expr, arg_count); | 3047 SetConstructCallPosition(expr, arg_count); |
| 3048 | 3048 |
| 3049 // Load new target into a3. | 3049 // Load new target into a3. |
| 3050 VisitForAccumulatorValue(super_call_ref->new_target_var()); | 3050 VisitForAccumulatorValue(super_call_ref->new_target_var()); |
| 3051 __ mov(a3, result_register()); | 3051 __ mov(a3, result_register()); |
| 3052 | 3052 |
| 3053 // Load function and argument count into a1 and a0. | 3053 // Load function and argument count into a1 and a0. |
| 3054 __ li(a0, Operand(arg_count)); | 3054 __ li(a0, Operand(arg_count)); |
| 3055 __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); | 3055 __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); |
| 3056 | 3056 |
| 3057 __ Call(isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 3057 __ Call(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
| 3058 | 3058 |
| 3059 RecordJSReturnSite(expr); | 3059 RecordJSReturnSite(expr); |
| 3060 | 3060 |
| 3061 // Restore context register. | 3061 // Restore context register. |
| 3062 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3062 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 3063 context()->Plug(v0); | 3063 context()->Plug(v0); |
| 3064 } | 3064 } |
| 3065 | 3065 |
| 3066 | 3066 |
| 3067 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { | 3067 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3829 __ lw(t0, MemOperand(a2)); | 3829 __ lw(t0, MemOperand(a2)); |
| 3830 __ Push(t0); | 3830 __ Push(t0); |
| 3831 __ Addu(a1, a1, Operand(-1)); | 3831 __ Addu(a1, a1, Operand(-1)); |
| 3832 __ Branch(&loop, ne, a1, Operand(zero_reg)); | 3832 __ Branch(&loop, ne, a1, Operand(zero_reg)); |
| 3833 } | 3833 } |
| 3834 | 3834 |
| 3835 __ bind(&args_set_up); | 3835 __ bind(&args_set_up); |
| 3836 __ sll(at, a0, kPointerSizeLog2); | 3836 __ sll(at, a0, kPointerSizeLog2); |
| 3837 __ Addu(at, at, Operand(sp)); | 3837 __ Addu(at, at, Operand(sp)); |
| 3838 __ lw(a1, MemOperand(at, 0)); | 3838 __ lw(a1, MemOperand(at, 0)); |
| 3839 __ Call(isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 3839 __ Call(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
| 3840 | 3840 |
| 3841 // Restore context register. | 3841 // Restore context register. |
| 3842 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3842 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 3843 | 3843 |
| 3844 context()->DropAndPlug(1, result_register()); | 3844 context()->DropAndPlug(1, result_register()); |
| 3845 } | 3845 } |
| 3846 | 3846 |
| 3847 | 3847 |
| 3848 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { | 3848 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { |
| 3849 ZoneList<Expression*>* args = expr->arguments(); | 3849 ZoneList<Expression*>* args = expr->arguments(); |
| (...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4969 reinterpret_cast<uint32_t>( | 4969 reinterpret_cast<uint32_t>( |
| 4970 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4970 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4971 return OSR_AFTER_STACK_CHECK; | 4971 return OSR_AFTER_STACK_CHECK; |
| 4972 } | 4972 } |
| 4973 | 4973 |
| 4974 | 4974 |
| 4975 } // namespace internal | 4975 } // namespace internal |
| 4976 } // namespace v8 | 4976 } // namespace v8 |
| 4977 | 4977 |
| 4978 #endif // V8_TARGET_ARCH_MIPS | 4978 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |