Flutter Engine
The Flutter Engine
simulator_x64.h
Go to the documentation of this file.
1// Copyright (c) 2022, 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#ifndef RUNTIME_VM_SIMULATOR_X64_H_
6#define RUNTIME_VM_SIMULATOR_X64_H_
7
8#ifndef RUNTIME_VM_SIMULATOR_H_
9#error Do not include simulator_x64.h directly; use simulator.h.
10#endif
11
12#include "vm/constants.h"
13#include "vm/random.h"
14
15namespace dart {
16
17class Thread;
18
19class Simulator {
20 public:
21 static constexpr uword kSimulatorStackUnderflowSize = 64;
22
25
26 static Simulator* Current();
27
28 int64_t Call(int64_t entry,
29 int64_t parameter0,
30 int64_t parameter1,
31 int64_t parameter2,
32 int64_t parameter3,
33 bool fp_return = false,
34 bool fp_args = false);
35
36 // Runtime and native call support.
37 enum CallKind {
42 };
44 CallKind call_kind,
45 int argument_count);
46
48
49 void JumpToFrame(uword pc, uword sp, uword fp, Thread* thread);
50
51 uint64_t get_register(Register rs) const { return 0; }
52 uint64_t get_pc() const { return 0; }
53 uint64_t get_sp() const { return 0; }
54 uint64_t get_fp() const { return 0; }
55 uint64_t get_lr() const { return 0; }
56
57 // High address.
58 uword stack_base() const { return 0; }
59 // Limit for StackOverflowError.
60 uword overflow_stack_limit() const { return 0; }
61 // Low address.
62 uword stack_limit() const { return 0; }
63
64 // Accessor to the instruction counter.
65 uint64_t get_icount() const { return 0; }
66
67 // Call on program start.
68 static void Init();
69
70 private:
71 DISALLOW_COPY_AND_ASSIGN(Simulator);
72};
73
74} // namespace dart
75
76#endif // RUNTIME_VM_SIMULATOR_X64_H_
uint64_t get_lr() const
Definition: simulator_x64.h:55
static uword RedirectExternalReference(uword function, CallKind call_kind, int argument_count)
void JumpToFrame(uword pc, uword sp, uword fp, Thread *thread)
uint64_t get_pc() const
Definition: simulator_x64.h:52
static Simulator * Current()
uword stack_base() const
Definition: simulator_x64.h:58
uint64_t get_icount() const
Definition: simulator_x64.h:65
uword overflow_stack_limit() const
Definition: simulator_x64.h:60
static void Init()
uword stack_limit() const
Definition: simulator_x64.h:62
static constexpr uword kSimulatorStackUnderflowSize
Definition: simulator_arm.h:43
int64_t Call(int64_t entry, int64_t parameter0, int64_t parameter1, int64_t parameter2, int64_t parameter3, bool fp_return=false, bool fp_args=false)
uint64_t get_sp() const
Definition: simulator_x64.h:53
uint64_t get_register(Register rs) const
Definition: simulator_x64.h:51
static uword FunctionForRedirect(uword redirect)
uint64_t get_fp() const
Definition: simulator_x64.h:54
Dart_NativeFunction function
Definition: fuchsia.cc:51
int argument_count
Definition: fuchsia.cc:52
Definition: dart_vm.cc:33
uintptr_t uword
Definition: globals.h:501
const uint32_t fp