6#if defined(TARGET_ARCH_ARM)
13#if !defined(TARGET_HOST_MISMATCH)
14#if defined(DART_HOST_OS_MACOS) || defined(DART_HOST_OS_IOS)
15#include <libkern/OSCacheControl.h>
16#elif defined(DART_HOST_OS_WINDOWS)
17#include <processthreadsapi.h>
18#elif defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_ANDROID)
50DEFINE_FLAG(
bool, use_neon,
true,
"Use neon instructions if supported");
54 "Use integer division instruction if supported");
56#if defined(TARGET_HOST_MISMATCH)
57#if defined(DART_TARGET_OS_ANDROID) || defined(DART_TARGET_OS_MACOS_IOS)
58DEFINE_FLAG(
bool, sim_use_hardfp,
false,
"Use the hardfp ABI.");
60DEFINE_FLAG(
bool, sim_use_hardfp,
true,
"Use the hardfp ABI.");
65#if defined(DART_PRECOMPILED_RUNTIME)
67#elif !defined(TARGET_HOST_MISMATCH) && HOST_ARCH_ARM
81#if defined(DART_HOST_OS_IOS)
82 sys_icache_invalidate(
reinterpret_cast<void*
>(start),
size);
83#elif defined(DART_HOST_OS_LINUX)
84 char* beg =
reinterpret_cast<char*
>(
start);
86 __builtin___clear_cache(beg, end);
87#elif defined(DART_HOST_OS_ANDROID)
88 cacheflush(start, start +
size, 0);
89#elif defined(DART_HOST_OS_WINDOWS)
91 GetCurrentProcess(),
reinterpret_cast<const void*
>(start),
size);
94#error FlushICache only tested/supported on Linux, Android and iOS
101#if defined(TARGET_HOST_MISMATCH)
107bool HostCPUFeatures::integer_division_supported_ =
false;
108bool HostCPUFeatures::neon_supported_ =
false;
109bool HostCPUFeatures::hardfp_supported_ =
false;
110const char* HostCPUFeatures::hardware_ =
nullptr;
112bool HostCPUFeatures::initialized_ =
false;
115#if !defined(TARGET_HOST_MISMATCH)
123 integer_division_supported_ = FLAG_use_integer_division;
124 neon_supported_ = FLAG_use_neon;
125 hardfp_supported_ =
false;
130#elif DART_HOST_OS_WINDOWS
133 integer_division_supported_ =
true;
134 neon_supported_ =
true;
135 hardfp_supported_ =
true;
144 unsigned long hwcap = getauxval(AT_HWCAP);
145 integer_division_supported_ = (hwcap & HWCAP_IDIVA) != 0;
146 neon_supported_ = (hwcap & HWCAP_NEON) != 0;
154 integer_division_supported_ =
true;
158 integer_division_supported_ =
false;
163 integer_division_supported_ =
false;
167 if (!FLAG_use_integer_division) {
168 integer_division_supported_ =
false;
170 if (!FLAG_use_neon) {
171 neon_supported_ =
false;
176#if defined(__ARM_PCS_VFP)
177 hardfp_supported_ =
true;
179 hardfp_supported_ =
false;
191 initialized_ =
false;
193 ASSERT(hardware_ !=
nullptr);
194 free(
const_cast<char*
>(hardware_));
205 integer_division_supported_ = FLAG_use_integer_division;
206 neon_supported_ = FLAG_use_neon;
207 hardfp_supported_ = FLAG_sim_use_hardfp;
216 initialized_ =
false;
218 ASSERT(hardware_ !=
nullptr);
219 free(
const_cast<char*
>(hardware_));
#define DEBUG_ASSERT(cond)
static void FlushICache(uword start, uword size)
static const char * GetCpuModel()
static bool FieldContains(CpuInfoIndices idx, const char *search_string)
DEFINE_FLAG(bool, print_cluster_information, false, "Print information about clusters written to snapshot")
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size