| Index: src/platform-linux.cc
|
| diff --git a/src/platform-linux.cc b/src/platform-linux.cc
|
| index 4a9bb7ed41bdcbb82e76c9c396f7e41142a18aac..0faff9ba843d2af723ac12eb7d7a4c3ada19f01b 100644
|
| --- a/src/platform-linux.cc
|
| +++ b/src/platform-linux.cc
|
| @@ -146,6 +146,9 @@ bool OS::ArmCpuHasFeature(CpuFeature feature) {
|
| case VFP3:
|
| search_string = "vfpv3";
|
| break;
|
| + case NEON:
|
| + search_string = "neon";
|
| + break;
|
| case ARMv7:
|
| search_string = "ARMv7";
|
| break;
|
| @@ -200,6 +203,36 @@ CpuImplementer OS::GetCpuImplementer() {
|
| }
|
|
|
|
|
| +CpuPart OS::GetCpuPart(CpuImplementer implementer) {
|
| + static bool use_cached_value = false;
|
| + static CpuPart cached_value = CPU_UNKNOWN;
|
| + if (use_cached_value) {
|
| + return cached_value;
|
| + }
|
| + if (implementer == ARM_IMPLEMENTER) {
|
| + if (CPUInfoContainsString("CPU part\t: 0xc0f")) {
|
| + cached_value = CORTEX_A15;
|
| + } else if (CPUInfoContainsString("CPU part\t: 0xc0c")) {
|
| + cached_value = CORTEX_A12;
|
| + } else if (CPUInfoContainsString("CPU part\t: 0xc09")) {
|
| + cached_value = CORTEX_A9;
|
| + } else if (CPUInfoContainsString("CPU part\t: 0xc08")) {
|
| + cached_value = CORTEX_A8;
|
| + } else if (CPUInfoContainsString("CPU part\t: 0xc07")) {
|
| + cached_value = CORTEX_A7;
|
| + } else if (CPUInfoContainsString("CPU part\t: 0xc05")) {
|
| + cached_value = CORTEX_A5;
|
| + } else {
|
| + cached_value = CPU_UNKNOWN;
|
| + }
|
| + } else {
|
| + cached_value = CPU_UNKNOWN;
|
| + }
|
| + use_cached_value = true;
|
| + return cached_value;
|
| +}
|
| +
|
| +
|
| bool OS::ArmUsingHardFloat() {
|
| // GCC versions 4.6 and above define __ARM_PCS or __ARM_PCS_VFP to specify
|
| // the Floating Point ABI used (PCS stands for Procedure Call Standard).
|
|
|