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 1709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1720 } | 1720 } |
1721 | 1721 |
1722 | 1722 |
1723 void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin) { | 1723 void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin) { |
1724 Mov(x1, builtin); | 1724 Mov(x1, builtin); |
1725 CEntryStub stub(isolate(), 1); | 1725 CEntryStub stub(isolate(), 1); |
1726 Jump(stub.GetCode(), RelocInfo::CODE_TARGET); | 1726 Jump(stub.GetCode(), RelocInfo::CODE_TARGET); |
1727 } | 1727 } |
1728 | 1728 |
1729 | 1729 |
1730 void MacroAssembler::InvokeBuiltin(int native_context_index, InvokeFlag flag, | |
1731 const CallWrapper& call_wrapper) { | |
1732 ASM_LOCATION("MacroAssembler::InvokeBuiltin"); | |
1733 // You can't call a builtin without a valid frame. | |
1734 DCHECK(flag == JUMP_FUNCTION || has_frame()); | |
1735 | |
1736 // Fake a parameter count to avoid emitting code to do the check. | |
1737 ParameterCount expected(0); | |
1738 LoadNativeContextSlot(native_context_index, x1); | |
1739 InvokeFunctionCode(x1, no_reg, expected, expected, flag, call_wrapper); | |
1740 } | |
1741 | |
1742 | |
1743 void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid) { | 1730 void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid) { |
1744 const Runtime::Function* function = Runtime::FunctionForId(fid); | 1731 const Runtime::Function* function = Runtime::FunctionForId(fid); |
1745 DCHECK_EQ(1, function->result_size); | 1732 DCHECK_EQ(1, function->result_size); |
1746 if (function->nargs >= 0) { | 1733 if (function->nargs >= 0) { |
1747 // TODO(1236192): Most runtime routines don't need the number of | 1734 // TODO(1236192): Most runtime routines don't need the number of |
1748 // arguments passed in because it is constant. At some point we | 1735 // arguments passed in because it is constant. At some point we |
1749 // should remove this need and make the runtime routine entry code | 1736 // should remove this need and make the runtime routine entry code |
1750 // smarter. | 1737 // smarter. |
1751 Mov(x0, function->nargs); | 1738 Mov(x0, function->nargs); |
1752 } | 1739 } |
(...skipping 3147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4900 } | 4887 } |
4901 | 4888 |
4902 | 4889 |
4903 #undef __ | 4890 #undef __ |
4904 | 4891 |
4905 | 4892 |
4906 } // namespace internal | 4893 } // namespace internal |
4907 } // namespace v8 | 4894 } // namespace v8 |
4908 | 4895 |
4909 #endif // V8_TARGET_ARCH_ARM64 | 4896 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |