| 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 1887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1898 kRAHasBeenSaved, kDontSaveFPRegs); | 1898 kRAHasBeenSaved, kDontSaveFPRegs); |
| 1899 | 1899 |
| 1900 // Load suspended function and context. | 1900 // Load suspended function and context. |
| 1901 __ ld(cp, FieldMemOperand(a1, JSGeneratorObject::kContextOffset)); | 1901 __ ld(cp, FieldMemOperand(a1, JSGeneratorObject::kContextOffset)); |
| 1902 __ ld(a4, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset)); | 1902 __ ld(a4, FieldMemOperand(a1, JSGeneratorObject::kFunctionOffset)); |
| 1903 | 1903 |
| 1904 // Load receiver and store as the first argument. | 1904 // Load receiver and store as the first argument. |
| 1905 __ ld(a2, FieldMemOperand(a1, JSGeneratorObject::kReceiverOffset)); | 1905 __ ld(a2, FieldMemOperand(a1, JSGeneratorObject::kReceiverOffset)); |
| 1906 __ push(a2); | 1906 __ push(a2); |
| 1907 | 1907 |
| 1908 // Push holes for the rest of the arguments to the generator function. | 1908 // Push holes for arguments to generator function. Since the parser forced |
| 1909 // context allocation for any variables in generators, the actual argument |
| 1910 // values have already been copied into the context and these dummy values |
| 1911 // will never be used. |
| 1909 __ ld(a3, FieldMemOperand(a4, JSFunction::kSharedFunctionInfoOffset)); | 1912 __ ld(a3, FieldMemOperand(a4, JSFunction::kSharedFunctionInfoOffset)); |
| 1910 // The argument count is stored as int32_t on 64-bit platforms. | 1913 // The argument count is stored as int32_t on 64-bit platforms. |
| 1911 // TODO(plind): Smi on 32-bit platforms. | 1914 // TODO(plind): Smi on 32-bit platforms. |
| 1912 __ lw(a3, | 1915 __ lw(a3, |
| 1913 FieldMemOperand(a3, SharedFunctionInfo::kFormalParameterCountOffset)); | 1916 FieldMemOperand(a3, SharedFunctionInfo::kFormalParameterCountOffset)); |
| 1914 __ LoadRoot(a2, Heap::kTheHoleValueRootIndex); | 1917 __ LoadRoot(a2, Heap::kTheHoleValueRootIndex); |
| 1915 Label push_argument_holes, push_frame; | 1918 Label push_argument_holes, push_frame; |
| 1916 __ bind(&push_argument_holes); | 1919 __ bind(&push_argument_holes); |
| 1917 __ Dsubu(a3, a3, Operand(1)); | 1920 __ Dsubu(a3, a3, Operand(1)); |
| 1918 __ Branch(&push_frame, lt, a3, Operand(zero_reg)); | 1921 __ Branch(&push_frame, lt, a3, Operand(zero_reg)); |
| (...skipping 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4123 reinterpret_cast<uint64_t>( | 4126 reinterpret_cast<uint64_t>( |
| 4124 isolate->builtins()->OnStackReplacement()->entry())); | 4127 isolate->builtins()->OnStackReplacement()->entry())); |
| 4125 return ON_STACK_REPLACEMENT; | 4128 return ON_STACK_REPLACEMENT; |
| 4126 } | 4129 } |
| 4127 | 4130 |
| 4128 | 4131 |
| 4129 } // namespace internal | 4132 } // namespace internal |
| 4130 } // namespace v8 | 4133 } // namespace v8 |
| 4131 | 4134 |
| 4132 #endif // V8_TARGET_ARCH_MIPS64 | 4135 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |