| 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 #if V8_TARGET_ARCH_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
| 6 | 6 |
| 7 #include "src/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
| 10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
| (...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1491 // Copy all arguments from the array to the stack. | 1491 // Copy all arguments from the array to the stack. |
| 1492 Generate_PushAppliedArguments(masm, kVectorOffset, kArgumentsOffset, | 1492 Generate_PushAppliedArguments(masm, kVectorOffset, kArgumentsOffset, |
| 1493 kIndexOffset, kLimitOffset); | 1493 kIndexOffset, kLimitOffset); |
| 1494 | 1494 |
| 1495 // Use undefined feedback vector | 1495 // Use undefined feedback vector |
| 1496 __ LoadRoot(x2, Heap::kUndefinedValueRootIndex); | 1496 __ LoadRoot(x2, Heap::kUndefinedValueRootIndex); |
| 1497 __ Ldr(x1, MemOperand(fp, kFunctionOffset)); | 1497 __ Ldr(x1, MemOperand(fp, kFunctionOffset)); |
| 1498 __ Ldr(x3, MemOperand(fp, kNewTargetOffset)); | 1498 __ Ldr(x3, MemOperand(fp, kNewTargetOffset)); |
| 1499 | 1499 |
| 1500 // Call the function. | 1500 // Call the function. |
| 1501 __ Call(masm->isolate()->builtins()->Construct(), | 1501 __ Call(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
| 1502 RelocInfo::CONSTRUCT_CALL); | |
| 1503 | 1502 |
| 1504 // Leave internal frame. | 1503 // Leave internal frame. |
| 1505 } | 1504 } |
| 1506 __ Drop(kStackSize); | 1505 __ Drop(kStackSize); |
| 1507 __ Ret(); | 1506 __ Ret(); |
| 1508 } | 1507 } |
| 1509 | 1508 |
| 1510 | 1509 |
| 1511 void Builtins::Generate_FunctionApply(MacroAssembler* masm) { | 1510 void Builtins::Generate_FunctionApply(MacroAssembler* masm) { |
| 1512 ASM_LOCATION("Builtins::Generate_FunctionApply"); | 1511 ASM_LOCATION("Builtins::Generate_FunctionApply"); |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1864 __ B(&loop_check); | 1863 __ B(&loop_check); |
| 1865 __ Bind(&loop_header); | 1864 __ Bind(&loop_header); |
| 1866 // TODO(rmcilroy): Push two at a time once we ensure we keep stack aligned. | 1865 // TODO(rmcilroy): Push two at a time once we ensure we keep stack aligned. |
| 1867 __ Ldr(x5, MemOperand(x2, -kPointerSize, PostIndex)); | 1866 __ Ldr(x5, MemOperand(x2, -kPointerSize, PostIndex)); |
| 1868 __ Str(x5, MemOperand(x6, -kPointerSize, PreIndex)); | 1867 __ Str(x5, MemOperand(x6, -kPointerSize, PreIndex)); |
| 1869 __ Bind(&loop_check); | 1868 __ Bind(&loop_check); |
| 1870 __ Cmp(x6, x4); | 1869 __ Cmp(x6, x4); |
| 1871 __ B(gt, &loop_header); | 1870 __ B(gt, &loop_header); |
| 1872 | 1871 |
| 1873 // Call the constructor with x0, x1, and x3 unmodified. | 1872 // Call the constructor with x0, x1, and x3 unmodified. |
| 1874 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 1873 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
| 1875 } | 1874 } |
| 1876 | 1875 |
| 1877 | 1876 |
| 1878 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 1877 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
| 1879 ASM_LOCATION("Builtins::Generate_ArgumentsAdaptorTrampoline"); | 1878 ASM_LOCATION("Builtins::Generate_ArgumentsAdaptorTrampoline"); |
| 1880 // ----------- S t a t e ------------- | 1879 // ----------- S t a t e ------------- |
| 1881 // -- x0 : actual number of arguments | 1880 // -- x0 : actual number of arguments |
| 1882 // -- x1 : function (passed through to callee) | 1881 // -- x1 : function (passed through to callee) |
| 1883 // -- x2 : expected number of arguments | 1882 // -- x2 : expected number of arguments |
| 1884 // -- x3 : new target (passed through to callee) | 1883 // -- x3 : new target (passed through to callee) |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2044 } | 2043 } |
| 2045 } | 2044 } |
| 2046 | 2045 |
| 2047 | 2046 |
| 2048 #undef __ | 2047 #undef __ |
| 2049 | 2048 |
| 2050 } // namespace internal | 2049 } // namespace internal |
| 2051 } // namespace v8 | 2050 } // namespace v8 |
| 2052 | 2051 |
| 2053 #endif // V8_TARGET_ARCH_ARM | 2052 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |