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

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

Issue 1713853003: VM: Share object pool entries for optimized static calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/assembler_mips.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 (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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 ldr(TMP, FieldAddress(CODE_REG, Code::entry_point_offset())); 604 ldr(TMP, FieldAddress(CODE_REG, Code::entry_point_offset()));
605 blr(TMP); 605 blr(TMP);
606 } 606 }
607 607
608 608
609 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) { 609 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) {
610 BranchLink(stub_entry, kPatchable); 610 BranchLink(stub_entry, kPatchable);
611 } 611 }
612 612
613 613
614 void Assembler::BranchLinkWithEquivalence(const StubEntry& stub_entry,
615 const Object& equivalence) {
616 const Code& target = Code::Handle(stub_entry.code());
617 const int32_t offset = ObjectPool::element_offset(
618 object_pool_wrapper_.FindObject(target, equivalence));
619 LoadWordFromPoolOffset(CODE_REG, offset);
620 ldr(TMP, FieldAddress(CODE_REG, Code::entry_point_offset()));
621 blr(TMP);
622 }
623
624
614 void Assembler::AddImmediate(Register dest, Register rn, int64_t imm) { 625 void Assembler::AddImmediate(Register dest, Register rn, int64_t imm) {
615 Operand op; 626 Operand op;
616 if (imm == 0) { 627 if (imm == 0) {
617 if (dest != rn) { 628 if (dest != rn) {
618 mov(dest, rn); 629 mov(dest, rn);
619 } 630 }
620 return; 631 return;
621 } 632 }
622 if (Operand::CanHold(imm, kXRegSizeInBits, &op) == Operand::Immediate) { 633 if (Operand::CanHold(imm, kXRegSizeInBits, &op) == Operand::Immediate) {
623 add(dest, rn, op); 634 add(dest, rn, op);
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 add(base, array, Operand(index, LSL, shift)); 1483 add(base, array, Operand(index, LSL, shift));
1473 } 1484 }
1474 const OperandSize size = Address::OperandSizeFor(cid); 1485 const OperandSize size = Address::OperandSizeFor(cid);
1475 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size)); 1486 ASSERT(Address::CanHoldOffset(offset, Address::Offset, size));
1476 return Address(base, offset, Address::Offset, size); 1487 return Address(base, offset, Address::Offset, size);
1477 } 1488 }
1478 1489
1479 } // namespace dart 1490 } // namespace dart
1480 1491
1481 #endif // defined TARGET_ARCH_ARM64 1492 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/assembler_mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698