| OLD | NEW |
| 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 #include <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
| 8 | 8 |
| 9 #include "src/base/division-by-constant.h" | 9 #include "src/base/division-by-constant.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 6206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6217 // Create a new macro assembler pointing to the address of the code to patch. | 6217 // Create a new macro assembler pointing to the address of the code to patch. |
| 6218 // The size is adjusted with kGap on order for the assembler to generate size | 6218 // The size is adjusted with kGap on order for the assembler to generate size |
| 6219 // bytes of instructions without failing with buffer size constraints. | 6219 // bytes of instructions without failing with buffer size constraints. |
| 6220 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 6220 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 6221 } | 6221 } |
| 6222 | 6222 |
| 6223 | 6223 |
| 6224 CodePatcher::~CodePatcher() { | 6224 CodePatcher::~CodePatcher() { |
| 6225 // Indicate that code has changed. | 6225 // Indicate that code has changed. |
| 6226 if (flush_cache_ == FLUSH) { | 6226 if (flush_cache_ == FLUSH) { |
| 6227 CpuFeatures::FlushICache(address_, size_); | 6227 Assembler::FlushICacheWithoutIsolate(address_, size_); |
| 6228 } | 6228 } |
| 6229 // Check that the code was patched as expected. | 6229 // Check that the code was patched as expected. |
| 6230 DCHECK(masm_.pc_ == address_ + size_); | 6230 DCHECK(masm_.pc_ == address_ + size_); |
| 6231 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 6231 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 6232 } | 6232 } |
| 6233 | 6233 |
| 6234 | 6234 |
| 6235 void CodePatcher::Emit(Instr instr) { | 6235 void CodePatcher::Emit(Instr instr) { |
| 6236 masm()->emit(instr); | 6236 masm()->emit(instr); |
| 6237 } | 6237 } |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6284 if (mag.shift > 0) sra(result, result, mag.shift); | 6284 if (mag.shift > 0) sra(result, result, mag.shift); |
| 6285 srl(at, dividend, 31); | 6285 srl(at, dividend, 31); |
| 6286 Addu(result, result, Operand(at)); | 6286 Addu(result, result, Operand(at)); |
| 6287 } | 6287 } |
| 6288 | 6288 |
| 6289 | 6289 |
| 6290 } // namespace internal | 6290 } // namespace internal |
| 6291 } // namespace v8 | 6291 } // namespace v8 |
| 6292 | 6292 |
| 6293 #endif // V8_TARGET_ARCH_MIPS64 | 6293 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |