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 3830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3841 __ jmp(&done); | 3841 __ jmp(&done); |
3842 | 3842 |
3843 NopRuntimeCallHelper call_helper; | 3843 NopRuntimeCallHelper call_helper; |
3844 generator.GenerateSlow(masm_, NOT_PART_OF_IC_HANDLER, call_helper); | 3844 generator.GenerateSlow(masm_, NOT_PART_OF_IC_HANDLER, call_helper); |
3845 | 3845 |
3846 __ bind(&done); | 3846 __ bind(&done); |
3847 context()->Plug(result); | 3847 context()->Plug(result); |
3848 } | 3848 } |
3849 | 3849 |
3850 | 3850 |
3851 void FullCodeGenerator::EmitStringAdd(CallRuntime* expr) { | |
3852 ZoneList<Expression*>* args = expr->arguments(); | |
3853 DCHECK_EQ(2, args->length()); | |
3854 VisitForStackValue(args->at(0)); | |
3855 VisitForAccumulatorValue(args->at(1)); | |
3856 | |
3857 __ pop(a1); | |
3858 __ mov(a0, result_register()); // StringAddStub requires args in a0, a1. | |
3859 StringAddStub stub(isolate(), STRING_ADD_CHECK_BOTH, NOT_TENURED); | |
3860 __ CallStub(&stub); | |
3861 context()->Plug(v0); | |
3862 } | |
3863 | |
3864 | |
3865 void FullCodeGenerator::EmitCall(CallRuntime* expr) { | 3851 void FullCodeGenerator::EmitCall(CallRuntime* expr) { |
3866 ZoneList<Expression*>* args = expr->arguments(); | 3852 ZoneList<Expression*>* args = expr->arguments(); |
3867 DCHECK_LE(2, args->length()); | 3853 DCHECK_LE(2, args->length()); |
3868 // Push target, receiver and arguments onto the stack. | 3854 // Push target, receiver and arguments onto the stack. |
3869 for (Expression* const arg : *args) { | 3855 for (Expression* const arg : *args) { |
3870 VisitForStackValue(arg); | 3856 VisitForStackValue(arg); |
3871 } | 3857 } |
3872 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); | 3858 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); |
3873 // Move target to a1. | 3859 // Move target to a1. |
3874 int const argc = args->length() - 2; | 3860 int const argc = args->length() - 2; |
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5075 reinterpret_cast<uint32_t>( | 5061 reinterpret_cast<uint32_t>( |
5076 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5062 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5077 return OSR_AFTER_STACK_CHECK; | 5063 return OSR_AFTER_STACK_CHECK; |
5078 } | 5064 } |
5079 | 5065 |
5080 | 5066 |
5081 } // namespace internal | 5067 } // namespace internal |
5082 } // namespace v8 | 5068 } // namespace v8 |
5083 | 5069 |
5084 #endif // V8_TARGET_ARCH_MIPS | 5070 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |