Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1501542 - Part 2. Implement CheckARMSupport for Android. r=mt
Summary: Android 4.3 or later has getauxval, so we can use it to detect ARM features. Also, current CPU detection has a bug to detect NEON. AT_HWCAP2 doesn't return NEON bit. So it should use AT_HWCAP instead of AT_HWCAP2. But some old device such as Nexus 4 doesn't return valid value for getauxval(AT_HWCAP). So we don't trust return value of AT_HWCAP on Android. Since AT_HWCAP2 is implemented in newer devices, cpu-features in Android NDK doesn't have fallback such as AT_HWCAP case. So we can trust it. Also, if toolchain / system's default is NEON, compiler defines __ARM_NEON__ and/or __ARM_NEON (like x86's __SSE2__ defines), so if it is defined, we always allow NEON. Depends on D11430 Reviewers: franziskus, jcj, mt Reviewed By: mt Subscribers: mt Bug #: 1501542 Differential Revision: https://phabricator.services.mozilla.com/D11431 --HG-- extra : rebase_source : 92920566b37e0ca1e1f328946fc1c1163e01ccce extra : amend_source : 1aa646efc2783bfdd8fba9bce28873fc5de361f5
- Loading branch information
1 parent
986dd12
commit 3133fba
Showing
1 changed file
with
56 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters