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

Unified Diff: runtime/vm/cpu_arm.cc

Issue 2481873005: clang-format runtime/vm (Closed)
Patch Set: Merge Created 4 years, 1 month 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.h ('k') | runtime/vm/cpu_arm64.h » ('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 a0e31a9f03fb5a8dd235dedaa9cea9b41874e453..c2b7e762d8264fd86bd38004026b0874b5e88519 100644
--- a/runtime/vm/cpu_arm.cc
+++ b/runtime/vm/cpu_arm.cc
@@ -16,8 +16,8 @@
#include "vm/simulator.h"
#if !defined(USING_SIMULATOR)
-#include <sys/syscall.h> /* NOLINT */
-#include <unistd.h> /* NOLINT */
+#include <sys/syscall.h> /* NOLINT */
+#include <unistd.h> /* NOLINT */
#endif
// ARM version differences.
@@ -61,17 +61,23 @@ namespace dart {
#if defined(TARGET_ARCH_ARM_5TE)
DEFINE_FLAG(bool, use_vfp, false, "Use vfp instructions if supported");
DEFINE_FLAG(bool, use_neon, false, "Use neon instructions if supported");
-DEFINE_FLAG(bool, use_integer_division, false,
+DEFINE_FLAG(bool,
+ use_integer_division,
+ false,
"Use integer division instruction if supported");
#elif defined(TARGET_ARCH_ARM_6)
DEFINE_FLAG(bool, use_vfp, true, "Use vfp instructions if supported");
DEFINE_FLAG(bool, use_neon, false, "Use neon instructions if supported");
-DEFINE_FLAG(bool, use_integer_division, false,
+DEFINE_FLAG(bool,
+ use_integer_division,
+ false,
"Use integer division instruction if supported");
#else
DEFINE_FLAG(bool, use_vfp, true, "Use vfp instructions if supported");
DEFINE_FLAG(bool, use_neon, true, "Use neon instructions if supported");
-DEFINE_FLAG(bool, use_integer_division, true,
+DEFINE_FLAG(bool,
+ use_integer_division,
+ true,
"Use integer division instruction if supported");
#endif
@@ -95,19 +101,19 @@ void CPU::FlushICache(uword start, uword size) {
return;
}
- // ARM recommends using the gcc intrinsic __clear_cache on Linux, and the
- // library call cacheflush from unistd.h on Android:
- // blogs.arm.com/software-enablement/141-caches-and-self-modifying-code/
- #if defined(__linux__) && !defined(ANDROID)
- extern void __clear_cache(char*, char*);
- char* beg = reinterpret_cast<char*>(start);
- char* end = reinterpret_cast<char*>(start + size);
- ::__clear_cache(beg, end);
- #elif defined(ANDROID)
- cacheflush(start, start + size, 0);
- #else
- #error FlushICache only tested/supported on Linux and Android
- #endif
+// ARM recommends using the gcc intrinsic __clear_cache on Linux, and the
+// library call cacheflush from unistd.h on Android:
+// blogs.arm.com/software-enablement/141-caches-and-self-modifying-code/
+#if defined(__linux__) && !defined(ANDROID)
+ extern void __clear_cache(char*, char*);
+ char* beg = reinterpret_cast<char*>(start);
+ char* end = reinterpret_cast<char*>(start + size);
+ ::__clear_cache(beg, end);
+#elif defined(ANDROID)
+ cacheflush(start, start + size, 0);
+#else
+#error FlushICache only tested/supported on Linux and Android
+#endif
#endif
}
@@ -115,9 +121,9 @@ void CPU::FlushICache(uword start, uword size) {
const char* CPU::Id() {
return
#if defined(USING_SIMULATOR)
- "sim"
+ "sim"
#endif // defined(USING_SIMULATOR)
- "arm";
+ "arm";
}
@@ -203,8 +209,7 @@ void HostCPUFeatures::InitOnce() {
bool is_krait = CpuInfo::FieldContains(kCpuInfoHardware, "QCT APQ8064");
bool is_armada_370xp =
CpuInfo::FieldContains(kCpuInfoHardware, "Marvell Armada 370/XP");
- bool is_pixel =
- CpuInfo::FieldContains(kCpuInfoHardware, "MSM8996pro");
+ bool is_pixel = CpuInfo::FieldContains(kCpuInfoHardware, "MSM8996pro");
if (is_krait) {
integer_division_supported_ = FLAG_use_integer_division;
} else if (is_armada_370xp || is_pixel) {
@@ -218,8 +223,8 @@ void HostCPUFeatures::InitOnce() {
(CpuInfo::FieldContains(kCpuInfoFeatures, "neon") || is_arm64) &&
FLAG_use_vfp && FLAG_use_neon;
- // Use the cross-compiler's predefined macros to determine whether we should
- // use the hard or soft float ABI.
+// Use the cross-compiler's predefined macros to determine whether we should
+// use the hard or soft float ABI.
#if defined(__ARM_PCS_VFP)
hardfp_supported_ = true;
#else
« no previous file with comments | « runtime/vm/cpu_arm.h ('k') | runtime/vm/cpu_arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698