Reviewers: Sven Panne,

Description:
Version 4.1.0.13 (cherry-pick)

Merged 9e99a6048a651e8b780c713b0684f813cd74db34

Fix run-time ARMv6 detection.

BUG=v8:3844
LOG=N
[email protected]

Please review this at https://codereview.chromium.org/866393002/

Base URL: https://chromium.googlesource.com/v8/[email protected]

Affected files (+11, -2 lines):
  M src/base/cpu.cc
  M src/version.cc


Index: src/base/cpu.cc
diff --git a/src/base/cpu.cc b/src/base/cpu.cc
index 56e1c4633c6e28edbfc9b1e17bf3f0c67ffcd5df..daf33023656028ff6d81876660446050273fa021 100644
--- a/src/base/cpu.cc
+++ b/src/base/cpu.cc
@@ -438,7 +438,7 @@ CPU::CPU()
     //
     // See http://code.google.com/p/android/issues/detail?id=10812
     //
-    // We try to correct this by looking at the 'elf_format'
+    // We try to correct this by looking at the 'elf_platform'
     // field reported by the 'Processor' field, which is of the
     // form of "(v7l)" for an ARMv7-based CPU, and "(v6l)" for
     // an ARMv6-one. For example, the Raspberry Pi is one popular
@@ -450,6 +450,15 @@ CPU::CPU()
       }
       delete[] processor;
     }
+
+    // elf_platform moved to the model name field in Linux v3.8.
+    if (architecture_ == 7) {
+      char* processor = cpu_info.ExtractField("model name");
+      if (HasListItem(processor, "(v6l)")) {
+        architecture_ = 6;
+      }
+      delete[] processor;
+    }
   }

   // Try to extract the list of CPU features from ELF hwcaps.
Index: src/version.cc
diff --git a/src/version.cc b/src/version.cc
index 6266db9977d43fdad1839dc23325b8a9aa84dece..514cf3fd6b32c09035fe0c988e8fe21ff35d9f18 100644
--- a/src/version.cc
+++ b/src/version.cc
@@ -35,7 +35,7 @@
 #define MAJOR_VERSION     4
 #define MINOR_VERSION     1
 #define BUILD_NUMBER      0
-#define PATCH_LEVEL       12
+#define PATCH_LEVEL       13
 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)
 #define IS_CANDIDATE_VERSION 0


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to