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

Side by Side Diff: runtime/vm/assembler_arm64.cc

Issue 1316673005: Track which entries in the ObjectPool are native entries, and reset them when loading a precompiled… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
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" // NOLINT 5 #include "vm/globals.h" // NOLINT
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 const int32_t offset = ObjectPool::element_offset( 389 const int32_t offset = ObjectPool::element_offset(
390 object_pool_wrapper_.FindExternalLabel(label, kNotPatchable)); 390 object_pool_wrapper_.FindExternalLabel(label, kNotPatchable));
391 LoadWordFromPoolOffset(dst, offset); 391 LoadWordFromPoolOffset(dst, offset);
392 } else { 392 } else {
393 const int64_t target = static_cast<int64_t>(label->address()); 393 const int64_t target = static_cast<int64_t>(label->address());
394 LoadImmediate(dst, target); 394 LoadImmediate(dst, target);
395 } 395 }
396 } 396 }
397 397
398 398
399 void Assembler::LoadNativeEntry(Register dst,
400 const ExternalLabel* label) {
401 const int32_t offset = ObjectPool::element_offset(
402 object_pool_wrapper_.FindNativeEntry(label, kNotPatchable));
403 LoadWordFromPoolOffset(dst, offset);
404 }
405
406
399 void Assembler::LoadExternalLabelFixed(Register dst, 407 void Assembler::LoadExternalLabelFixed(Register dst,
400 const ExternalLabel* label, 408 const ExternalLabel* label,
401 Patchability patchable) { 409 Patchability patchable) {
402 const int32_t offset = ObjectPool::element_offset( 410 const int32_t offset = ObjectPool::element_offset(
403 object_pool_wrapper_.FindExternalLabel(label, patchable)); 411 object_pool_wrapper_.FindExternalLabel(label, patchable));
404 LoadWordFromPoolOffsetFixed(dst, offset); 412 LoadWordFromPoolOffsetFixed(dst, offset);
405 } 413 }
406 414
407 415
408 void Assembler::LoadIsolate(Register dst) { 416 void Assembler::LoadIsolate(Register dst) {
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1465 add(base, array, Operand(index, LSL, shift)); 1473 add(base, array, Operand(index, LSL, shift));
1466 } 1474 }
1467 const OperandSize size = Address::OperandSizeFor(cid); 1475 const OperandSize size = Address::OperandSizeFor(cid);
1468 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size)); 1476 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size));
1469 return Address(base, offset, Address::Offset, size); 1477 return Address(base, offset, Address::Offset, size);
1470 } 1478 }
1471 1479
1472 } // namespace dart 1480 } // namespace dart
1473 1481
1474 #endif // defined TARGET_ARCH_ARM64 1482 #endif // defined TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698