Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(575)

Side by Side Diff: src/arm64/assembler-arm64-inl.h

Issue 1016073002: [arm64] Assembler support for internal references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm64/assembler-arm64.cc ('k') | src/arm64/instructions-arm64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « src/arm64/assembler-arm64.cc ('k') | src/arm64/instructions-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698