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 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2197 __ LoadWordArith( | 2197 __ LoadWordArith( |
2198 r3, | 2198 r3, |
2199 FieldMemOperand(r3, SharedFunctionInfo::kFormalParameterCountOffset)); | 2199 FieldMemOperand(r3, SharedFunctionInfo::kFormalParameterCountOffset)); |
2200 __ mr(r6, fp); | 2200 __ mr(r6, fp); |
2201 } | 2201 } |
2202 __ b(&arguments_done); | 2202 __ b(&arguments_done); |
2203 __ bind(&arguments_adaptor); | 2203 __ bind(&arguments_adaptor); |
2204 { | 2204 { |
2205 // Load the length from the ArgumentsAdaptorFrame. | 2205 // Load the length from the ArgumentsAdaptorFrame. |
2206 __ LoadP(r3, MemOperand(r6, ArgumentsAdaptorFrameConstants::kLengthOffset)); | 2206 __ LoadP(r3, MemOperand(r6, ArgumentsAdaptorFrameConstants::kLengthOffset)); |
| 2207 #if V8_TARGET_ARCH_PPC64 |
| 2208 __ SmiUntag(r3); |
| 2209 #endif |
2207 } | 2210 } |
2208 __ bind(&arguments_done); | 2211 __ bind(&arguments_done); |
2209 | 2212 |
2210 Label stack_empty, stack_done, stack_overflow; | 2213 Label stack_empty, stack_done, stack_overflow; |
| 2214 #if !V8_TARGET_ARCH_PPC64 |
2211 __ SmiUntag(r3); | 2215 __ SmiUntag(r3); |
| 2216 #endif |
2212 __ sub(r3, r3, r5); | 2217 __ sub(r3, r3, r5); |
2213 __ cmpi(r3, Operand::Zero()); | 2218 __ cmpi(r3, Operand::Zero()); |
2214 __ ble(&stack_empty); | 2219 __ ble(&stack_empty); |
2215 { | 2220 { |
2216 // Check for stack overflow. | 2221 // Check for stack overflow. |
2217 Generate_StackOverflowCheck(masm, r3, r5, &stack_overflow); | 2222 Generate_StackOverflowCheck(masm, r3, r5, &stack_overflow); |
2218 | 2223 |
2219 // Forward the arguments from the caller frame. | 2224 // Forward the arguments from the caller frame. |
2220 { | 2225 { |
2221 Label loop; | 2226 Label loop; |
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3108 } | 3113 } |
3109 // Now jump to the instructions of the returned code object. | 3114 // Now jump to the instructions of the returned code object. |
3110 __ Jump(r11); | 3115 __ Jump(r11); |
3111 } | 3116 } |
3112 | 3117 |
3113 #undef __ | 3118 #undef __ |
3114 } // namespace internal | 3119 } // namespace internal |
3115 } // namespace v8 | 3120 } // namespace v8 |
3116 | 3121 |
3117 #endif // V8_TARGET_ARCH_PPC | 3122 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |