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 3814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3825 void MacroAssembler::Call(Address target, | 3825 void MacroAssembler::Call(Address target, |
3826 RelocInfo::Mode rmode, | 3826 RelocInfo::Mode rmode, |
3827 Condition cond, | 3827 Condition cond, |
3828 Register rs, | 3828 Register rs, |
3829 const Operand& rt, | 3829 const Operand& rt, |
3830 BranchDelaySlot bd) { | 3830 BranchDelaySlot bd) { |
3831 BlockTrampolinePoolScope block_trampoline_pool(this); | 3831 BlockTrampolinePoolScope block_trampoline_pool(this); |
3832 Label start; | 3832 Label start; |
3833 bind(&start); | 3833 bind(&start); |
3834 int32_t target_int = reinterpret_cast<int32_t>(target); | 3834 int32_t target_int = reinterpret_cast<int32_t>(target); |
3835 // Must record previous source positions before the | |
3836 // li() generates a new code target. | |
3837 positions_recorder()->WriteRecordedPositions(); | |
3838 li(t9, Operand(target_int, rmode), CONSTANT_SIZE); | 3835 li(t9, Operand(target_int, rmode), CONSTANT_SIZE); |
3839 Call(t9, cond, rs, rt, bd); | 3836 Call(t9, cond, rs, rt, bd); |
3840 DCHECK_EQ(CallSize(target, rmode, cond, rs, rt, bd), | 3837 DCHECK_EQ(CallSize(target, rmode, cond, rs, rt, bd), |
3841 SizeOfCodeGeneratedSince(&start)); | 3838 SizeOfCodeGeneratedSince(&start)); |
3842 } | 3839 } |
3843 | 3840 |
3844 | 3841 |
3845 int MacroAssembler::CallSize(Handle<Code> code, | 3842 int MacroAssembler::CallSize(Handle<Code> code, |
3846 RelocInfo::Mode rmode, | 3843 RelocInfo::Mode rmode, |
3847 TypeFeedbackId ast_id, | 3844 TypeFeedbackId ast_id, |
(...skipping 2947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6795 if (mag.shift > 0) sra(result, result, mag.shift); | 6792 if (mag.shift > 0) sra(result, result, mag.shift); |
6796 srl(at, dividend, 31); | 6793 srl(at, dividend, 31); |
6797 Addu(result, result, Operand(at)); | 6794 Addu(result, result, Operand(at)); |
6798 } | 6795 } |
6799 | 6796 |
6800 | 6797 |
6801 } // namespace internal | 6798 } // namespace internal |
6802 } // namespace v8 | 6799 } // namespace v8 |
6803 | 6800 |
6804 #endif // V8_TARGET_ARCH_MIPS | 6801 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |