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

Unified Diff: runtime/vm/cpu_arm.cc

Issue 1413643004: Fix CPU features detection and stack alignment assert on iOS (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address CL concerns Created 5 years, 2 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 | « no previous file | runtime/vm/os_macos.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 91d0364b3d2b76ad0456d414fd70c32ef4d93508..491468afa34ff60482430abaa6916af71099d109 100644
--- a/runtime/vm/cpu_arm.cc
+++ b/runtime/vm/cpu_arm.cc
@@ -128,6 +128,25 @@ bool HostCPUFeatures::initialized_ = false;
#if !defined(USING_SIMULATOR)
+#if TARGET_OS_IOS
+void HostCPUFeatures::InitOnce() {
+ // TODO(24743): Actually check the CPU features and fail if we're missing
+ // something assumed in a precompiled snapshot.
zra 2015/10/27 20:58:41 How do you know what is assumed by a precompiled s
+ hardware_ = "";
+ // When the VM is targetted to ARMv7, pretend that the CPU is ARMv7 even if
+ // the CPU is actually AArch64.
+ arm_version_ = ARMv7;
+ // Always assume we have floating point unit since we dont support ARMv6 in
+ // this path.
+ vfp_supported_ = FLAG_use_vfp;
+ integer_division_supported_ = FLAG_use_integer_division;
+ neon_supported_ = FLAG_use_neon;
+ hardfp_supported_ = true;
+#if defined(DEBUG)
+ initialized_ = true;
+#endif
+}
+#else // TARGET_OS_IOS
void HostCPUFeatures::InitOnce() {
bool is_arm64 = false;
CpuInfo::InitOnce();
@@ -202,7 +221,7 @@ void HostCPUFeatures::InitOnce() {
initialized_ = true;
#endif
}
-
+#endif // TARGET_OS_IOS
void HostCPUFeatures::Cleanup() {
DEBUG_ASSERT(initialized_);
« no previous file with comments | « no previous file | runtime/vm/os_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698