OLD | NEW |
1 | 1 |
2 // Copyright 2012 the V8 project authors. All rights reserved. | 2 // Copyright 2012 the V8 project authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 | 5 |
6 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
7 | 7 |
8 #if V8_TARGET_ARCH_MIPS | 8 #if V8_TARGET_ARCH_MIPS |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 4504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4515 BranchDelaySlot bd) { | 4515 BranchDelaySlot bd) { |
4516 PrepareCEntryArgs(num_arguments); | 4516 PrepareCEntryArgs(num_arguments); |
4517 PrepareCEntryFunction(ext); | 4517 PrepareCEntryFunction(ext); |
4518 | 4518 |
4519 CEntryStub stub(isolate(), 1); | 4519 CEntryStub stub(isolate(), 1); |
4520 CallStub(&stub, TypeFeedbackId::None(), al, zero_reg, Operand(zero_reg), bd); | 4520 CallStub(&stub, TypeFeedbackId::None(), al, zero_reg, Operand(zero_reg), bd); |
4521 } | 4521 } |
4522 | 4522 |
4523 | 4523 |
4524 void MacroAssembler::TailCallExternalReference(const ExternalReference& ext, | 4524 void MacroAssembler::TailCallExternalReference(const ExternalReference& ext, |
4525 int num_arguments, | 4525 int num_arguments) { |
4526 int result_size) { | |
4527 // TODO(1236192): Most runtime routines don't need the number of | 4526 // TODO(1236192): Most runtime routines don't need the number of |
4528 // arguments passed in because it is constant. At some point we | 4527 // arguments passed in because it is constant. At some point we |
4529 // should remove this need and make the runtime routine entry code | 4528 // should remove this need and make the runtime routine entry code |
4530 // smarter. | 4529 // smarter. |
4531 PrepareCEntryArgs(num_arguments); | 4530 PrepareCEntryArgs(num_arguments); |
4532 JumpToExternalReference(ext); | 4531 JumpToExternalReference(ext); |
4533 } | 4532 } |
4534 | 4533 |
4535 | 4534 |
4536 void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid, | 4535 void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid, |
4537 int num_arguments, | 4536 int num_arguments) { |
4538 int result_size) { | 4537 TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments); |
4539 TailCallExternalReference(ExternalReference(fid, isolate()), | |
4540 num_arguments, | |
4541 result_size); | |
4542 } | 4538 } |
4543 | 4539 |
4544 | 4540 |
4545 void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin, | 4541 void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin, |
4546 BranchDelaySlot bd) { | 4542 BranchDelaySlot bd) { |
4547 PrepareCEntryFunction(builtin); | 4543 PrepareCEntryFunction(builtin); |
4548 CEntryStub stub(isolate(), 1); | 4544 CEntryStub stub(isolate(), 1); |
4549 Jump(stub.GetCode(), | 4545 Jump(stub.GetCode(), |
4550 RelocInfo::CODE_TARGET, | 4546 RelocInfo::CODE_TARGET, |
4551 al, | 4547 al, |
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5764 if (mag.shift > 0) sra(result, result, mag.shift); | 5760 if (mag.shift > 0) sra(result, result, mag.shift); |
5765 srl(at, dividend, 31); | 5761 srl(at, dividend, 31); |
5766 Addu(result, result, Operand(at)); | 5762 Addu(result, result, Operand(at)); |
5767 } | 5763 } |
5768 | 5764 |
5769 | 5765 |
5770 } // namespace internal | 5766 } // namespace internal |
5771 } // namespace v8 | 5767 } // namespace v8 |
5772 | 5768 |
5773 #endif // V8_TARGET_ARCH_MIPS | 5769 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |