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 5212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5223 CEntryStub stub(isolate(), 1); | 5223 CEntryStub stub(isolate(), 1); |
5224 Jump(stub.GetCode(), | 5224 Jump(stub.GetCode(), |
5225 RelocInfo::CODE_TARGET, | 5225 RelocInfo::CODE_TARGET, |
5226 al, | 5226 al, |
5227 zero_reg, | 5227 zero_reg, |
5228 Operand(zero_reg), | 5228 Operand(zero_reg), |
5229 bd); | 5229 bd); |
5230 } | 5230 } |
5231 | 5231 |
5232 | 5232 |
5233 void MacroAssembler::InvokeBuiltin(int native_context_index, InvokeFlag flag, | |
5234 const CallWrapper& call_wrapper) { | |
5235 // You can't call a builtin without a valid frame. | |
5236 DCHECK(flag == JUMP_FUNCTION || has_frame()); | |
5237 | |
5238 // Fake a parameter count to avoid emitting code to do the check. | |
5239 ParameterCount expected(0); | |
5240 LoadNativeContextSlot(native_context_index, a1); | |
5241 InvokeFunctionCode(a1, no_reg, expected, expected, flag, call_wrapper); | |
5242 } | |
5243 | |
5244 | |
5245 void MacroAssembler::SetCounter(StatsCounter* counter, int value, | 5233 void MacroAssembler::SetCounter(StatsCounter* counter, int value, |
5246 Register scratch1, Register scratch2) { | 5234 Register scratch1, Register scratch2) { |
5247 if (FLAG_native_code_counters && counter->Enabled()) { | 5235 if (FLAG_native_code_counters && counter->Enabled()) { |
5248 li(scratch1, Operand(value)); | 5236 li(scratch1, Operand(value)); |
5249 li(scratch2, Operand(ExternalReference(counter))); | 5237 li(scratch2, Operand(ExternalReference(counter))); |
5250 sd(scratch1, MemOperand(scratch2)); | 5238 sd(scratch1, MemOperand(scratch2)); |
5251 } | 5239 } |
5252 } | 5240 } |
5253 | 5241 |
5254 | 5242 |
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6505 if (mag.shift > 0) sra(result, result, mag.shift); | 6493 if (mag.shift > 0) sra(result, result, mag.shift); |
6506 srl(at, dividend, 31); | 6494 srl(at, dividend, 31); |
6507 Addu(result, result, Operand(at)); | 6495 Addu(result, result, Operand(at)); |
6508 } | 6496 } |
6509 | 6497 |
6510 | 6498 |
6511 } // namespace internal | 6499 } // namespace internal |
6512 } // namespace v8 | 6500 } // namespace v8 |
6513 | 6501 |
6514 #endif // V8_TARGET_ARCH_MIPS64 | 6502 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |