| 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 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1962 // the generator was suspended. | 1962 // the generator was suspended. |
| 1963 Label resume_frame, done; | 1963 Label resume_frame, done; |
| 1964 __ bind(&push_frame); | 1964 __ bind(&push_frame); |
| 1965 __ Call(&resume_frame); | 1965 __ Call(&resume_frame); |
| 1966 __ jmp(&done); | 1966 __ jmp(&done); |
| 1967 __ bind(&resume_frame); | 1967 __ bind(&resume_frame); |
| 1968 // ra = return address. | 1968 // ra = return address. |
| 1969 // fp = caller's frame pointer. | 1969 // fp = caller's frame pointer. |
| 1970 // cp = callee's context, | 1970 // cp = callee's context, |
| 1971 // a4 = callee's JS function. | 1971 // a4 = callee's JS function. |
| 1972 __ Push(ra, fp, cp, a4); | 1972 __ PushStandardFrame(a4); |
| 1973 // Adjust FP to point to saved FP. | |
| 1974 __ Daddu(fp, sp, 2 * kPointerSize); | |
| 1975 | 1973 |
| 1976 // Load the operand stack size. | 1974 // Load the operand stack size. |
| 1977 __ ld(a3, FieldMemOperand(a1, JSGeneratorObject::kOperandStackOffset)); | 1975 __ ld(a3, FieldMemOperand(a1, JSGeneratorObject::kOperandStackOffset)); |
| 1978 __ ld(a3, FieldMemOperand(a3, FixedArray::kLengthOffset)); | 1976 __ ld(a3, FieldMemOperand(a3, FixedArray::kLengthOffset)); |
| 1979 __ SmiUntag(a3); | 1977 __ SmiUntag(a3); |
| 1980 | 1978 |
| 1981 // If we are sending a value and there is no operand stack, we can jump back | 1979 // If we are sending a value and there is no operand stack, we can jump back |
| 1982 // in directly. | 1980 // in directly. |
| 1983 if (resume_mode == JSGeneratorObject::NEXT) { | 1981 if (resume_mode == JSGeneratorObject::NEXT) { |
| 1984 Label slow_resume; | 1982 Label slow_resume; |
| (...skipping 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4228 reinterpret_cast<uint64_t>( | 4226 reinterpret_cast<uint64_t>( |
| 4229 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4227 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4230 return OSR_AFTER_STACK_CHECK; | 4228 return OSR_AFTER_STACK_CHECK; |
| 4231 } | 4229 } |
| 4232 | 4230 |
| 4233 | 4231 |
| 4234 } // namespace internal | 4232 } // namespace internal |
| 4235 } // namespace v8 | 4233 } // namespace v8 |
| 4236 | 4234 |
| 4237 #endif // V8_TARGET_ARCH_MIPS64 | 4235 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |