| 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.
|
|
|