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

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

Issue 1332283002: Make FlushICache part of Assembler(Base) and take Isolate as parameter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm64 PatchingAssembler that initialized its isolate with NULL :) Created 5 years, 3 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/arm/cpu-arm.cc ('k') | src/arm64/assembler-arm64.h » ('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_ARM 7 #if V8_TARGET_ARCH_ARM
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 3729 matching lines...) Expand 10 before | Expand all | Expand 10 after
3740 // Create a new macro assembler pointing to the address of the code to patch. 3740 // Create a new macro assembler pointing to the address of the code to patch.
3741 // The size is adjusted with kGap on order for the assembler to generate size 3741 // The size is adjusted with kGap on order for the assembler to generate size
3742 // bytes of instructions without failing with buffer size constraints. 3742 // bytes of instructions without failing with buffer size constraints.
3743 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 3743 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
3744 } 3744 }
3745 3745
3746 3746
3747 CodePatcher::~CodePatcher() { 3747 CodePatcher::~CodePatcher() {
3748 // Indicate that code has changed. 3748 // Indicate that code has changed.
3749 if (flush_cache_ == FLUSH) { 3749 if (flush_cache_ == FLUSH) {
3750 CpuFeatures::FlushICache(address_, size_); 3750 Assembler::FlushICacheWithoutIsolate(address_, size_);
3751 } 3751 }
3752 3752
3753 // Check that the code was patched as expected. 3753 // Check that the code was patched as expected.
3754 DCHECK(masm_.pc_ == address_ + size_); 3754 DCHECK(masm_.pc_ == address_ + size_);
3755 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 3755 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
3756 } 3756 }
3757 3757
3758 3758
3759 void CodePatcher::Emit(Instr instr) { 3759 void CodePatcher::Emit(Instr instr) {
3760 masm()->emit(instr); 3760 masm()->emit(instr);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
3792 } 3792 }
3793 } 3793 }
3794 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 3794 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
3795 add(result, result, Operand(dividend, LSR, 31)); 3795 add(result, result, Operand(dividend, LSR, 31));
3796 } 3796 }
3797 3797
3798 } // namespace internal 3798 } // namespace internal
3799 } // namespace v8 3799 } // namespace v8
3800 3800
3801 #endif // V8_TARGET_ARCH_ARM 3801 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/cpu-arm.cc ('k') | src/arm64/assembler-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698