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 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1926 // the generator was suspended. | 1926 // the generator was suspended. |
1927 Label resume_frame, done; | 1927 Label resume_frame, done; |
1928 __ bind(&push_frame); | 1928 __ bind(&push_frame); |
1929 __ Call(&resume_frame); | 1929 __ Call(&resume_frame); |
1930 __ jmp(&done); | 1930 __ jmp(&done); |
1931 __ bind(&resume_frame); | 1931 __ bind(&resume_frame); |
1932 // ra = return address. | 1932 // ra = return address. |
1933 // fp = caller's frame pointer. | 1933 // fp = caller's frame pointer. |
1934 // cp = callee's context, | 1934 // cp = callee's context, |
1935 // t0 = callee's JS function. | 1935 // t0 = callee's JS function. |
1936 __ Push(ra, fp, cp, t0); | 1936 __ PushStandardFrame(t0); |
1937 // Adjust FP to point to saved FP. | |
1938 __ Addu(fp, sp, 2 * kPointerSize); | |
1939 | 1937 |
1940 // Load the operand stack size. | 1938 // Load the operand stack size. |
1941 __ lw(a3, FieldMemOperand(a1, JSGeneratorObject::kOperandStackOffset)); | 1939 __ lw(a3, FieldMemOperand(a1, JSGeneratorObject::kOperandStackOffset)); |
1942 __ lw(a3, FieldMemOperand(a3, FixedArray::kLengthOffset)); | 1940 __ lw(a3, FieldMemOperand(a3, FixedArray::kLengthOffset)); |
1943 __ SmiUntag(a3); | 1941 __ SmiUntag(a3); |
1944 | 1942 |
1945 // If we are sending a value and there is no operand stack, we can jump back | 1943 // If we are sending a value and there is no operand stack, we can jump back |
1946 // in directly. | 1944 // in directly. |
1947 if (resume_mode == JSGeneratorObject::NEXT) { | 1945 if (resume_mode == JSGeneratorObject::NEXT) { |
1948 Label slow_resume; | 1946 Label slow_resume; |
(...skipping 2229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4178 reinterpret_cast<uint32_t>( | 4176 reinterpret_cast<uint32_t>( |
4179 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4177 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4180 return OSR_AFTER_STACK_CHECK; | 4178 return OSR_AFTER_STACK_CHECK; |
4181 } | 4179 } |
4182 | 4180 |
4183 | 4181 |
4184 } // namespace internal | 4182 } // namespace internal |
4185 } // namespace v8 | 4183 } // namespace v8 |
4186 | 4184 |
4187 #endif // V8_TARGET_ARCH_MIPS | 4185 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |