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

Unified Diff: runtime/vm/assembler_arm.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/assembler_arm64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm.cc
diff --git a/runtime/vm/assembler_arm.cc b/runtime/vm/assembler_arm.cc
index e74a8c8df0595eb18b2a1478f3d56652d3b7cc28..aa673d95e2beb6f9b53cddf3399cdc21ff6c9e72 100644
--- a/runtime/vm/assembler_arm.cc
+++ b/runtime/vm/assembler_arm.cc
@@ -2751,6 +2751,21 @@ void Assembler::BranchLinkPatchable(const Code& target) {
}
+void Assembler::BranchLinkWithEquivalence(const StubEntry& stub_entry,
+ const Object& equivalence) {
+ const Code& target = Code::Handle(stub_entry.code());
+ // Make sure that class CallPattern is able to patch the label referred
+ // to by this code sequence.
+ // For added code robustness, use 'blx lr' in a patchable sequence and
+ // use 'blx ip' in a non-patchable sequence (see other BranchLink flavors).
+ const int32_t offset = ObjectPool::element_offset(
+ object_pool_wrapper_.FindObject(target, equivalence));
+ LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag, PP, AL);
+ ldr(LR, FieldAddress(CODE_REG, Code::entry_point_offset()));
+ blx(LR); // Use blx instruction so that the return branch prediction works.
+}
+
+
void Assembler::BranchLink(const ExternalLabel* label) {
LoadImmediate(LR, label->address()); // Target address is never patched.
blx(LR); // Use blx instruction so that the return branch prediction works.
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/assembler_arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698