| 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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 int32_t sp_delta = arg_count * kPointerSize; | 451 int32_t sp_delta = arg_count * kPointerSize; |
| 452 SetReturnPosition(literal()); | 452 SetReturnPosition(literal()); |
| 453 masm_->mov(sp, fp); | 453 masm_->mov(sp, fp); |
| 454 masm_->MultiPop(static_cast<RegList>(fp.bit() | ra.bit())); | 454 masm_->MultiPop(static_cast<RegList>(fp.bit() | ra.bit())); |
| 455 masm_->Daddu(sp, sp, Operand(sp_delta)); | 455 masm_->Daddu(sp, sp, Operand(sp_delta)); |
| 456 masm_->Jump(ra); | 456 masm_->Jump(ra); |
| 457 } | 457 } |
| 458 } | 458 } |
| 459 } | 459 } |
| 460 | 460 |
| 461 void FullCodeGenerator::RestoreContext() { |
| 462 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| 463 } |
| 461 | 464 |
| 462 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { | 465 void FullCodeGenerator::StackValueContext::Plug(Variable* var) const { |
| 463 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); | 466 DCHECK(var->IsStackAllocated() || var->IsContextSlot()); |
| 464 codegen()->GetVar(result_register(), var); | 467 codegen()->GetVar(result_register(), var); |
| 465 codegen()->PushOperand(result_register()); | 468 codegen()->PushOperand(result_register()); |
| 466 } | 469 } |
| 467 | 470 |
| 468 | 471 |
| 469 void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { | 472 void FullCodeGenerator::EffectContext::Plug(Heap::RootListIndex index) const { |
| 470 } | 473 } |
| (...skipping 3275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3746 Label* if_false = NULL; | 3749 Label* if_false = NULL; |
| 3747 Label* fall_through = NULL; | 3750 Label* fall_through = NULL; |
| 3748 context()->PrepareTest(&materialize_true, &materialize_false, | 3751 context()->PrepareTest(&materialize_true, &materialize_false, |
| 3749 &if_true, &if_false, &fall_through); | 3752 &if_true, &if_false, &fall_through); |
| 3750 | 3753 |
| 3751 Token::Value op = expr->op(); | 3754 Token::Value op = expr->op(); |
| 3752 VisitForStackValue(expr->left()); | 3755 VisitForStackValue(expr->left()); |
| 3753 switch (op) { | 3756 switch (op) { |
| 3754 case Token::IN: | 3757 case Token::IN: |
| 3755 VisitForStackValue(expr->right()); | 3758 VisitForStackValue(expr->right()); |
| 3756 CallRuntimeWithOperands(Runtime::kHasProperty); | 3759 EmitHasProperty(); |
| 3757 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); | 3760 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); |
| 3758 __ LoadRoot(a4, Heap::kTrueValueRootIndex); | 3761 __ LoadRoot(a4, Heap::kTrueValueRootIndex); |
| 3759 Split(eq, v0, Operand(a4), if_true, if_false, fall_through); | 3762 Split(eq, v0, Operand(a4), if_true, if_false, fall_through); |
| 3760 break; | 3763 break; |
| 3761 | 3764 |
| 3762 case Token::INSTANCEOF: { | 3765 case Token::INSTANCEOF: { |
| 3763 VisitForAccumulatorValue(expr->right()); | 3766 VisitForAccumulatorValue(expr->right()); |
| 3764 __ mov(a0, result_register()); | 3767 __ mov(a0, result_register()); |
| 3765 PopOperand(a1); | 3768 PopOperand(a1); |
| 3766 InstanceOfStub stub(isolate()); | 3769 InstanceOfStub stub(isolate()); |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4018 reinterpret_cast<uint64_t>( | 4021 reinterpret_cast<uint64_t>( |
| 4019 isolate->builtins()->OnStackReplacement()->entry())); | 4022 isolate->builtins()->OnStackReplacement()->entry())); |
| 4020 return ON_STACK_REPLACEMENT; | 4023 return ON_STACK_REPLACEMENT; |
| 4021 } | 4024 } |
| 4022 | 4025 |
| 4023 | 4026 |
| 4024 } // namespace internal | 4027 } // namespace internal |
| 4025 } // namespace v8 | 4028 } // namespace v8 |
| 4026 | 4029 |
| 4027 #endif // V8_TARGET_ARCH_MIPS64 | 4030 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |