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

Unified Diff: runtime/vm/stub_code_arm64.cc

Issue 1358773002: Load the native call wrapper via Thread. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/stub_code_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm64.cc
diff --git a/runtime/vm/stub_code_arm64.cc b/runtime/vm/stub_code_arm64.cc
index 9c41377eb6ce3c674de643370a550bab25c9cd46..41d454403dee717d5b2fa4a91024f899ffa1c5ec 100644
--- a/runtime/vm/stub_code_arm64.cc
+++ b/runtime/vm/stub_code_arm64.cc
@@ -214,16 +214,10 @@ void StubCode::GenerateCallNativeCFunctionStub(Assembler* assembler) {
__ mov(CSP, SP);
__ mov(R1, R5); // Pass the function entrypoint to call.
+
// Call native function invocation wrapper or redirection via simulator.
-#if defined(USING_SIMULATOR)
- uword entry = reinterpret_cast<uword>(NativeEntry::NativeCallWrapper);
- entry = Simulator::RedirectExternalReference(
- entry, Simulator::kNativeCall, NativeEntry::kNumCallWrapperArguments);
- __ LoadImmediate(R2, entry);
- __ blr(R2);
-#else
- __ BranchLink(&NativeEntry::NativeCallWrapperLabel());
-#endif
+ __ ldr(LR, Address(THR, Thread::native_call_wrapper_entry_point_offset()));
+ __ blr(LR);
// Restore SP and CSP.
__ mov(SP, CSP);
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698