| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 7 | 7 |
| 8 #include "vm/code_patcher.h" | 8 #include "vm/code_patcher.h" |
| 9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
| 10 #include "vm/instructions.h" | 10 #include "vm/instructions.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 ASSERT(*(reinterpret_cast<uint32_t*>(end_) - 1) == 0xd63f0200); | 30 ASSERT(*(reinterpret_cast<uint32_t*>(end_) - 1) == 0xd63f0200); |
| 31 InstructionPattern::DecodeLoadWordFromPool( | 31 InstructionPattern::DecodeLoadWordFromPool( |
| 32 end_ - Instr::kInstrSize, ®_, &index_); | 32 end_ - Instr::kInstrSize, ®_, &index_); |
| 33 } | 33 } |
| 34 | 34 |
| 35 intptr_t pp_index() const { | 35 intptr_t pp_index() const { |
| 36 return index_; | 36 return index_; |
| 37 } | 37 } |
| 38 | 38 |
| 39 uword Target() const { | 39 uword Target() const { |
| 40 return reinterpret_cast<uword>(object_pool_.RawValueAt(pp_index())); | 40 return object_pool_.RawValueAt(pp_index()); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void SetTarget(uword target) const { | 43 void SetTarget(uword target) const { |
| 44 object_pool_.SetRawValueAt(pp_index(), target); | 44 object_pool_.SetRawValueAt(pp_index(), target); |
| 45 // No need to flush the instruction cache, since the code is not modified. | 45 // No need to flush the instruction cache, since the code is not modified. |
| 46 } | 46 } |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 static const int kCallPatternSize = 3 * Instr::kInstrSize; | 49 static const int kCallPatternSize = 3 * Instr::kInstrSize; |
| 50 uword end_; | 50 uword end_; |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { | 156 RawObject* CodePatcher::GetEdgeCounterAt(uword pc, const Code& code) { |
| 157 ASSERT(code.ContainsInstructionAt(pc)); | 157 ASSERT(code.ContainsInstructionAt(pc)); |
| 158 EdgeCounter counter(pc, code); | 158 EdgeCounter counter(pc, code); |
| 159 return counter.edge_counter(); | 159 return counter.edge_counter(); |
| 160 } | 160 } |
| 161 | 161 |
| 162 } // namespace dart | 162 } // namespace dart |
| 163 | 163 |
| 164 #endif // defined TARGET_ARCH_ARM64 | 164 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |