| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2077 // x3 function function pointer | 2077 // x3 function function pointer |
| 2078 // x11 caller_fp caller's frame pointer | 2078 // x11 caller_fp caller's frame pointer |
| 2079 // x13 param_count number of parameters passed to function | 2079 // x13 param_count number of parameters passed to function |
| 2080 | 2080 |
| 2081 // Patch the argument length and parameters pointer. | 2081 // Patch the argument length and parameters pointer. |
| 2082 __ Ldr(param_count_smi, | 2082 __ Ldr(param_count_smi, |
| 2083 MemOperand(caller_fp, | 2083 MemOperand(caller_fp, |
| 2084 ArgumentsAdaptorFrameConstants::kLengthOffset)); | 2084 ArgumentsAdaptorFrameConstants::kLengthOffset)); |
| 2085 __ SmiUntag(param_count, param_count_smi); | 2085 __ SmiUntag(param_count, param_count_smi); |
| 2086 if (has_new_target()) { | 2086 if (has_new_target()) { |
| 2087 __ Cmp(param_count, Operand(0)); |
| 2088 Label skip_decrement; |
| 2089 __ B(eq, &skip_decrement); |
| 2087 // Skip new.target: it is not a part of arguments. | 2090 // Skip new.target: it is not a part of arguments. |
| 2088 __ Sub(param_count, param_count, Operand(1)); | 2091 __ Sub(param_count, param_count, Operand(1)); |
| 2089 __ SmiTag(param_count_smi, param_count); | 2092 __ SmiTag(param_count_smi, param_count); |
| 2093 __ Bind(&skip_decrement); |
| 2090 } | 2094 } |
| 2091 __ Add(x10, caller_fp, Operand(param_count, LSL, kPointerSizeLog2)); | 2095 __ Add(x10, caller_fp, Operand(param_count, LSL, kPointerSizeLog2)); |
| 2092 __ Add(params, x10, StandardFrameConstants::kCallerSPOffset); | 2096 __ Add(params, x10, StandardFrameConstants::kCallerSPOffset); |
| 2093 | 2097 |
| 2094 // Try the new space allocation. Start out with computing the size of the | 2098 // Try the new space allocation. Start out with computing the size of the |
| 2095 // arguments object and the elements array in words. | 2099 // arguments object and the elements array in words. |
| 2096 Register size = x10; | 2100 Register size = x10; |
| 2097 __ Bind(&try_allocate); | 2101 __ Bind(&try_allocate); |
| 2098 __ Add(size, param_count, FixedArray::kHeaderSize / kPointerSize); | 2102 __ Add(size, param_count, FixedArray::kHeaderSize / kPointerSize); |
| 2099 __ Cmp(param_count, 0); | 2103 __ Cmp(param_count, 0); |
| (...skipping 3653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5753 kStackUnwindSpace, NULL, spill_offset, | 5757 kStackUnwindSpace, NULL, spill_offset, |
| 5754 MemOperand(fp, 6 * kPointerSize), NULL); | 5758 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5755 } | 5759 } |
| 5756 | 5760 |
| 5757 | 5761 |
| 5758 #undef __ | 5762 #undef __ |
| 5759 | 5763 |
| 5760 } } // namespace v8::internal | 5764 } } // namespace v8::internal |
| 5761 | 5765 |
| 5762 #endif // V8_TARGET_ARCH_ARM64 | 5766 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |