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 2733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2744 __ Ldr(x5, MemOperand(x2, -kPointerSize, PostIndex)); | 2744 __ Ldr(x5, MemOperand(x2, -kPointerSize, PostIndex)); |
2745 __ Str(x5, MemOperand(x6, -kPointerSize, PreIndex)); | 2745 __ Str(x5, MemOperand(x6, -kPointerSize, PreIndex)); |
2746 __ Bind(&loop_check); | 2746 __ Bind(&loop_check); |
2747 __ Cmp(x6, x4); | 2747 __ Cmp(x6, x4); |
2748 __ B(gt, &loop_header); | 2748 __ B(gt, &loop_header); |
2749 | 2749 |
2750 // Call the constructor with x0, x1, and x3 unmodified. | 2750 // Call the constructor with x0, x1, and x3 unmodified. |
2751 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); | 2751 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
2752 } | 2752 } |
2753 | 2753 |
2754 // static | |
2755 void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) { | |
2756 ASM_LOCATION("Builtins::Generate_AllocateInNewSpace"); | |
2757 // ----------- S t a t e ------------- | |
2758 // -- x1 : requested object size (tagged) | |
2759 // -- cp : context | |
2760 // ----------------------------------- | |
2761 __ AssertSmi(x1); | |
2762 | |
2763 Label runtime; | |
2764 __ SmiUntag(x1); | |
2765 __ Allocate(x1, x0, x2, x3, &runtime, NO_ALLOCATION_FLAGS); | |
2766 __ Ret(); | |
2767 | |
2768 __ Bind(&runtime); | |
2769 __ SmiTag(x1); | |
2770 __ Push(x1); | |
2771 __ TailCallRuntime(Runtime::kAllocateInNewSpace); | |
2772 } | |
2773 | |
2774 // static | |
2775 void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { | |
2776 ASM_LOCATION("Builtins::Generate_AllocateInOldSpace"); | |
2777 // ----------- S t a t e ------------- | |
2778 // -- x1 : requested object size (tagged) | |
2779 // -- cp : context | |
2780 // ----------------------------------- | |
2781 __ AssertSmi(x1); | |
2782 | |
2783 Label runtime; | |
2784 __ SmiUntag(x1); | |
2785 __ Allocate(x1, x0, x2, x3, &runtime, PRETENURE); | |
2786 __ Ret(); | |
2787 | |
2788 __ Bind(&runtime); | |
2789 __ SmiTag(x1); | |
2790 __ Push(x1); | |
2791 __ Push(Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); | |
2792 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); | |
2793 } | |
2794 | 2754 |
2795 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2755 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
2796 ASM_LOCATION("Builtins::Generate_ArgumentsAdaptorTrampoline"); | 2756 ASM_LOCATION("Builtins::Generate_ArgumentsAdaptorTrampoline"); |
2797 // ----------- S t a t e ------------- | 2757 // ----------- S t a t e ------------- |
2798 // -- x0 : actual number of arguments | 2758 // -- x0 : actual number of arguments |
2799 // -- x1 : function (passed through to callee) | 2759 // -- x1 : function (passed through to callee) |
2800 // -- x2 : expected number of arguments | 2760 // -- x2 : expected number of arguments |
2801 // -- x3 : new target (passed through to callee) | 2761 // -- x3 : new target (passed through to callee) |
2802 // ----------------------------------- | 2762 // ----------------------------------- |
2803 | 2763 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2937 } | 2897 } |
2938 } | 2898 } |
2939 | 2899 |
2940 | 2900 |
2941 #undef __ | 2901 #undef __ |
2942 | 2902 |
2943 } // namespace internal | 2903 } // namespace internal |
2944 } // namespace v8 | 2904 } // namespace v8 |
2945 | 2905 |
2946 #endif // V8_TARGET_ARCH_ARM | 2906 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |