Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(752)

Unified Diff: runtime/vm/cpu_arm64.cc

Issue 1156053006: - Determine whether the simulator is being used in globals.h (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/cpu_arm.cc ('k') | runtime/vm/cpu_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/cpu_arm64.cc
diff --git a/runtime/vm/cpu_arm64.cc b/runtime/vm/cpu_arm64.cc
index a31ddad6c2fbae23d5ad0c9f154e929ef1e2f7e0..d9ec03bd3711cfaffd597c18ce00287f91081384 100644
--- a/runtime/vm/cpu_arm64.cc
+++ b/runtime/vm/cpu_arm64.cc
@@ -10,7 +10,7 @@
#include "vm/cpuinfo.h"
#include "vm/simulator.h"
-#if defined(HOST_ARCH_ARM64)
+#if !defined(USING_SIMULATOR)
#include <sys/syscall.h> /* NOLINT */
#include <unistd.h> /* NOLINT */
#endif
@@ -18,7 +18,7 @@
namespace dart {
void CPU::FlushICache(uword start, uword size) {
-#if defined(HOST_ARCH_ARM64)
+#if !defined(USING_SIMULATOR)
// Nothing to do. Flushing no instructions.
if (size == 0) {
return;
@@ -41,7 +41,7 @@ void CPU::FlushICache(uword start, uword size) {
const char* CPU::Id() {
return
-#if !defined(HOST_ARCH_ARM64)
+#if defined(USING_SIMULATOR)
"sim"
#endif // !defined(HOST_ARCH_ARM64)
"arm64";
@@ -54,7 +54,7 @@ bool HostCPUFeatures::initialized_ = false;
#endif
-#if defined(HOST_ARCH_ARM64)
+#if !defined(USING_SIMULATOR)
void HostCPUFeatures::InitOnce() {
CpuInfo::InitOnce();
hardware_ = CpuInfo::GetCpuModel();
@@ -75,7 +75,7 @@ void HostCPUFeatures::Cleanup() {
CpuInfo::Cleanup();
}
-#else
+#else // !defined(USING_SIMULATOR)
void HostCPUFeatures::InitOnce() {
CpuInfo::InitOnce();
@@ -96,7 +96,7 @@ void HostCPUFeatures::Cleanup() {
hardware_ = NULL;
CpuInfo::Cleanup();
}
-#endif // defined(HOST_ARCH_ARM64)
+#endif // !defined(USING_SIMULATOR)
} // namespace dart
« no previous file with comments | « runtime/vm/cpu_arm.cc ('k') | runtime/vm/cpu_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698