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/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1721 DCHECK(flag == JUMP_FUNCTION || has_frame()); | 1721 DCHECK(flag == JUMP_FUNCTION || has_frame()); |
1722 | 1722 |
1723 // Fake a parameter count to avoid emitting code to do the check. | 1723 // Fake a parameter count to avoid emitting code to do the check. |
1724 ParameterCount expected(0); | 1724 ParameterCount expected(0); |
1725 LoadNativeContextSlot(native_context_index, x1); | 1725 LoadNativeContextSlot(native_context_index, x1); |
1726 InvokeFunctionCode(x1, no_reg, expected, expected, flag, call_wrapper); | 1726 InvokeFunctionCode(x1, no_reg, expected, expected, flag, call_wrapper); |
1727 } | 1727 } |
1728 | 1728 |
1729 | 1729 |
1730 void MacroAssembler::TailCallExternalReference(const ExternalReference& ext, | 1730 void MacroAssembler::TailCallExternalReference(const ExternalReference& ext, |
1731 int num_arguments, | 1731 int num_arguments) { |
1732 int result_size) { | |
1733 // TODO(1236192): Most runtime routines don't need the number of | 1732 // TODO(1236192): Most runtime routines don't need the number of |
1734 // arguments passed in because it is constant. At some point we | 1733 // arguments passed in because it is constant. At some point we |
1735 // should remove this need and make the runtime routine entry code | 1734 // should remove this need and make the runtime routine entry code |
1736 // smarter. | 1735 // smarter. |
1737 Mov(x0, num_arguments); | 1736 Mov(x0, num_arguments); |
1738 JumpToExternalReference(ext); | 1737 JumpToExternalReference(ext); |
1739 } | 1738 } |
1740 | 1739 |
1741 | 1740 |
1742 void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid, | 1741 void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid, |
1743 int num_arguments, | 1742 int num_arguments) { |
1744 int result_size) { | 1743 TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments); |
1745 TailCallExternalReference(ExternalReference(fid, isolate()), | |
1746 num_arguments, | |
1747 result_size); | |
1748 } | 1744 } |
1749 | 1745 |
1750 | 1746 |
1751 void MacroAssembler::InitializeNewString(Register string, | 1747 void MacroAssembler::InitializeNewString(Register string, |
1752 Register length, | 1748 Register length, |
1753 Heap::RootListIndex map_index, | 1749 Heap::RootListIndex map_index, |
1754 Register scratch1, | 1750 Register scratch1, |
1755 Register scratch2) { | 1751 Register scratch2) { |
1756 DCHECK(!AreAliased(string, length, scratch1, scratch2)); | 1752 DCHECK(!AreAliased(string, length, scratch1, scratch2)); |
1757 LoadRoot(scratch2, map_index); | 1753 LoadRoot(scratch2, map_index); |
(...skipping 3114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4872 } | 4868 } |
4873 | 4869 |
4874 | 4870 |
4875 #undef __ | 4871 #undef __ |
4876 | 4872 |
4877 | 4873 |
4878 } // namespace internal | 4874 } // namespace internal |
4879 } // namespace v8 | 4875 } // namespace v8 |
4880 | 4876 |
4881 #endif // V8_TARGET_ARCH_ARM64 | 4877 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |