| 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 3763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3774 // overwritten by the write barrier code and is needed afterward. | 3774 // overwritten by the write barrier code and is needed afterward. |
| 3775 __ mov(a2, v0); | 3775 __ mov(a2, v0); |
| 3776 __ RecordWriteField( | 3776 __ RecordWriteField( |
| 3777 a1, JSValue::kValueOffset, a2, a3, kRAHasBeenSaved, kDontSaveFPRegs); | 3777 a1, JSValue::kValueOffset, a2, a3, kRAHasBeenSaved, kDontSaveFPRegs); |
| 3778 | 3778 |
| 3779 __ bind(&done); | 3779 __ bind(&done); |
| 3780 context()->Plug(v0); | 3780 context()->Plug(v0); |
| 3781 } | 3781 } |
| 3782 | 3782 |
| 3783 | 3783 |
| 3784 void FullCodeGenerator::EmitToInteger(CallRuntime* expr) { |
| 3785 ZoneList<Expression*>* args = expr->arguments(); |
| 3786 DCHECK_EQ(1, args->length()); |
| 3787 |
| 3788 // Load the argument into v0 and convert it. |
| 3789 VisitForAccumulatorValue(args->at(0)); |
| 3790 |
| 3791 // Convert the object to an integer. |
| 3792 Label done_convert; |
| 3793 __ JumpIfSmi(v0, &done_convert); |
| 3794 __ Push(v0); |
| 3795 __ CallRuntime(Runtime::kToInteger, 1); |
| 3796 __ bind(&done_convert); |
| 3797 context()->Plug(v0); |
| 3798 } |
| 3799 |
| 3800 |
| 3784 void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { | 3801 void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { |
| 3785 ZoneList<Expression*>* args = expr->arguments(); | 3802 ZoneList<Expression*>* args = expr->arguments(); |
| 3786 DCHECK_EQ(args->length(), 1); | 3803 DCHECK_EQ(args->length(), 1); |
| 3787 | 3804 |
| 3788 // Load the argument into a0 and call the stub. | 3805 // Load the argument into a0 and call the stub. |
| 3789 VisitForAccumulatorValue(args->at(0)); | 3806 VisitForAccumulatorValue(args->at(0)); |
| 3790 __ mov(a0, result_register()); | 3807 __ mov(a0, result_register()); |
| 3791 | 3808 |
| 3792 NumberToStringStub stub(isolate()); | 3809 NumberToStringStub stub(isolate()); |
| 3793 __ CallStub(&stub); | 3810 __ CallStub(&stub); |
| (...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5229 reinterpret_cast<uint64_t>( | 5246 reinterpret_cast<uint64_t>( |
| 5230 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5247 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5231 return OSR_AFTER_STACK_CHECK; | 5248 return OSR_AFTER_STACK_CHECK; |
| 5232 } | 5249 } |
| 5233 | 5250 |
| 5234 | 5251 |
| 5235 } // namespace internal | 5252 } // namespace internal |
| 5236 } // namespace v8 | 5253 } // namespace v8 |
| 5237 | 5254 |
| 5238 #endif // V8_TARGET_ARCH_MIPS64 | 5255 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |