| Index: runtime/vm/assembler_arm.cc
|
| ===================================================================
|
| --- runtime/vm/assembler_arm.cc (revision 19723)
|
| +++ runtime/vm/assembler_arm.cc (working copy)
|
| @@ -1398,10 +1398,21 @@
|
|
|
| void Assembler::Branch(const ExternalLabel* label, Condition cond) {
|
| LoadImmediate(IP, label->address(), cond); // Address is never patched.
|
| - mov(PC, ShifterOperand(IP), cond);
|
| + bx(IP, cond);
|
| }
|
|
|
|
|
| +void Assembler::BranchPatchable(const ExternalLabel* label) {
|
| + // Use a fixed size code sequence, since a function prologue may be patched
|
| + // with this branch sequence.
|
| + // Contrarily to BranchLinkPatchable, BranchPatchable requires an instruction
|
| + // cache flush upon patching.
|
| + movw(IP, Utils::Low16Bits(label->address()));
|
| + movt(IP, Utils::High16Bits(label->address()));
|
| + bx(IP);
|
| +}
|
| +
|
| +
|
| void Assembler::BranchLink(const ExternalLabel* label) {
|
| LoadImmediate(IP, label->address()); // Target address is never patched.
|
| blx(IP); // Use blx instruction so that the return branch prediction works.
|
|
|