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

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

Issue 1480623002: Never call CpuFeatures::FlushICache directly (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years 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/cpu-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 1
2 // Copyright 2012 the V8 project authors. All rights reserved. 2 // Copyright 2012 the V8 project authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_MIPS 8 #if V8_TARGET_ARCH_MIPS
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 5800 matching lines...) Expand 10 before | Expand all | Expand 10 after
5811 // Create a new macro assembler pointing to the address of the code to patch. 5811 // Create a new macro assembler pointing to the address of the code to patch.
5812 // The size is adjusted with kGap on order for the assembler to generate size 5812 // The size is adjusted with kGap on order for the assembler to generate size
5813 // bytes of instructions without failing with buffer size constraints. 5813 // bytes of instructions without failing with buffer size constraints.
5814 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 5814 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
5815 } 5815 }
5816 5816
5817 5817
5818 CodePatcher::~CodePatcher() { 5818 CodePatcher::~CodePatcher() {
5819 // Indicate that code has changed. 5819 // Indicate that code has changed.
5820 if (flush_cache_ == FLUSH) { 5820 if (flush_cache_ == FLUSH) {
5821 CpuFeatures::FlushICache(address_, size_); 5821 Assembler::FlushICacheWithoutIsolate(address_, size_);
5822 } 5822 }
5823 5823
5824 // Check that the code was patched as expected. 5824 // Check that the code was patched as expected.
5825 DCHECK(masm_.pc_ == address_ + size_); 5825 DCHECK(masm_.pc_ == address_ + size_);
5826 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 5826 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
5827 } 5827 }
5828 5828
5829 5829
5830 void CodePatcher::Emit(Instr instr) { 5830 void CodePatcher::Emit(Instr instr) {
5831 masm()->emit(instr); 5831 masm()->emit(instr);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
5864 if (mag.shift > 0) sra(result, result, mag.shift); 5864 if (mag.shift > 0) sra(result, result, mag.shift);
5865 srl(at, dividend, 31); 5865 srl(at, dividend, 31);
5866 Addu(result, result, Operand(at)); 5866 Addu(result, result, Operand(at));
5867 } 5867 }
5868 5868
5869 5869
5870 } // namespace internal 5870 } // namespace internal
5871 } // namespace v8 5871 } // namespace v8
5872 5872
5873 #endif // V8_TARGET_ARCH_MIPS 5873 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/cpu-mips.cc ('k') | src/mips64/assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698