| 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 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1735 int num_arguments, | 1735 int num_arguments, |
| 1736 SaveFPRegsMode save_doubles) { | 1736 SaveFPRegsMode save_doubles) { |
| 1737 // All arguments must be on the stack before this function is called. | 1737 // All arguments must be on the stack before this function is called. |
| 1738 // x0 holds the return value after the call. | 1738 // x0 holds the return value after the call. |
| 1739 | 1739 |
| 1740 // Check that the number of arguments matches what the function expects. | 1740 // Check that the number of arguments matches what the function expects. |
| 1741 // If f->nargs is -1, the function can accept a variable number of arguments. | 1741 // If f->nargs is -1, the function can accept a variable number of arguments. |
| 1742 CHECK(f->nargs < 0 || f->nargs == num_arguments); | 1742 CHECK(f->nargs < 0 || f->nargs == num_arguments); |
| 1743 | 1743 |
| 1744 // Place the necessary arguments. | 1744 // Place the necessary arguments. |
| 1745 Mov(x0, num_arguments); | 1745 if (num_arguments >= 0) { |
| 1746 Mov(x0, num_arguments); |
| 1747 } |
| 1746 Mov(x1, ExternalReference(f, isolate())); | 1748 Mov(x1, ExternalReference(f, isolate())); |
| 1747 | 1749 |
| 1748 CEntryStub stub(isolate(), 1, save_doubles); | 1750 CEntryStub stub(isolate(), 1, save_doubles); |
| 1749 CallStub(&stub); | 1751 CallStub(&stub); |
| 1750 } | 1752 } |
| 1751 | 1753 |
| 1752 | 1754 |
| 1753 void MacroAssembler::CallExternalReference(const ExternalReference& ext, | 1755 void MacroAssembler::CallExternalReference(const ExternalReference& ext, |
| 1754 int num_arguments) { | 1756 int num_arguments) { |
| 1755 Mov(x0, num_arguments); | 1757 Mov(x0, num_arguments); |
| (...skipping 3397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5153 } | 5155 } |
| 5154 | 5156 |
| 5155 | 5157 |
| 5156 #undef __ | 5158 #undef __ |
| 5157 | 5159 |
| 5158 | 5160 |
| 5159 } // namespace internal | 5161 } // namespace internal |
| 5160 } // namespace v8 | 5162 } // namespace v8 |
| 5161 | 5163 |
| 5162 #endif // V8_TARGET_ARCH_ARM64 | 5164 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |