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 2763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2774 __ bind(&null); | 2774 __ bind(&null); |
2775 __ LoadRoot(v0, Heap::kNullValueRootIndex); | 2775 __ LoadRoot(v0, Heap::kNullValueRootIndex); |
2776 | 2776 |
2777 // All done. | 2777 // All done. |
2778 __ bind(&done); | 2778 __ bind(&done); |
2779 | 2779 |
2780 context()->Plug(v0); | 2780 context()->Plug(v0); |
2781 } | 2781 } |
2782 | 2782 |
2783 | 2783 |
2784 void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { | |
2785 ZoneList<Expression*>* args = expr->arguments(); | |
2786 DCHECK(args->length() == 1); | |
2787 | |
2788 VisitForAccumulatorValue(args->at(0)); | |
2789 | |
2790 Label done; | |
2791 StringCharFromCodeGenerator generator(v0, a1); | |
2792 generator.GenerateFast(masm_); | |
2793 __ jmp(&done); | |
2794 | |
2795 NopRuntimeCallHelper call_helper; | |
2796 generator.GenerateSlow(masm_, call_helper); | |
2797 | |
2798 __ bind(&done); | |
2799 context()->Plug(a1); | |
2800 } | |
2801 | |
2802 | |
2803 void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) { | 2784 void FullCodeGenerator::EmitStringCharCodeAt(CallRuntime* expr) { |
2804 ZoneList<Expression*>* args = expr->arguments(); | 2785 ZoneList<Expression*>* args = expr->arguments(); |
2805 DCHECK(args->length() == 2); | 2786 DCHECK(args->length() == 2); |
2806 | 2787 |
2807 VisitForStackValue(args->at(0)); | 2788 VisitForStackValue(args->at(0)); |
2808 VisitForAccumulatorValue(args->at(1)); | 2789 VisitForAccumulatorValue(args->at(1)); |
2809 __ mov(a0, result_register()); | 2790 __ mov(a0, result_register()); |
2810 | 2791 |
2811 Register object = a1; | 2792 Register object = a1; |
2812 Register index = a0; | 2793 Register index = a0; |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3702 reinterpret_cast<uint64_t>( | 3683 reinterpret_cast<uint64_t>( |
3703 isolate->builtins()->OnStackReplacement()->entry())); | 3684 isolate->builtins()->OnStackReplacement()->entry())); |
3704 return ON_STACK_REPLACEMENT; | 3685 return ON_STACK_REPLACEMENT; |
3705 } | 3686 } |
3706 | 3687 |
3707 | 3688 |
3708 } // namespace internal | 3689 } // namespace internal |
3709 } // namespace v8 | 3690 } // namespace v8 |
3710 | 3691 |
3711 #endif // V8_TARGET_ARCH_MIPS64 | 3692 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |