| Index: runtime/vm/assembler_arm64.cc
|
| diff --git a/runtime/vm/assembler_arm64.cc b/runtime/vm/assembler_arm64.cc
|
| index 72d90f221aeec291afe226b66b19b639ca5e6d5e..7ea74a2f0ce72435bd16f5dfe76b3cd5f354cbb6 100644
|
| --- a/runtime/vm/assembler_arm64.cc
|
| +++ b/runtime/vm/assembler_arm64.cc
|
| @@ -584,27 +584,48 @@ void Assembler::LoadDImmediate(VRegister vd, double immd) {
|
| }
|
|
|
|
|
| +void Assembler::Branch(const ExternalLabel* label) {
|
| + LoadExternalLabel(TMP, label);
|
| + br(TMP);
|
| +}
|
| +
|
| +
|
| void Assembler::Branch(const StubEntry& stub_entry) {
|
| const ExternalLabel label(stub_entry.EntryPoint());
|
| Branch(&label);
|
| }
|
|
|
|
|
| +void Assembler::BranchPatchable(const ExternalLabel* label) {
|
| + // TODO(zra): Use LoadExternalLabelFixed if possible.
|
| + LoadImmediateFixed(TMP, label->address());
|
| + br(TMP);
|
| +}
|
| +
|
| void Assembler::BranchPatchable(const StubEntry& stub_entry) {
|
| - const ExternalLabel label(stub_entry.EntryPoint());
|
| - BranchPatchable(&label);
|
| + BranchPatchable(&stub_entry.label());
|
| +}
|
| +
|
| +
|
| +void Assembler::BranchLink(const ExternalLabel* label) {
|
| + LoadExternalLabel(TMP, label);
|
| + blr(TMP);
|
| }
|
|
|
|
|
| void Assembler::BranchLink(const StubEntry& stub_entry) {
|
| - const ExternalLabel label(stub_entry.EntryPoint());
|
| - BranchLink(&label);
|
| + BranchLink(&stub_entry.label());
|
| +}
|
| +
|
| +
|
| +void Assembler::BranchLinkPatchable(const ExternalLabel* label) {
|
| + LoadExternalLabelFixed(TMP, label, kPatchable);
|
| + blr(TMP);
|
| }
|
|
|
|
|
| void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) {
|
| - const ExternalLabel label(stub_entry.EntryPoint());
|
| - BranchLinkPatchable(&label);
|
| + BranchLinkPatchable(&stub_entry.label());
|
| }
|
|
|
|
|
| @@ -1144,7 +1165,7 @@ void Assembler::LeaveDartFrame() {
|
|
|
|
|
| void Assembler::EnterCallRuntimeFrame(intptr_t frame_size) {
|
| - EnterFrame(0);
|
| + EnterStubFrame();
|
|
|
| // Store fpu registers with the lowest register number at the lowest
|
| // address.
|
| @@ -1174,7 +1195,8 @@ void Assembler::LeaveCallRuntimeFrame() {
|
| // We need to restore it before restoring registers.
|
| const intptr_t kPushedRegistersSize =
|
| kDartVolatileCpuRegCount * kWordSize +
|
| - kDartVolatileFpuRegCount * kWordSize;
|
| + kDartVolatileFpuRegCount * kWordSize +
|
| + 2 * kWordSize; // PP and pc marker from EnterStubFrame.
|
| AddImmediate(SP, FP, -kPushedRegistersSize);
|
| for (int i = kDartLastVolatileCpuReg; i >= kDartFirstVolatileCpuReg; i--) {
|
| const Register reg = static_cast<Register>(i);
|
| @@ -1192,7 +1214,7 @@ void Assembler::LeaveCallRuntimeFrame() {
|
| PopDouble(reg);
|
| }
|
|
|
| - PopPair(LR, FP);
|
| + LeaveStubFrame();
|
| }
|
|
|
|
|
|
|