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

Side by Side Diff: src/ia32/macro-assembler-ia32.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/ia32/codegen-ia32.cc ('k') | src/objects.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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/division-by-constant.h" 8 #include "src/base/division-by-constant.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 2827 matching lines...) Expand 10 before | Expand all | Expand 10 after
2838 masm_(NULL, address, size + Assembler::kGap) { 2838 masm_(NULL, address, size + Assembler::kGap) {
2839 // Create a new macro assembler pointing to the address of the code to patch. 2839 // Create a new macro assembler pointing to the address of the code to patch.
2840 // The size is adjusted with kGap on order for the assembler to generate size 2840 // The size is adjusted with kGap on order for the assembler to generate size
2841 // bytes of instructions without failing with buffer size constraints. 2841 // bytes of instructions without failing with buffer size constraints.
2842 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2842 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2843 } 2843 }
2844 2844
2845 2845
2846 CodePatcher::~CodePatcher() { 2846 CodePatcher::~CodePatcher() {
2847 // Indicate that code has changed. 2847 // Indicate that code has changed.
2848 CpuFeatures::FlushICache(address_, size_); 2848 Assembler::FlushICacheWithoutIsolate(address_, size_);
2849 2849
2850 // Check that the code was patched as expected. 2850 // Check that the code was patched as expected.
2851 DCHECK(masm_.pc_ == address_ + size_); 2851 DCHECK(masm_.pc_ == address_ + size_);
2852 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2852 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2853 } 2853 }
2854 2854
2855 2855
2856 void MacroAssembler::CheckPageFlag( 2856 void MacroAssembler::CheckPageFlag(
2857 Register object, 2857 Register object,
2858 Register scratch, 2858 Register scratch,
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
3189 mov(eax, dividend); 3189 mov(eax, dividend);
3190 shr(eax, 31); 3190 shr(eax, 31);
3191 add(edx, eax); 3191 add(edx, eax);
3192 } 3192 }
3193 3193
3194 3194
3195 } // namespace internal 3195 } // namespace internal
3196 } // namespace v8 3196 } // namespace v8
3197 3197
3198 #endif // V8_TARGET_ARCH_IA32 3198 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698