| 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 #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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |