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

Unified Diff: runtime/vm/cpu_arm.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/platform/globals.h ('k') | runtime/vm/cpu_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/cpu_arm.cc
diff --git a/runtime/vm/cpu_arm.cc b/runtime/vm/cpu_arm.cc
index fca5308afbb08476b61336d42e06ef7df6d0bd93..5a6695434c39d7bd5fe68d0c13d5716bc3256beb 100644
--- a/runtime/vm/cpu_arm.cc
+++ b/runtime/vm/cpu_arm.cc
@@ -13,7 +13,7 @@
#include "vm/object.h"
#include "vm/simulator.h"
-#if defined(HOST_ARCH_ARM)
+#if !defined(USING_SIMULATOR)
#include <sys/syscall.h> /* NOLINT */
#include <unistd.h> /* NOLINT */
#endif
@@ -69,7 +69,7 @@ DEFINE_FLAG(bool, use_integer_division, true,
"Use integer division instruction if supported");
#endif
-#if !defined(HOST_ARCH_ARM)
+#if defined(USING_SIMULATOR)
#if defined(TARGET_ARCH_ARM_5TE)
DEFINE_FLAG(bool, sim_use_hardfp, false, "Use the softfp ABI.");
#else
@@ -78,7 +78,7 @@ DEFINE_FLAG(bool, sim_use_hardfp, true, "Use the softfp ABI.");
#endif
void CPU::FlushICache(uword start, uword size) {
-#if defined(HOST_ARCH_ARM)
+#if !defined(USING_SIMULATOR)
// Nothing to do. Flushing no instructions.
if (size == 0) {
return;
@@ -97,16 +97,15 @@ void CPU::FlushICache(uword start, uword size) {
#else
#error FlushICache only tested/supported on Linux and Android
#endif
-
#endif
}
const char* CPU::Id() {
return
-#if !defined(HOST_ARCH_ARM)
+#if defined(USING_SIMULATOR)
"sim"
-#endif // !defined(HOST_ARCH_ARM)
+#endif // defined(USING_SIMULATOR)
"arm";
}
@@ -123,7 +122,7 @@ bool HostCPUFeatures::initialized_ = false;
#endif
-#if defined(HOST_ARCH_ARM)
+#if !defined(USING_SIMULATOR)
void HostCPUFeatures::InitOnce() {
bool is_arm64 = false;
CpuInfo::InitOnce();
@@ -236,7 +235,7 @@ void HostCPUFeatures::Cleanup() {
hardware_ = NULL;
CpuInfo::Cleanup();
}
-#endif // defined(HOST_ARCH_ARM)
+#endif // !defined(USING_SIMULATOR)
} // namespace dart
« no previous file with comments | « runtime/platform/globals.h ('k') | runtime/vm/cpu_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698