Flutter Engine
The Flutter Engine
third_party
dart-lang
sdk
runtime
vm
runtime_entry_arm.cc
Go to the documentation of this file.
1
// Copyright (c) 2011, 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_ARM)
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)
14
#include "
vm/compiler/assembler/assembler.h
"
15
#endif
// !defined(DART_PRECOMPILED_RUNTIME)
16
17
namespace
dart
{
18
19
#define __ assembler->
20
21
uword
RuntimeEntry::GetEntryPoint
()
const
{
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 =
33
is_leaf
() ? (
is_float
() ?
Simulator::kLeafFloatRuntimeCall
34
:
Simulator::kLeafRuntimeCall
)
35
:
Simulator::kRuntimeCall
;
36
entry =
37
Simulator::RedirectExternalReference
(entry, call_kind,
argument_count
());
38
#endif
39
return
entry;
40
}
41
42
}
// namespace dart
43
44
#endif
// defined TARGET_ARCH_ARM
assembler.h
dart::RuntimeEntry::is_float
bool is_float() const
Definition:
runtime_entry.h:55
dart::RuntimeEntry::argument_count
intptr_t argument_count() const
Definition:
runtime_entry.h:53
dart::RuntimeEntry::function
const void * function() const
Definition:
runtime_entry.h:52
dart::RuntimeEntry::GetEntryPoint
uword GetEntryPoint() const
dart::RuntimeEntry::is_leaf
bool is_leaf() const
Definition:
runtime_entry.h:54
dart::Simulator::CallKind
CallKind
Definition:
simulator_arm.h:112
dart::Simulator::kLeafRuntimeCall
@ kLeafRuntimeCall
Definition:
simulator_arm.h:114
dart::Simulator::kRuntimeCall
@ kRuntimeCall
Definition:
simulator_arm.h:113
dart::Simulator::kLeafFloatRuntimeCall
@ kLeafFloatRuntimeCall
Definition:
simulator_arm.h:115
dart::Simulator::RedirectExternalReference
static uword RedirectExternalReference(uword function, CallKind call_kind, int argument_count)
ASSERT
#define ASSERT(E)
Definition:
entrypoints_verification_test.cc:25
dart
Definition:
dart_vm.cc:33
dart::uword
uintptr_t uword
Definition:
globals.h:501
runtime_entry.h
simulator.h
stub_code.h
globals.h
Generated on Sun Jun 23 2024 21:55:49 for Flutter Engine by
1.9.4