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

Side by Side Diff: src/x64/macro-assembler-x64.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/x64/codegen-x64.cc ('k') | test/cctest/test-assembler-arm64.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_X64 5 #if V8_TARGET_ARCH_X64
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 4737 matching lines...) Expand 10 before | Expand all | Expand 10 after
4748 masm_(NULL, address, size + Assembler::kGap) { 4748 masm_(NULL, address, size + Assembler::kGap) {
4749 // Create a new macro assembler pointing to the address of the code to patch. 4749 // Create a new macro assembler pointing to the address of the code to patch.
4750 // The size is adjusted with kGap on order for the assembler to generate size 4750 // The size is adjusted with kGap on order for the assembler to generate size
4751 // bytes of instructions without failing with buffer size constraints. 4751 // bytes of instructions without failing with buffer size constraints.
4752 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 4752 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
4753 } 4753 }
4754 4754
4755 4755
4756 CodePatcher::~CodePatcher() { 4756 CodePatcher::~CodePatcher() {
4757 // Indicate that code has changed. 4757 // Indicate that code has changed.
4758 CpuFeatures::FlushICache(address_, size_); 4758 Assembler::FlushICacheWithoutIsolate(address_, size_);
4759 4759
4760 // Check that the code was patched as expected. 4760 // Check that the code was patched as expected.
4761 DCHECK(masm_.pc_ == address_ + size_); 4761 DCHECK(masm_.pc_ == address_ + size_);
4762 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 4762 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
4763 } 4763 }
4764 4764
4765 4765
4766 void MacroAssembler::CheckPageFlag( 4766 void MacroAssembler::CheckPageFlag(
4767 Register object, 4767 Register object,
4768 Register scratch, 4768 Register scratch,
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
5067 movl(rax, dividend); 5067 movl(rax, dividend);
5068 shrl(rax, Immediate(31)); 5068 shrl(rax, Immediate(31));
5069 addl(rdx, rax); 5069 addl(rdx, rax);
5070 } 5070 }
5071 5071
5072 5072
5073 } // namespace internal 5073 } // namespace internal
5074 } // namespace v8 5074 } // namespace v8
5075 5075
5076 #endif // V8_TARGET_ARCH_X64 5076 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.cc ('k') | test/cctest/test-assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698