Flutter Engine
The Flutter Engine
cpu_ia32.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_IA32)
7
8#include "vm/cpu.h"
9#include "vm/cpu_ia32.h"
10
11#include "vm/cpuinfo.h"
12
13namespace dart {
14
15DEFINE_FLAG(bool, use_sse41, true, "Use SSE 4.1 if available");
16
17void CPU::FlushICache(uword start, uword size) {
18 // Nothing to be done here.
19}
20
21const char* CPU::Id() {
22 return
23#if defined(USING_SIMULATOR)
24 "sim"
25#endif // !defined(USING_SIMULATOR)
26 "ia32";
27}
28
29const char* HostCPUFeatures::hardware_ = nullptr;
30bool HostCPUFeatures::sse2_supported_ = false;
31bool HostCPUFeatures::sse4_1_supported_ = false;
32bool HostCPUFeatures::popcnt_supported_ = false;
33bool HostCPUFeatures::abm_supported_ = false;
34#if defined(DEBUG)
35bool HostCPUFeatures::initialized_ = false;
36#endif
37
40 hardware_ = CpuInfo::GetCpuModel();
41 sse2_supported_ = CpuInfo::FieldContains(kCpuInfoFeatures, "sse2");
42 sse4_1_supported_ = CpuInfo::FieldContains(kCpuInfoFeatures, "sse4_1") ||
44 popcnt_supported_ = CpuInfo::FieldContains(kCpuInfoFeatures, "popcnt");
45 abm_supported_ = CpuInfo::FieldContains(kCpuInfoFeatures, "abm");
46#if defined(DEBUG)
47 initialized_ = true;
48#endif
49}
50
52 DEBUG_ASSERT(initialized_);
53#if defined(DEBUG)
54 initialized_ = false;
55#endif
56 ASSERT(hardware_ != nullptr);
57 free(const_cast<char*>(hardware_));
58 hardware_ = nullptr;
60}
61
62} // namespace dart
63
64#endif // defined TARGET_ARCH_IA32
#define DEBUG_ASSERT(cond)
Definition: assert.h:321
static const char * Id()
static void FlushICache(uword start, uword size)
static void Init()
static const char * GetCpuModel()
Definition: cpuinfo.h:59
static void Cleanup()
static bool FieldContains(CpuInfoIndices idx, const char *search_string)
static void Init()
static void Cleanup()
#define ASSERT(E)
Definition: dart_vm.cc:33
@ kCpuInfoFeatures
Definition: cpuinfo.h:19
uintptr_t uword
Definition: globals.h:501
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
Definition: switches.h:259