mirror of
https://github.com/google/cpu_features.git
synced 2025-07-01 05:11:15 +02:00
Fix ARMv6 on Linux vs Android (#81)
This commit is contained in:

committed by
Guillaume Chatelet

parent
bfb4cf99cc
commit
18342789a1
@ -102,7 +102,11 @@ static bool HandleArmLine(const LineResult result, ArmInfo* const info,
|
||||
const StringView digits =
|
||||
CpuFeatures_StringView_KeepFront(value, IndexOfNonDigit(value));
|
||||
info->architecture = CpuFeatures_StringView_ParsePositiveNumber(digits);
|
||||
} else if (CpuFeatures_StringView_IsEquals(key, str("Processor"))) {
|
||||
} else if (CpuFeatures_StringView_IsEquals(key, str("Processor"))
|
||||
|| CpuFeatures_StringView_IsEquals(key, str("model name")) ) {
|
||||
// Android reports this in a non-Linux standard "Processor" but sometimes
|
||||
// also in "model name", Linux reports it only in "model name"
|
||||
// see RaspberryPiZero (Linux) vs InvalidArmv7 (Android) test-cases
|
||||
proc_info->processor_reports_armv6 =
|
||||
CpuFeatures_StringView_IndexOf(value, str("(v6l)")) >= 0;
|
||||
} else if (CpuFeatures_StringView_IsEquals(key, str("Hardware"))) {
|
||||
|
Reference in New Issue
Block a user