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

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

Issue 1339673002: PPC: 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/ppc/cpu-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 <assert.h> // For assert 5 #include <assert.h> // For assert
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_PPC 8 #if V8_TARGET_ARCH_PPC
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 4362 matching lines...) Expand 10 before | Expand all | Expand 10 after
4373 // Create a new macro assembler pointing to the address of the code to patch. 4373 // Create a new macro assembler pointing to the address of the code to patch.
4374 // The size is adjusted with kGap on order for the assembler to generate size 4374 // The size is adjusted with kGap on order for the assembler to generate size
4375 // bytes of instructions without failing with buffer size constraints. 4375 // bytes of instructions without failing with buffer size constraints.
4376 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 4376 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
4377 } 4377 }
4378 4378
4379 4379
4380 CodePatcher::~CodePatcher() { 4380 CodePatcher::~CodePatcher() {
4381 // Indicate that code has changed. 4381 // Indicate that code has changed.
4382 if (flush_cache_ == FLUSH) { 4382 if (flush_cache_ == FLUSH) {
4383 CpuFeatures::FlushICache(address_, size_); 4383 Assembler::FlushICacheWithoutIsolate(address_, size_);
4384 } 4384 }
4385 4385
4386 // Check that the code was patched as expected. 4386 // Check that the code was patched as expected.
4387 DCHECK(masm_.pc_ == address_ + size_); 4387 DCHECK(masm_.pc_ == address_ + size_);
4388 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 4388 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
4389 } 4389 }
4390 4390
4391 4391
4392 void CodePatcher::Emit(Instr instr) { masm()->emit(instr); } 4392 void CodePatcher::Emit(Instr instr) { masm()->emit(instr); }
4393 4393
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
4426 } 4426 }
4427 if (mag.shift > 0) srawi(result, result, mag.shift); 4427 if (mag.shift > 0) srawi(result, result, mag.shift);
4428 ExtractBit(r0, dividend, 31); 4428 ExtractBit(r0, dividend, 31);
4429 add(result, result, r0); 4429 add(result, result, r0);
4430 } 4430 }
4431 4431
4432 } // namespace internal 4432 } // namespace internal
4433 } // namespace v8 4433 } // namespace v8
4434 4434
4435 #endif // V8_TARGET_ARCH_PPC 4435 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/cpu-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698