| 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 2740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2751 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); | 2751 __ Jump(masm->isolate()->builtins()->Construct(), RelocInfo::CODE_TARGET); |
| 2752 } | 2752 } |
| 2753 | 2753 |
| 2754 // static | 2754 // static |
| 2755 void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) { | 2755 void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) { |
| 2756 ASM_LOCATION("Builtins::Generate_AllocateInNewSpace"); | 2756 ASM_LOCATION("Builtins::Generate_AllocateInNewSpace"); |
| 2757 // ----------- S t a t e ------------- | 2757 // ----------- S t a t e ------------- |
| 2758 // -- x1 : requested object size (untagged) | 2758 // -- x1 : requested object size (untagged) |
| 2759 // -- lr : return address | 2759 // -- lr : return address |
| 2760 // ----------------------------------- | 2760 // ----------------------------------- |
| 2761 Label runtime; | |
| 2762 __ Allocate(x1, x0, x2, x3, &runtime, NO_ALLOCATION_FLAGS); | |
| 2763 __ Ret(); | |
| 2764 | |
| 2765 __ Bind(&runtime); | |
| 2766 __ SmiTag(x1); | 2761 __ SmiTag(x1); |
| 2767 __ Push(x1); | 2762 __ Push(x1); |
| 2768 __ Move(cp, Smi::FromInt(0)); | 2763 __ Move(cp, Smi::FromInt(0)); |
| 2769 __ TailCallRuntime(Runtime::kAllocateInNewSpace); | 2764 __ TailCallRuntime(Runtime::kAllocateInNewSpace); |
| 2770 } | 2765 } |
| 2771 | 2766 |
| 2772 // static | 2767 // static |
| 2773 void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { | 2768 void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) { |
| 2774 ASM_LOCATION("Builtins::Generate_AllocateInOldSpace"); | 2769 ASM_LOCATION("Builtins::Generate_AllocateInOldSpace"); |
| 2775 // ----------- S t a t e ------------- | 2770 // ----------- S t a t e ------------- |
| 2776 // -- x1 : requested object size (untagged) | 2771 // -- x1 : requested object size (untagged) |
| 2777 // -- lr : return address | 2772 // -- lr : return address |
| 2778 // ----------------------------------- | 2773 // ----------------------------------- |
| 2779 Label runtime; | |
| 2780 __ Allocate(x1, x0, x2, x3, &runtime, PRETENURE); | |
| 2781 __ Ret(); | |
| 2782 | |
| 2783 __ Bind(&runtime); | |
| 2784 __ SmiTag(x1); | 2774 __ SmiTag(x1); |
| 2785 __ Move(x2, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); | 2775 __ Move(x2, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE))); |
| 2786 __ Push(x1, x2); | 2776 __ Push(x1, x2); |
| 2787 __ Move(cp, Smi::FromInt(0)); | 2777 __ Move(cp, Smi::FromInt(0)); |
| 2788 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); | 2778 __ TailCallRuntime(Runtime::kAllocateInTargetSpace); |
| 2789 } | 2779 } |
| 2790 | 2780 |
| 2791 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { | 2781 void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
| 2792 ASM_LOCATION("Builtins::Generate_ArgumentsAdaptorTrampoline"); | 2782 ASM_LOCATION("Builtins::Generate_ArgumentsAdaptorTrampoline"); |
| 2793 // ----------- S t a t e ------------- | 2783 // ----------- S t a t e ------------- |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2933 } | 2923 } |
| 2934 } | 2924 } |
| 2935 | 2925 |
| 2936 | 2926 |
| 2937 #undef __ | 2927 #undef __ |
| 2938 | 2928 |
| 2939 } // namespace internal | 2929 } // namespace internal |
| 2940 } // namespace v8 | 2930 } // namespace v8 |
| 2941 | 2931 |
| 2942 #endif // V8_TARGET_ARCH_ARM | 2932 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |