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

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

Issue 1339293002: X87: Make FlushICache part of Assembler(Base) and take Isolate as parameter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/x87/codegen-x87.cc ('k') | no next file » | 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_X87 5 #if V8_TARGET_ARCH_X87
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 2704 matching lines...) Expand 10 before | Expand all | Expand 10 after
2715 masm_(NULL, address, size + Assembler::kGap) { 2715 masm_(NULL, address, size + Assembler::kGap) {
2716 // Create a new macro assembler pointing to the address of the code to patch. 2716 // Create a new macro assembler pointing to the address of the code to patch.
2717 // The size is adjusted with kGap on order for the assembler to generate size 2717 // The size is adjusted with kGap on order for the assembler to generate size
2718 // bytes of instructions without failing with buffer size constraints. 2718 // bytes of instructions without failing with buffer size constraints.
2719 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2719 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2720 } 2720 }
2721 2721
2722 2722
2723 CodePatcher::~CodePatcher() { 2723 CodePatcher::~CodePatcher() {
2724 // Indicate that code has changed. 2724 // Indicate that code has changed.
2725 CpuFeatures::FlushICache(address_, size_); 2725 Assembler::FlushICacheWithoutIsolate(address_, size_);
2726 2726
2727 // Check that the code was patched as expected. 2727 // Check that the code was patched as expected.
2728 DCHECK(masm_.pc_ == address_ + size_); 2728 DCHECK(masm_.pc_ == address_ + size_);
2729 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2729 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2730 } 2730 }
2731 2731
2732 2732
2733 void MacroAssembler::CheckPageFlag( 2733 void MacroAssembler::CheckPageFlag(
2734 Register object, 2734 Register object,
2735 Register scratch, 2735 Register scratch,
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
3066 mov(eax, dividend); 3066 mov(eax, dividend);
3067 shr(eax, 31); 3067 shr(eax, 31);
3068 add(edx, eax); 3068 add(edx, eax);
3069 } 3069 }
3070 3070
3071 3071
3072 } // namespace internal 3072 } // namespace internal
3073 } // namespace v8 3073 } // namespace v8
3074 3074
3075 #endif // V8_TARGET_ARCH_X87 3075 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/codegen-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698