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