| 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/assembler.h" | 8 #include "src/assembler.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
| (...skipping 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1789 Register temp = temps.AcquireX(); | 1789 Register temp = temps.AcquireX(); |
| 1790 Mov(temp, function); | 1790 Mov(temp, function); |
| 1791 CallCFunction(temp, num_of_reg_args, num_of_double_args); | 1791 CallCFunction(temp, num_of_reg_args, num_of_double_args); |
| 1792 } | 1792 } |
| 1793 | 1793 |
| 1794 static const int kRegisterPassedArguments = 8; | 1794 static const int kRegisterPassedArguments = 8; |
| 1795 | 1795 |
| 1796 void MacroAssembler::CallCFunction(Register function, | 1796 void MacroAssembler::CallCFunction(Register function, |
| 1797 int num_of_reg_args, | 1797 int num_of_reg_args, |
| 1798 int num_of_double_args) { | 1798 int num_of_double_args) { |
| 1799 DCHECK_LE(num_of_reg_args + num_of_double_args, kMaxCParameters); |
| 1799 DCHECK(has_frame()); | 1800 DCHECK(has_frame()); |
| 1800 | 1801 |
| 1801 // If we're passing doubles, we're limited to the following prototypes | 1802 // If we're passing doubles, we're limited to the following prototypes |
| 1802 // (defined by ExternalReference::Type): | 1803 // (defined by ExternalReference::Type): |
| 1803 // BUILTIN_COMPARE_CALL: int f(double, double) | 1804 // BUILTIN_COMPARE_CALL: int f(double, double) |
| 1804 // BUILTIN_FP_FP_CALL: double f(double, double) | 1805 // BUILTIN_FP_FP_CALL: double f(double, double) |
| 1805 // BUILTIN_FP_CALL: double f(double) | 1806 // BUILTIN_FP_CALL: double f(double) |
| 1806 // BUILTIN_FP_INT_CALL: double f(double, int) | 1807 // BUILTIN_FP_INT_CALL: double f(double, int) |
| 1807 if (num_of_double_args > 0) { | 1808 if (num_of_double_args > 0) { |
| 1808 DCHECK(num_of_reg_args <= 1); | 1809 DCHECK(num_of_reg_args <= 1); |
| (...skipping 2800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4609 } | 4610 } |
| 4610 | 4611 |
| 4611 | 4612 |
| 4612 #undef __ | 4613 #undef __ |
| 4613 | 4614 |
| 4614 | 4615 |
| 4615 } // namespace internal | 4616 } // namespace internal |
| 4616 } // namespace v8 | 4617 } // namespace v8 |
| 4617 | 4618 |
| 4618 #endif // V8_TARGET_ARCH_ARM64 | 4619 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |