Index: runtime/vm/stub_code_arm.cc |
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc |
index 0851085fbb84f53d2c1d6d87d21f7b60f1a95bc1..6c6f2839517100bc724b957bf4648e2f1a98f7c7 100644 |
--- a/runtime/vm/stub_code_arm.cc |
+++ b/runtime/vm/stub_code_arm.cc |
@@ -192,18 +192,10 @@ void StubCode::GenerateCallNativeCFunctionStub(Assembler* assembler) { |
__ mov(R0, Operand(SP)); // Pass the pointer to the NativeArguments. |
__ mov(R1, Operand(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); |
- const ExternalLabel label(Simulator::RedirectExternalReference( |
- entry, Simulator::kNativeCall, NativeEntry::kNumCallWrapperArguments)); |
- __ LoadExternalLabel(R2, &label, kNotPatchable); |
- __ blx(R2); |
-#else |
- __ LoadExternalLabel( |
- LR, &NativeEntry::NativeCallWrapperLabel(), kNotPatchable); |
+ __ ldr(LR, Address(THR, Thread::native_call_wrapper_entry_point_offset())); |
__ blx(LR); |
-#endif |
// Mark that the isolate is executing Dart code. |
__ LoadImmediate(R2, VMTag::kDartTagId); |