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_X87 | 5 #if V8_TARGET_ARCH_X87 |
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 2704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2715 masm_(NULL, address, size + Assembler::kGap) { | 2715 masm_(NULL, address, size + Assembler::kGap) { |
2716 // Create a new macro assembler pointing to the address of the code to patch. | 2716 // Create a new macro assembler pointing to the address of the code to patch. |
2717 // The size is adjusted with kGap on order for the assembler to generate size | 2717 // The size is adjusted with kGap on order for the assembler to generate size |
2718 // bytes of instructions without failing with buffer size constraints. | 2718 // bytes of instructions without failing with buffer size constraints. |
2719 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2719 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
2720 } | 2720 } |
2721 | 2721 |
2722 | 2722 |
2723 CodePatcher::~CodePatcher() { | 2723 CodePatcher::~CodePatcher() { |
2724 // Indicate that code has changed. | 2724 // Indicate that code has changed. |
2725 CpuFeatures::FlushICache(address_, size_); | 2725 Assembler::FlushICacheWithoutIsolate(address_, size_); |
2726 | 2726 |
2727 // Check that the code was patched as expected. | 2727 // Check that the code was patched as expected. |
2728 DCHECK(masm_.pc_ == address_ + size_); | 2728 DCHECK(masm_.pc_ == address_ + size_); |
2729 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2729 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
2730 } | 2730 } |
2731 | 2731 |
2732 | 2732 |
2733 void MacroAssembler::CheckPageFlag( | 2733 void MacroAssembler::CheckPageFlag( |
2734 Register object, | 2734 Register object, |
2735 Register scratch, | 2735 Register scratch, |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3066 mov(eax, dividend); | 3066 mov(eax, dividend); |
3067 shr(eax, 31); | 3067 shr(eax, 31); |
3068 add(edx, eax); | 3068 add(edx, eax); |
3069 } | 3069 } |
3070 | 3070 |
3071 | 3071 |
3072 } // namespace internal | 3072 } // namespace internal |
3073 } // namespace v8 | 3073 } // namespace v8 |
3074 | 3074 |
3075 #endif // V8_TARGET_ARCH_X87 | 3075 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |