| 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/codegen.h" | 7 #include "src/codegen.h" |
| 8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
| 9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
| 10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
| (...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 // Push holes for arguments to generator function. Since the parser forced | 816 // Push holes for arguments to generator function. Since the parser forced |
| 817 // context allocation for any variables in generators, the actual argument | 817 // context allocation for any variables in generators, the actual argument |
| 818 // values have already been copied into the context and these dummy values | 818 // values have already been copied into the context and these dummy values |
| 819 // will never be used. | 819 // will never be used. |
| 820 __ LoadP(r6, FieldMemOperand(r7, JSFunction::kSharedFunctionInfoOffset)); | 820 __ LoadP(r6, FieldMemOperand(r7, JSFunction::kSharedFunctionInfoOffset)); |
| 821 __ LoadWordArith( | 821 __ LoadWordArith( |
| 822 r3, FieldMemOperand(r6, SharedFunctionInfo::kFormalParameterCountOffset)); | 822 r3, FieldMemOperand(r6, SharedFunctionInfo::kFormalParameterCountOffset)); |
| 823 { | 823 { |
| 824 Label loop, done_loop; | 824 Label loop, done_loop; |
| 825 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); | 825 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
| 826 #if V8_TARGET_ARCH_PPC64 | |
| 827 __ cmpi(r3, Operand::Zero()); | 826 __ cmpi(r3, Operand::Zero()); |
| 828 __ beq(&done_loop); | 827 __ beq(&done_loop); |
| 829 #else | |
| 830 __ beq(&done_loop, cr0); | |
| 831 #endif | |
| 832 __ mtctr(r3); | 828 __ mtctr(r3); |
| 833 __ bind(&loop); | 829 __ bind(&loop); |
| 834 __ push(ip); | 830 __ push(ip); |
| 835 __ bdnz(&loop); | 831 __ bdnz(&loop); |
| 836 __ bind(&done_loop); | 832 __ bind(&done_loop); |
| 837 } | 833 } |
| 838 | 834 |
| 839 // Underlying function needs to have bytecode available. | 835 // Underlying function needs to have bytecode available. |
| 840 if (FLAG_debug_code) { | 836 if (FLAG_debug_code) { |
| 841 __ LoadP(r6, FieldMemOperand(r6, SharedFunctionInfo::kFunctionDataOffset)); | 837 __ LoadP(r6, FieldMemOperand(r6, SharedFunctionInfo::kFunctionDataOffset)); |
| (...skipping 2305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3147 } | 3143 } |
| 3148 // Now jump to the instructions of the returned code object. | 3144 // Now jump to the instructions of the returned code object. |
| 3149 __ Jump(r11); | 3145 __ Jump(r11); |
| 3150 } | 3146 } |
| 3151 | 3147 |
| 3152 #undef __ | 3148 #undef __ |
| 3153 } // namespace internal | 3149 } // namespace internal |
| 3154 } // namespace v8 | 3150 } // namespace v8 |
| 3155 | 3151 |
| 3156 #endif // V8_TARGET_ARCH_PPC | 3152 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |