Commit 9e99a604 authored by Ben Noordhuis's avatar Ben Noordhuis Committed by Benedikt Meurer

Fix run-time ARMv6 detection.

BUG=v8:3844
LOG=y
R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/867713003

Patch from Ben Noordhuis <info@bnoordhuis.nl>.

Cr-Commit-Position: refs/heads/master@{#26234}
parent 3ef689bb
...@@ -456,7 +456,7 @@ CPU::CPU() ...@@ -456,7 +456,7 @@ CPU::CPU()
// //
// See http://code.google.com/p/android/issues/detail?id=10812 // 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 // field reported by the 'Processor' field, which is of the
// form of "(v7l)" for an ARMv7-based CPU, and "(v6l)" for // form of "(v7l)" for an ARMv7-based CPU, and "(v6l)" for
// an ARMv6-one. For example, the Raspberry Pi is one popular // an ARMv6-one. For example, the Raspberry Pi is one popular
...@@ -468,6 +468,15 @@ CPU::CPU() ...@@ -468,6 +468,15 @@ CPU::CPU()
} }
delete[] processor; 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. // Try to extract the list of CPU features from ELF hwcaps.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment