Index: runtime/vm/flow_graph_compiler_arm64.cc |
diff --git a/runtime/vm/flow_graph_compiler_arm64.cc b/runtime/vm/flow_graph_compiler_arm64.cc |
index 178482ab4a727eaa2c62db958671b6ebd3f1dffb..5dd2308580d4db556a76e8adddb9f7df989ae81c 100644 |
--- a/runtime/vm/flow_graph_compiler_arm64.cc |
+++ b/runtime/vm/flow_graph_compiler_arm64.cc |
@@ -1314,9 +1314,8 @@ void FlowGraphCompiler::EmitMegamorphicInstanceCall( |
} |
__ LoadObject(R5, cache); |
- __ ldr(LR, Address(THR, Thread::megamorphic_lookup_entry_point_offset())); |
+ __ ldr(LR, Address(THR, Thread::megamorphic_lookup_checked_entry_offset())); |
__ blr(LR); |
- __ blr(R1); |
__ Bind(&done); |
RecordSafepoint(locs, slow_path_argument_count); |
@@ -1353,12 +1352,16 @@ void FlowGraphCompiler::EmitSwitchableInstanceCall( |
intptr_t deopt_id, |
TokenPosition token_pos, |
LocationSummary* locs) { |
+ ASSERT(ic_data.NumArgsTested() == 1); |
+ const Code& initial_stub = Code::ZoneHandle( |
+ StubCode::ICLookupThroughFunction_entry()->code()); |
__ Comment("SwitchableCall"); |
+ |
__ LoadFromOffset(R0, SP, (argument_count - 1) * kWordSize); |
- ASSERT(ic_data.NumArgsTested() == 1); |
__ LoadUniqueObject(R5, ic_data); |
- __ BranchLinkPatchable(*StubCode::ICLookupThroughFunction_entry()); |
- __ blr(R1); |
+ __ LoadUniqueObject(CODE_REG, initial_stub); |
+ __ ldr(TMP, FieldAddress(CODE_REG, Code::checked_entry_point_offset())); |
+ __ blr(TMP); |
AddCurrentDescriptor(RawPcDescriptors::kOther, |
Thread::kNoDeoptId, token_pos); |