| 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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 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 1947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1958 // the generator was suspended. | 1958 // the generator was suspended. |
| 1959 Label resume_frame, done; | 1959 Label resume_frame, done; |
| 1960 __ bind(&push_frame); | 1960 __ bind(&push_frame); |
| 1961 __ Call(&resume_frame); | 1961 __ Call(&resume_frame); |
| 1962 __ jmp(&done); | 1962 __ jmp(&done); |
| 1963 __ bind(&resume_frame); | 1963 __ bind(&resume_frame); |
| 1964 // ra = return address. | 1964 // ra = return address. |
| 1965 // fp = caller's frame pointer. | 1965 // fp = caller's frame pointer. |
| 1966 // cp = callee's context, | 1966 // cp = callee's context, |
| 1967 // t0 = callee's JS function. | 1967 // t0 = callee's JS function. |
| 1968 __ Push(ra, fp, cp, t0); | 1968 __ PushStandardFrame(t0); |
| 1969 // Adjust FP to point to saved FP. | |
| 1970 __ Addu(fp, sp, 2 * kPointerSize); | |
| 1971 | 1969 |
| 1972 // Load the operand stack size. | 1970 // Load the operand stack size. |
| 1973 __ lw(a3, FieldMemOperand(a1, JSGeneratorObject::kOperandStackOffset)); | 1971 __ lw(a3, FieldMemOperand(a1, JSGeneratorObject::kOperandStackOffset)); |
| 1974 __ lw(a3, FieldMemOperand(a3, FixedArray::kLengthOffset)); | 1972 __ lw(a3, FieldMemOperand(a3, FixedArray::kLengthOffset)); |
| 1975 __ SmiUntag(a3); | 1973 __ SmiUntag(a3); |
| 1976 | 1974 |
| 1977 // If we are sending a value and there is no operand stack, we can jump back | 1975 // If we are sending a value and there is no operand stack, we can jump back |
| 1978 // in directly. | 1976 // in directly. |
| 1979 if (resume_mode == JSGeneratorObject::NEXT) { | 1977 if (resume_mode == JSGeneratorObject::NEXT) { |
| 1980 Label slow_resume; | 1978 Label slow_resume; |
| (...skipping 2235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4216 reinterpret_cast<uint32_t>( | 4214 reinterpret_cast<uint32_t>( |
| 4217 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4215 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4218 return OSR_AFTER_STACK_CHECK; | 4216 return OSR_AFTER_STACK_CHECK; |
| 4219 } | 4217 } |
| 4220 | 4218 |
| 4221 | 4219 |
| 4222 } // namespace internal | 4220 } // namespace internal |
| 4223 } // namespace v8 | 4221 } // namespace v8 |
| 4224 | 4222 |
| 4225 #endif // V8_TARGET_ARCH_MIPS | 4223 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |