| 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 4553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4564 CEntryStub stub(isolate(), 1); | 4564 CEntryStub stub(isolate(), 1); |
| 4565 Jump(stub.GetCode(), | 4565 Jump(stub.GetCode(), |
| 4566 RelocInfo::CODE_TARGET, | 4566 RelocInfo::CODE_TARGET, |
| 4567 al, | 4567 al, |
| 4568 zero_reg, | 4568 zero_reg, |
| 4569 Operand(zero_reg), | 4569 Operand(zero_reg), |
| 4570 bd); | 4570 bd); |
| 4571 } | 4571 } |
| 4572 | 4572 |
| 4573 | 4573 |
| 4574 void MacroAssembler::InvokeBuiltin(int native_context_index, InvokeFlag flag, | |
| 4575 const CallWrapper& call_wrapper) { | |
| 4576 // You can't call a builtin without a valid frame. | |
| 4577 DCHECK(flag == JUMP_FUNCTION || has_frame()); | |
| 4578 | |
| 4579 // Fake a parameter count to avoid emitting code to do the check. | |
| 4580 ParameterCount expected(0); | |
| 4581 LoadNativeContextSlot(native_context_index, a1); | |
| 4582 InvokeFunctionCode(a1, no_reg, expected, expected, flag, call_wrapper); | |
| 4583 } | |
| 4584 | |
| 4585 | |
| 4586 void MacroAssembler::SetCounter(StatsCounter* counter, int value, | 4574 void MacroAssembler::SetCounter(StatsCounter* counter, int value, |
| 4587 Register scratch1, Register scratch2) { | 4575 Register scratch1, Register scratch2) { |
| 4588 if (FLAG_native_code_counters && counter->Enabled()) { | 4576 if (FLAG_native_code_counters && counter->Enabled()) { |
| 4589 li(scratch1, Operand(value)); | 4577 li(scratch1, Operand(value)); |
| 4590 li(scratch2, Operand(ExternalReference(counter))); | 4578 li(scratch2, Operand(ExternalReference(counter))); |
| 4591 sw(scratch1, MemOperand(scratch2)); | 4579 sw(scratch1, MemOperand(scratch2)); |
| 4592 } | 4580 } |
| 4593 } | 4581 } |
| 4594 | 4582 |
| 4595 | 4583 |
| (...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5778 if (mag.shift > 0) sra(result, result, mag.shift); | 5766 if (mag.shift > 0) sra(result, result, mag.shift); |
| 5779 srl(at, dividend, 31); | 5767 srl(at, dividend, 31); |
| 5780 Addu(result, result, Operand(at)); | 5768 Addu(result, result, Operand(at)); |
| 5781 } | 5769 } |
| 5782 | 5770 |
| 5783 | 5771 |
| 5784 } // namespace internal | 5772 } // namespace internal |
| 5785 } // namespace v8 | 5773 } // namespace v8 |
| 5786 | 5774 |
| 5787 #endif // V8_TARGET_ARCH_MIPS | 5775 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |