Flutter Engine
The Flutter Engine
runtime_entry_arm64.cc
Go to the documentation of this file.
1// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
5#include "vm/globals.h"
6#if defined(TARGET_ARCH_ARM64)
7
8#include "vm/runtime_entry.h"
9
10#include "vm/simulator.h"
11#include "vm/stub_code.h"
12
13#if !defined(DART_PRECOMPILED_RUNTIME)
15#endif // !defined(DART_PRECOMPILED_RUNTIME)
16
17namespace dart {
18
19#define __ assembler->
20
22 // Compute the effective address. When running under the simulator,
23 // this is a redirection address that forces the simulator to call
24 // into the runtime system.
25 uword entry = reinterpret_cast<uword>(function());
26#if defined(USING_SIMULATOR)
27 // Redirection to leaf runtime calls supports a maximum of 4 arguments passed
28 // in registers (maximum 2 double arguments for leaf float runtime calls).
29 ASSERT(argument_count() >= 0);
30 ASSERT(!is_leaf() || (!is_float() && (argument_count() <= 4)) ||
31 (argument_count() <= 2));
32 Simulator::CallKind call_kind =
36 entry =
38#endif
39 return entry;
40}
41
42} // namespace dart
43
44#endif // defined TARGET_ARCH_ARM64
bool is_float() const
Definition: runtime_entry.h:55
intptr_t argument_count() const
Definition: runtime_entry.h:53
const void * function() const
Definition: runtime_entry.h:52
uword GetEntryPoint() const
bool is_leaf() const
Definition: runtime_entry.h:54
static uword RedirectExternalReference(uword function, CallKind call_kind, int argument_count)
#define ASSERT(E)
Definition: dart_vm.cc:33
uintptr_t uword
Definition: globals.h:501