| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef V8_ARM64_ASSEMBLER_ARM64_INL_H_ | 5 #ifndef V8_ARM64_ASSEMBLER_ARM64_INL_H_ |
| 6 #define V8_ARM64_ASSEMBLER_ARM64_INL_H_ | 6 #define V8_ARM64_ASSEMBLER_ARM64_INL_H_ |
| 7 | 7 |
| 8 #include "src/arm64/assembler-arm64.h" | 8 #include "src/arm64/assembler-arm64.h" |
| 9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
| 10 #include "src/debug.h" | 10 #include "src/debug.h" |
| 11 | 11 |
| 12 | 12 |
| 13 namespace v8 { | 13 namespace v8 { |
| 14 namespace internal { | 14 namespace internal { |
| 15 | 15 |
| 16 | 16 |
| 17 bool CpuFeatures::SupportsCrankshaft() { return true; } | 17 bool CpuFeatures::SupportsCrankshaft() { return true; } |
| 18 | 18 |
| 19 | 19 |
| 20 void RelocInfo::apply(intptr_t delta, ICacheFlushMode icache_flush_mode) { | 20 void RelocInfo::apply(intptr_t delta, ICacheFlushMode icache_flush_mode) { |
| 21 UNIMPLEMENTED(); | 21 // On arm64 only internal references need extra work. |
| 22 DCHECK(RelocInfo::IsInternalReference(rmode_)); |
| 23 |
| 24 // Absolute code pointer inside code object moves with the code object. |
| 25 intptr_t* p = reinterpret_cast<intptr_t*>(pc_); |
| 26 *p += delta; // Relocate entry. |
| 22 } | 27 } |
| 23 | 28 |
| 24 | 29 |
| 25 void RelocInfo::set_target_address(Address target, | 30 void RelocInfo::set_target_address(Address target, |
| 26 WriteBarrierMode write_barrier_mode, | 31 WriteBarrierMode write_barrier_mode, |
| 27 ICacheFlushMode icache_flush_mode) { | 32 ICacheFlushMode icache_flush_mode) { |
| 28 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); | 33 DCHECK(IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)); |
| 29 Assembler::set_target_address_at(pc_, host_, target, icache_flush_mode); | 34 Assembler::set_target_address_at(pc_, host_, target, icache_flush_mode); |
| 30 if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL && | 35 if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL && |
| 31 IsCodeTarget(rmode_)) { | 36 IsCodeTarget(rmode_)) { |
| (...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1290 | 1295 |
| 1291 | 1296 |
| 1292 void Assembler::ClearRecordedAstId() { | 1297 void Assembler::ClearRecordedAstId() { |
| 1293 recorded_ast_id_ = TypeFeedbackId::None(); | 1298 recorded_ast_id_ = TypeFeedbackId::None(); |
| 1294 } | 1299 } |
| 1295 | 1300 |
| 1296 | 1301 |
| 1297 } } // namespace v8::internal | 1302 } } // namespace v8::internal |
| 1298 | 1303 |
| 1299 #endif // V8_ARM64_ASSEMBLER_ARM64_INL_H_ | 1304 #endif // V8_ARM64_ASSEMBLER_ARM64_INL_H_ |
| OLD | NEW |