| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 // Push the return value on the stack as the parameter. | 443 // Push the return value on the stack as the parameter. |
| 444 // Runtime::TraceExit returns its parameter in v0. | 444 // Runtime::TraceExit returns its parameter in v0. |
| 445 __ push(v0); | 445 __ push(v0); |
| 446 __ CallRuntime(Runtime::kTraceExit); | 446 __ CallRuntime(Runtime::kTraceExit); |
| 447 } | 447 } |
| 448 EmitProfilingCounterHandlingForReturnSequence(false); | 448 EmitProfilingCounterHandlingForReturnSequence(false); |
| 449 | 449 |
| 450 // Make sure that the constant pool is not emitted inside of the return | 450 // Make sure that the constant pool is not emitted inside of the return |
| 451 // sequence. | 451 // sequence. |
| 452 { Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_); | 452 { Assembler::BlockTrampolinePoolScope block_trampoline_pool(masm_); |
| 453 // Here we use masm_-> instead of the __ macro to avoid the code coverage | |
| 454 // tool from instrumenting as we rely on the code size here. | |
| 455 int32_t arg_count = info_->scope()->num_parameters() + 1; | 453 int32_t arg_count = info_->scope()->num_parameters() + 1; |
| 456 int32_t sp_delta = arg_count * kPointerSize; | 454 int32_t sp_delta = arg_count * kPointerSize; |
| 457 SetReturnPosition(literal()); | 455 SetReturnPosition(literal()); |
| 458 masm_->mov(sp, fp); | 456 __ mov(sp, fp); |
| 459 masm_->MultiPop(static_cast<RegList>(fp.bit() | ra.bit())); | 457 __ MultiPop(static_cast<RegList>(fp.bit() | ra.bit())); |
| 460 masm_->Addu(sp, sp, Operand(sp_delta)); | 458 __ Addu(sp, sp, Operand(sp_delta)); |
| 461 masm_->Jump(ra); | 459 __ Jump(ra); |
| 462 } | 460 } |
| 463 } | 461 } |
| 464 } | 462 } |
| 465 | 463 |
| 466 void FullCodeGenerator::RestoreContext() { | 464 void FullCodeGenerator::RestoreContext() { |
| 467 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 465 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 468 } | 466 } |
| 469 | 467 |
| 470 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { | 468 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { |
| 471 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); | 469 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
| (...skipping 3316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3788 reinterpret_cast<uint32_t>( | 3786 reinterpret_cast<uint32_t>( |
| 3789 isolate->builtins()->OnStackReplacement()->entry())); | 3787 isolate->builtins()->OnStackReplacement()->entry())); |
| 3790 return ON_STACK_REPLACEMENT; | 3788 return ON_STACK_REPLACEMENT; |
| 3791 } | 3789 } |
| 3792 | 3790 |
| 3793 | 3791 |
| 3794 } // namespace internal | 3792 } // namespace internal |
| 3795 } // namespace v8 | 3793 } // namespace v8 |
| 3796 | 3794 |
| 3797 #endif // V8_TARGET_ARCH_MIPS | 3795 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |