12#ifndef RUNTIME_VM_SIMULATOR_ARM64_H_
13#define RUNTIME_VM_SIMULATOR_ARM64_H_
15#ifndef RUNTIME_VM_SIMULATOR_H_
16#error Do not include simulator_arm64.h directly; use simulator.h.
26class SimulatorSetjmpBuffer;
94 int64_t
Call(int64_t entry,
99 bool fp_return =
false,
100 bool fp_args =
false);
120 static constexpr uword kBadLR = -1;
125 static constexpr uword kEndSimulatingPC = -2;
141 uword overflow_stack_limit_;
145 static int64_t flag_stop_sim_at_;
151 int64_t break_instr_;
154 static bool IsIllegalAddress(
uword addr) {
return addr < 64 * 1024; }
161 void UnimplementedInstruction(
Instr* instr);
176 bool must_be_aligned =
false);
180 inline intptr_t ReadX(
uword addr,
Instr* instr,
bool must_be_aligned =
false);
184 void ClearExclusive();
202 uword exclusive_access_addr_;
203 uword exclusive_access_value_;
206 void SetNZFlagsW(int32_t val);
207 bool CarryFromW(int32_t left, int32_t right, int32_t carry);
208 bool OverflowFromW(int32_t left, int32_t right, int32_t carry);
210 void SetNZFlagsX(int64_t val);
211 bool CarryFromX(int64_t alu_out, int64_t left, int64_t right,
bool addition);
212 bool OverflowFromX(int64_t alu_out,
217 void SetCFlag(
bool val);
218 void SetVFlag(
bool val);
220 int64_t ShiftOperand(uint8_t reg_size,
225 int64_t ExtendOperand(uint8_t reg_size,
230 int64_t DecodeShiftExtendOperand(
Instr* instr);
232 bool ConditionallyExecute(
Instr* instr);
234 void DoRedirectedCall(
Instr* instr);
237 void InstructionDecode(
Instr* instr);
238 void InstructionDecodeImpl(
Instr* instr);
239#define DECODE_OP(op) void Decode##op(Instr* instr);
245 void ExecuteNoTrace();
248 void ClobberVolatileRegisters();
251 bool IsTracingExecution()
const;
256 last_setjmp_buffer_ =
buffer;
void set_vregisterd(VRegister reg, int idx, int64_t value)
int64_t get_vregisterd(VRegister reg, int idx) const
int64_t get_register(Register reg, R31Type r31t=R31IsSP) const
static uword RedirectExternalReference(uword function, CallKind call_kind, int argument_count)
void JumpToFrame(uword pc, uword sp, uword fp, Thread *thread)
friend class SimulatorSetjmpBuffer
static Simulator * Current()
uint64_t get_icount() const
int32_t get_vregisters(VRegister reg, int idx) const
void get_vregister(VRegister reg, simd_value_t *value) const
uword overflow_stack_limit() const
void set_vregister(VRegister reg, const simd_value_t &value)
void set_vregisters(VRegister reg, int idx, int32_t value)
uword stack_limit() const
friend class SimulatorDebugger
static constexpr uword kSimulatorStackUnderflowSize
uint64_t get_last_pc() const
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)
int32_t get_wregister(Register reg, R31Type r31t=R31IsSP) const
DART_FORCE_INLINE int32_t get_register(Register reg) const
void set_register(Instr *instr, Register reg, int64_t value, R31Type r31t=R31IsSP)
void set_wregister(Register reg, int32_t value, R31Type r31t=R31IsSP)
static uword FunctionForRedirect(uword redirect)
#define APPLY_OP_LIST(_V)
uint32_t uint32_t * format
Dart_NativeFunction function
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer