12#ifndef RUNTIME_VM_SIMULATOR_ARM_H_
13#define RUNTIME_VM_SIMULATOR_ARM_H_
15#ifndef RUNTIME_VM_SIMULATOR_H_
16#error Do not include simulator_arm.h directly; use simulator.h.
26class SimulatorSetjmpBuffer;
66 DART_FORCE_INLINE int32_t
get_pc()
const {
return registers_[
PC]; }
108 bool fp_return =
false,
109 bool fp_args =
false);
129 static constexpr uword kBadLR = -1;
134 static constexpr uword kEndSimulatingPC = -2;
157 uword overflow_stack_limit_;
161 static int32_t flag_stop_sim_at_;
167 int32_t break_instr_;
170 static bool IsIllegalAddress(
uword addr) {
return addr < 64 * 1024; }
171 void HandleIllegalAccess(
uword addr, Instr* instr);
174 void UnimplementedInstruction(Instr* instr);
177 void Format(Instr* instr,
const char*
format);
181 bool ConditionallyExecute(Instr* instr);
184 void SetNZFlags(int32_t val);
185 void SetCFlag(
bool val);
186 void SetVFlag(
bool val);
187 bool CarryFrom(int32_t left, int32_t right, int32_t carry);
188 bool OverflowFrom(int32_t left, int32_t right, int32_t carry);
191 int32_t GetShiftRm(Instr* instr,
bool* carry_out);
192 int32_t GetImm(Instr* instr,
bool* carry_out);
193 void HandleRList(Instr* instr,
bool load);
194 void SupervisorCall(Instr* instr);
197 void UnalignedAccess(
const char* msg,
uword addr, Instr* instr);
200 void DoDivision(Instr* instr);
206 inline uint16_t ReadHU(
uword addr, Instr* instr);
207 inline int16_t ReadH(
uword addr, Instr* instr);
210 inline intptr_t ReadW(
uword addr, Instr* instr);
214 void ClearExclusive();
215 intptr_t ReadExclusiveW(
uword addr, Instr* instr);
216 intptr_t WriteExclusiveW(
uword addr, intptr_t
value, Instr* instr);
223 uword exclusive_access_addr_;
224 uword exclusive_access_value_;
227 void DecodeType01(Instr* instr);
228 void DecodeType2(Instr* instr);
229 void DecodeType3(Instr* instr);
230 void DecodeType4(Instr* instr);
231 void DecodeType5(Instr* instr);
232 void DecodeType6(Instr* instr);
233 void DecodeType7(Instr* instr);
234 void DecodeSIMDDataProcessing(Instr* instr);
237 void InstructionDecode(Instr* instr);
238 void InstructionDecodeImpl(Instr* instr);
242 void ExecuteNoTrace();
245 void ClobberVolatileRegisters();
248 bool IsTracingExecution()
const;
253 last_setjmp_buffer_ =
buffer;
int64_t dregisters_[kNumberOfDRegisters]
void set_register(Register reg, int32_t value)
simd_value_t qregisters_[kNumberOfQRegisters]
void set_pc(int32_t value)
void set_dregister(DRegister reg, double value)
DART_FORCE_INLINE int32_t get_pc() 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
void set_dregister_bits(DRegister reg, int64_t value)
static Simulator * Current()
void set_qregister(QRegister reg, const simd_value_t &value)
uint64_t get_icount() const
float get_sregister(SRegister reg) const
uword overflow_stack_limit() const
int64_t get_dregister_bits(DRegister reg) const
void set_sregister_bits(SRegister reg, int32_t value)
uword stack_limit() const
friend class SimulatorDebugger
static constexpr uword kSimulatorStackUnderflowSize
DART_FORCE_INLINE int32_t get_register(Register reg) const
void set_sregister(SRegister reg, float value)
double get_dregister(DRegister reg) const
void get_qregister(QRegister reg, simd_value_t *value) const
int32_t get_sregister_bits(SRegister reg) const
int32_t sregisters_[kNumberOfSRegisters]
int64_t Call(int32_t entry, int32_t parameter0, int32_t parameter1, int32_t parameter2, int32_t parameter3, bool fp_return=false, bool fp_args=false)
static uword FunctionForRedirect(uword redirect)
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