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

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: 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') | runtime/vm/os_macos.cc » ('J')
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..92e39adca7d978f48f6fe2953c1f333ae82b5d78 100644
--- a/runtime/vm/cpu_arm.cc
+++ b/runtime/vm/cpu_arm.cc
@@ -128,6 +128,23 @@ bool HostCPUFeatures::initialized_ = false;
#if !defined(USING_SIMULATOR)
+#if TARGET_OS_IOS
+void HostCPUFeatures::InitOnce() {
rmacnak 2015/10/27 20:44:22 TODO(24743): Actually check the CPU features and f
Chinmay 2015/10/27 20:49:47 ack
+ hardware_ = "";
+ // When the VM is targetted to ARMv7, pretend that the CPU is ARMv7 even if
+ // the CPU is actuall 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 +219,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') | runtime/vm/os_macos.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698