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 (untagged) |
| 2759 // -- lr : return address |
| 2760 // ----------------------------------- |
| 2761 Label runtime; |
| 2762 __ Allocate(x1, x0, x2, x3, &runtime, NO_ALLOCATION_FLAGS); |
| 2763 __ Ret(); |
| 2764 |
| 2765 __ Bind(&runtime); |
| 2766 __ SmiTag(x1); |
| 2767 __ Push(x1); |
| 2768 __ Move(cp, Smi::FromInt(0)); |
| 2769 __ TailCallRuntime(Runtime::kAllocateInNewSpace); |
| 2770 } |
| 2771 |
| 2772 // static |
| 2773 void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { |
| 2774 ASM_LOCATION("Builtins::Generate_AllocateInOldSpace"); |
| 2775 // ----------- S t a t e ------------- |
| 2776 // -- x1 : requested object size (untagged) |
| 2777 // -- lr : return address |
| 2778 // ----------------------------------- |
| 2779 Label runtime; |
| 2780 __ Allocate(x1, x0, x2, x3, &runtime, PRETENURE); |
| 2781 __ Ret(); |
| 2782 |
| 2783 __ Bind(&runtime); |
| 2784 __ SmiTag(x1); |
| 2785 __ Move(x2, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); |
| 2786 __ Push(x1, x2); |
| 2787 __ Move(cp, Smi::FromInt(0)); |
| 2788 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); |
| 2789 } |
2754 | 2790 |
2755 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2791 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
2756 ASM_LOCATION("Builtins::Generate_ArgumentsAdaptorTrampoline"); | 2792 ASM_LOCATION("Builtins::Generate_ArgumentsAdaptorTrampoline"); |
2757 // ----------- S t a t e ------------- | 2793 // ----------- S t a t e ------------- |
2758 // -- x0 : actual number of arguments | 2794 // -- x0 : actual number of arguments |
2759 // -- x1 : function (passed through to callee) | 2795 // -- x1 : function (passed through to callee) |
2760 // -- x2 : expected number of arguments | 2796 // -- x2 : expected number of arguments |
2761 // -- x3 : new target (passed through to callee) | 2797 // -- x3 : new target (passed through to callee) |
2762 // ----------------------------------- | 2798 // ----------------------------------- |
2763 | 2799 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2897 } | 2933 } |
2898 } | 2934 } |
2899 | 2935 |
2900 | 2936 |
2901 #undef __ | 2937 #undef __ |
2902 | 2938 |
2903 } // namespace internal | 2939 } // namespace internal |
2904 } // namespace v8 | 2940 } // namespace v8 |
2905 | 2941 |
2906 #endif // V8_TARGET_ARCH_ARM | 2942 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |