OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
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 5576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5587 | 5587 |
5588 // If the expected number of arguments of the runtime function is | 5588 // If the expected number of arguments of the runtime function is |
5589 // constant, we check that the actual number of arguments match the | 5589 // constant, we check that the actual number of arguments match the |
5590 // expectation. | 5590 // expectation. |
5591 CHECK(f->nargs < 0 || f->nargs == num_arguments); | 5591 CHECK(f->nargs < 0 || f->nargs == num_arguments); |
5592 | 5592 |
5593 // TODO(1236192): Most runtime routines don't need the number of | 5593 // TODO(1236192): Most runtime routines don't need the number of |
5594 // arguments passed in because it is constant. At some point we | 5594 // arguments passed in because it is constant. At some point we |
5595 // should remove this need and make the runtime routine entry code | 5595 // should remove this need and make the runtime routine entry code |
5596 // smarter. | 5596 // smarter. |
5597 PrepareCEntryArgs(num_arguments); | 5597 if (num_arguments >= 0) { |
| 5598 PrepareCEntryArgs(num_arguments); |
| 5599 } |
5598 PrepareCEntryFunction(ExternalReference(f, isolate())); | 5600 PrepareCEntryFunction(ExternalReference(f, isolate())); |
5599 CEntryStub stub(isolate(), 1, save_doubles); | 5601 CEntryStub stub(isolate(), 1, save_doubles); |
5600 CallStub(&stub, TypeFeedbackId::None(), al, zero_reg, Operand(zero_reg), bd); | 5602 CallStub(&stub, TypeFeedbackId::None(), al, zero_reg, Operand(zero_reg), bd); |
5601 } | 5603 } |
5602 | 5604 |
5603 | 5605 |
5604 void MacroAssembler::CallExternalReference(const ExternalReference& ext, | 5606 void MacroAssembler::CallExternalReference(const ExternalReference& ext, |
5605 int num_arguments, | 5607 int num_arguments, |
5606 BranchDelaySlot bd) { | 5608 BranchDelaySlot bd) { |
5607 PrepareCEntryArgs(num_arguments); | 5609 PrepareCEntryArgs(num_arguments); |
(...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6909 if (mag.shift > 0) sra(result, result, mag.shift); | 6911 if (mag.shift > 0) sra(result, result, mag.shift); |
6910 srl(at, dividend, 31); | 6912 srl(at, dividend, 31); |
6911 Addu(result, result, Operand(at)); | 6913 Addu(result, result, Operand(at)); |
6912 } | 6914 } |
6913 | 6915 |
6914 | 6916 |
6915 } // namespace internal | 6917 } // namespace internal |
6916 } // namespace v8 | 6918 } // namespace v8 |
6917 | 6919 |
6918 #endif // V8_TARGET_ARCH_MIPS | 6920 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |