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

Unified Diff: runtime/vm/cpu_arm.cc

Issue 1391313002: Adds a special case for Marvell Armada 370/XP ARM CPUs (Closed) Base URL: git@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 | no next file » | 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 5a6695434c39d7bd5fe68d0c13d5716bc3256beb..44964d279697eadc413592452f21c2d1543222f8 100644
--- a/runtime/vm/cpu_arm.cc
+++ b/runtime/vm/cpu_arm.cc
@@ -165,14 +165,21 @@ void HostCPUFeatures::InitOnce() {
FLAG_use_vfp;
// Has integer division.
+ // Special cases:
+ // - Qualcomm Krait CPUs (QCT APQ8064) in Nexus 4 and 7 incorrectly report
+ // that they lack integer division.
+ // - Marvell Armada 370/XP incorrectly reports that it has integer division.
bool is_krait = CpuInfo::FieldContains(kCpuInfoHardware, "QCT APQ8064");
+ bool is_armada_370xp =
+ CpuInfo::FieldContains(kCpuInfoHardware, "Marvell Armada 370/XP");
if (is_krait) {
- // Special case for Qualcomm Krait CPUs in Nexus 4 and 7.
integer_division_supported_ = FLAG_use_integer_division;
- } else {
+ } else if (!is_armada_370xp) {
integer_division_supported_ =
(CpuInfo::FieldContains(kCpuInfoFeatures, "idiva") || is_arm64) &&
FLAG_use_integer_division;
+ } else {
+ integer_division_supported_ = false;
}
neon_supported_ =
(CpuInfo::FieldContains(kCpuInfoFeatures, "neon") || is_arm64) &&
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698