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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
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 3005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3016 | 3016 |
3017 // Load function and argument count into a1 and a0. | 3017 // Load function and argument count into a1 and a0. |
3018 __ li(a0, Operand(arg_count)); | 3018 __ li(a0, Operand(arg_count)); |
3019 __ ld(a1, MemOperand(sp, arg_count * kPointerSize)); | 3019 __ ld(a1, MemOperand(sp, arg_count * kPointerSize)); |
3020 | 3020 |
3021 // Record call targets in unoptimized code. | 3021 // Record call targets in unoptimized code. |
3022 __ EmitLoadTypeFeedbackVector(a2); | 3022 __ EmitLoadTypeFeedbackVector(a2); |
3023 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); | 3023 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); |
3024 | 3024 |
3025 CallConstructStub stub(isolate()); | 3025 CallConstructStub stub(isolate()); |
3026 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3026 __ Call(stub.GetCode(), RelocInfo::CODE_TARGET); |
3027 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 3027 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
3028 // Restore context register. | 3028 // Restore context register. |
3029 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3029 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
3030 context()->Plug(v0); | 3030 context()->Plug(v0); |
3031 } | 3031 } |
3032 | 3032 |
3033 | 3033 |
3034 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 3034 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
3035 SuperCallReference* super_call_ref = | 3035 SuperCallReference* super_call_ref = |
3036 expr->expression()->AsSuperCallReference(); | 3036 expr->expression()->AsSuperCallReference(); |
(...skipping 14 matching lines...) Expand all Loading... |
3051 SetConstructCallPosition(expr, arg_count); | 3051 SetConstructCallPosition(expr, arg_count); |
3052 | 3052 |
3053 // Load new target into a3. | 3053 // Load new target into a3. |
3054 VisitForAccumulatorValue(super_call_ref->new_target_var()); | 3054 VisitForAccumulatorValue(super_call_ref->new_target_var()); |
3055 __ mov(a3, result_register()); | 3055 __ mov(a3, result_register()); |
3056 | 3056 |
3057 // Load function and argument count into a1 and a0. | 3057 // Load function and argument count into a1 and a0. |
3058 __ li(a0, Operand(arg_count)); | 3058 __ li(a0, Operand(arg_count)); |
3059 __ ld(a1, MemOperand(sp, arg_count * kPointerSize)); | 3059 __ ld(a1, MemOperand(sp, arg_count * kPointerSize)); |
3060 | 3060 |
3061 __ Call(isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 3061 __ Call(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
3062 | 3062 |
3063 RecordJSReturnSite(expr); | 3063 RecordJSReturnSite(expr); |
3064 | 3064 |
3065 // Restore context register. | 3065 // Restore context register. |
3066 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3066 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
3067 context()->Plug(v0); | 3067 context()->Plug(v0); |
3068 } | 3068 } |
3069 | 3069 |
3070 | 3070 |
3071 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { | 3071 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3834 __ ld(a4, MemOperand(a2)); | 3834 __ ld(a4, MemOperand(a2)); |
3835 __ Push(a4); | 3835 __ Push(a4); |
3836 __ Daddu(a1, a1, Operand(-1)); | 3836 __ Daddu(a1, a1, Operand(-1)); |
3837 __ Branch(&loop, ne, a1, Operand(zero_reg)); | 3837 __ Branch(&loop, ne, a1, Operand(zero_reg)); |
3838 } | 3838 } |
3839 | 3839 |
3840 __ bind(&args_set_up); | 3840 __ bind(&args_set_up); |
3841 __ dsll(at, a0, kPointerSizeLog2); | 3841 __ dsll(at, a0, kPointerSizeLog2); |
3842 __ Daddu(at, at, Operand(sp)); | 3842 __ Daddu(at, at, Operand(sp)); |
3843 __ ld(a1, MemOperand(at, 0)); | 3843 __ ld(a1, MemOperand(at, 0)); |
3844 __ Call(isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 3844 __ Call(isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
3845 | 3845 |
3846 // Restore context register. | 3846 // Restore context register. |
3847 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3847 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
3848 | 3848 |
3849 context()->DropAndPlug(1, result_register()); | 3849 context()->DropAndPlug(1, result_register()); |
3850 } | 3850 } |
3851 | 3851 |
3852 | 3852 |
3853 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { | 3853 void FullCodeGenerator::EmitHasCachedArrayIndex(CallRuntime* expr) { |
3854 ZoneList<Expression*>* args = expr->arguments(); | 3854 ZoneList<Expression*>* args = expr->arguments(); |
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4977 reinterpret_cast<uint64_t>( | 4977 reinterpret_cast<uint64_t>( |
4978 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4978 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4979 return OSR_AFTER_STACK_CHECK; | 4979 return OSR_AFTER_STACK_CHECK; |
4980 } | 4980 } |
4981 | 4981 |
4982 | 4982 |
4983 } // namespace internal | 4983 } // namespace internal |
4984 } // namespace v8 | 4984 } // namespace v8 |
4985 | 4985 |
4986 #endif // V8_TARGET_ARCH_MIPS64 | 4986 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |