| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 6 | 6 |
| 7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1892 // the generator was suspended. | 1892 // the generator was suspended. |
| 1893 Label resume_frame, done; | 1893 Label resume_frame, done; |
| 1894 __ bind(&push_frame); | 1894 __ bind(&push_frame); |
| 1895 __ b(&resume_frame, SetLK); | 1895 __ b(&resume_frame, SetLK); |
| 1896 __ b(&done); | 1896 __ b(&done); |
| 1897 __ bind(&resume_frame); | 1897 __ bind(&resume_frame); |
| 1898 // lr = return address. | 1898 // lr = return address. |
| 1899 // fp = caller's frame pointer. | 1899 // fp = caller's frame pointer. |
| 1900 // cp = callee's context, | 1900 // cp = callee's context, |
| 1901 // r7 = callee's JS function. | 1901 // r7 = callee's JS function. |
| 1902 __ PushFixedFrame(r7); | 1902 __ PushStandardFrame(r7); |
| 1903 // Adjust FP to point to saved FP. | |
| 1904 __ addi(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); | |
| 1905 | 1903 |
| 1906 // Load the operand stack size. | 1904 // Load the operand stack size. |
| 1907 __ LoadP(r6, FieldMemOperand(r4, JSGeneratorObject::kOperandStackOffset)); | 1905 __ LoadP(r6, FieldMemOperand(r4, JSGeneratorObject::kOperandStackOffset)); |
| 1908 __ LoadP(r6, FieldMemOperand(r6, FixedArray::kLengthOffset)); | 1906 __ LoadP(r6, FieldMemOperand(r6, FixedArray::kLengthOffset)); |
| 1909 __ SmiUntag(r6, SetRC); | 1907 __ SmiUntag(r6, SetRC); |
| 1910 | 1908 |
| 1911 // If we are sending a value and there is no operand stack, we can jump back | 1909 // If we are sending a value and there is no operand stack, we can jump back |
| 1912 // in directly. | 1910 // in directly. |
| 1913 Label call_resume; | 1911 Label call_resume; |
| 1914 if (resume_mode == JSGeneratorObject::NEXT) { | 1912 if (resume_mode == JSGeneratorObject::NEXT) { |
| (...skipping 2224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4139 | 4137 |
| 4140 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 4138 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
| 4141 | 4139 |
| 4142 DCHECK(interrupt_address == | 4140 DCHECK(interrupt_address == |
| 4143 isolate->builtins()->OnStackReplacement()->entry()); | 4141 isolate->builtins()->OnStackReplacement()->entry()); |
| 4144 return ON_STACK_REPLACEMENT; | 4142 return ON_STACK_REPLACEMENT; |
| 4145 } | 4143 } |
| 4146 } // namespace internal | 4144 } // namespace internal |
| 4147 } // namespace v8 | 4145 } // namespace v8 |
| 4148 #endif // V8_TARGET_ARCH_PPC | 4146 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |