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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/base/division-by-constant.h" | 9 #include "src/base/division-by-constant.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 5037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5048 BranchDelaySlot bd) { | 5048 BranchDelaySlot bd) { |
5049 PrepareCEntryArgs(num_arguments); | 5049 PrepareCEntryArgs(num_arguments); |
5050 PrepareCEntryFunction(ext); | 5050 PrepareCEntryFunction(ext); |
5051 | 5051 |
5052 CEntryStub stub(isolate(), 1); | 5052 CEntryStub stub(isolate(), 1); |
5053 CallStub(&stub, TypeFeedbackId::None(), al, zero_reg, Operand(zero_reg), bd); | 5053 CallStub(&stub, TypeFeedbackId::None(), al, zero_reg, Operand(zero_reg), bd); |
5054 } | 5054 } |
5055 | 5055 |
5056 | 5056 |
5057 void MacroAssembler::TailCallExternalReference(const ExternalReference& ext, | 5057 void MacroAssembler::TailCallExternalReference(const ExternalReference& ext, |
5058 int num_arguments, | 5058 int num_arguments) { |
5059 int result_size) { | |
5060 // TODO(1236192): Most runtime routines don't need the number of | 5059 // TODO(1236192): Most runtime routines don't need the number of |
5061 // arguments passed in because it is constant. At some point we | 5060 // arguments passed in because it is constant. At some point we |
5062 // should remove this need and make the runtime routine entry code | 5061 // should remove this need and make the runtime routine entry code |
5063 // smarter. | 5062 // smarter. |
5064 PrepareCEntryArgs(num_arguments); | 5063 PrepareCEntryArgs(num_arguments); |
5065 JumpToExternalReference(ext); | 5064 JumpToExternalReference(ext); |
5066 } | 5065 } |
5067 | 5066 |
5068 | 5067 |
5069 void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid, | 5068 void MacroAssembler::TailCallRuntime(Runtime::FunctionId fid, |
5070 int num_arguments, | 5069 int num_arguments) { |
5071 int result_size) { | 5070 TailCallExternalReference(ExternalReference(fid, isolate()), num_arguments); |
5072 TailCallExternalReference(ExternalReference(fid, isolate()), | |
5073 num_arguments, | |
5074 result_size); | |
5075 } | 5071 } |
5076 | 5072 |
5077 | 5073 |
5078 void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin, | 5074 void MacroAssembler::JumpToExternalReference(const ExternalReference& builtin, |
5079 BranchDelaySlot bd) { | 5075 BranchDelaySlot bd) { |
5080 PrepareCEntryFunction(builtin); | 5076 PrepareCEntryFunction(builtin); |
5081 CEntryStub stub(isolate(), 1); | 5077 CEntryStub stub(isolate(), 1); |
5082 Jump(stub.GetCode(), | 5078 Jump(stub.GetCode(), |
5083 RelocInfo::CODE_TARGET, | 5079 RelocInfo::CODE_TARGET, |
5084 al, | 5080 al, |
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6378 if (mag.shift > 0) sra(result, result, mag.shift); | 6374 if (mag.shift > 0) sra(result, result, mag.shift); |
6379 srl(at, dividend, 31); | 6375 srl(at, dividend, 31); |
6380 Addu(result, result, Operand(at)); | 6376 Addu(result, result, Operand(at)); |
6381 } | 6377 } |
6382 | 6378 |
6383 | 6379 |
6384 } // namespace internal | 6380 } // namespace internal |
6385 } // namespace v8 | 6381 } // namespace v8 |
6386 | 6382 |
6387 #endif // V8_TARGET_ARCH_MIPS64 | 6383 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |