Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/mips/macro-assembler-mips.cc

Issue 2072963003: Simplify AssemblerPositionsRecorder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comment Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | src/mips64/assembler-mips64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | src/mips64/assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698