| 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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 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 2827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2838 masm_(NULL, address, size + Assembler::kGap) { | 2838 masm_(NULL, address, size + Assembler::kGap) { |
| 2839 // Create a new macro assembler pointing to the address of the code to patch. | 2839 // Create a new macro assembler pointing to the address of the code to patch. |
| 2840 // The size is adjusted with kGap on order for the assembler to generate size | 2840 // The size is adjusted with kGap on order for the assembler to generate size |
| 2841 // bytes of instructions without failing with buffer size constraints. | 2841 // bytes of instructions without failing with buffer size constraints. |
| 2842 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2842 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 2843 } | 2843 } |
| 2844 | 2844 |
| 2845 | 2845 |
| 2846 CodePatcher::~CodePatcher() { | 2846 CodePatcher::~CodePatcher() { |
| 2847 // Indicate that code has changed. | 2847 // Indicate that code has changed. |
| 2848 CpuFeatures::FlushICache(address_, size_); | 2848 Assembler::FlushICacheWithoutIsolate(address_, size_); |
| 2849 | 2849 |
| 2850 // Check that the code was patched as expected. | 2850 // Check that the code was patched as expected. |
| 2851 DCHECK(masm_.pc_ == address_ + size_); | 2851 DCHECK(masm_.pc_ == address_ + size_); |
| 2852 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2852 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 2853 } | 2853 } |
| 2854 | 2854 |
| 2855 | 2855 |
| 2856 void MacroAssembler::CheckPageFlag( | 2856 void MacroAssembler::CheckPageFlag( |
| 2857 Register object, | 2857 Register object, |
| 2858 Register scratch, | 2858 Register scratch, |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3189 mov(eax, dividend); | 3189 mov(eax, dividend); |
| 3190 shr(eax, 31); | 3190 shr(eax, 31); |
| 3191 add(edx, eax); | 3191 add(edx, eax); |
| 3192 } | 3192 } |
| 3193 | 3193 |
| 3194 | 3194 |
| 3195 } // namespace internal | 3195 } // namespace internal |
| 3196 } // namespace v8 | 3196 } // namespace v8 |
| 3197 | 3197 |
| 3198 #endif // V8_TARGET_ARCH_IA32 | 3198 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |