| 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_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
| (...skipping 3974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3985 } | 3985 } |
| 3986 | 3986 |
| 3987 | 3987 |
| 3988 CodePatcher::~CodePatcher() { | 3988 CodePatcher::~CodePatcher() { |
| 3989 // Indicate that code has changed. | 3989 // Indicate that code has changed. |
| 3990 if (flush_cache_ == FLUSH) { | 3990 if (flush_cache_ == FLUSH) { |
| 3991 Assembler::FlushICache(masm_.isolate(), address_, size_); | 3991 Assembler::FlushICache(masm_.isolate(), address_, size_); |
| 3992 } | 3992 } |
| 3993 | 3993 |
| 3994 // Check that we don't have any pending constant pools. | 3994 // Check that we don't have any pending constant pools. |
| 3995 DCHECK(masm_.num_pending_32_bit_constants_ == 0); | 3995 DCHECK(masm_.pending_32_bit_constants_.empty()); |
| 3996 DCHECK(masm_.num_pending_64_bit_constants_ == 0); | 3996 DCHECK(masm_.pending_64_bit_constants_.empty()); |
| 3997 | 3997 |
| 3998 // Check that the code was patched as expected. | 3998 // Check that the code was patched as expected. |
| 3999 DCHECK(masm_.pc_ == address_ + size_); | 3999 DCHECK(masm_.pc_ == address_ + size_); |
| 4000 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 4000 DCHECK(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 4001 } | 4001 } |
| 4002 | 4002 |
| 4003 | 4003 |
| 4004 void CodePatcher::Emit(Instr instr) { | 4004 void CodePatcher::Emit(Instr instr) { |
| 4005 masm()->emit(instr); | 4005 masm()->emit(instr); |
| 4006 } | 4006 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 4037 } | 4037 } |
| 4038 } | 4038 } |
| 4039 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 4039 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
| 4040 add(result, result, Operand(dividend, LSR, 31)); | 4040 add(result, result, Operand(dividend, LSR, 31)); |
| 4041 } | 4041 } |
| 4042 | 4042 |
| 4043 } // namespace internal | 4043 } // namespace internal |
| 4044 } // namespace v8 | 4044 } // namespace v8 |
| 4045 | 4045 |
| 4046 #endif // V8_TARGET_ARCH_ARM | 4046 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |