| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #include <stdlib.h> | 11 #include <stdlib.h> |
| 12 #include <string.h> | 12 #include <string.h> |
| 13 #include <features.h> | 13 #include <features.h> |
| 14 #ifndef __GLIBC_PREREQ |
| 15 #define __GLIBC_PREREQ(a, b) 0 |
| 16 #endif |
| 14 #if __GLIBC_PREREQ(2, 16) | 17 #if __GLIBC_PREREQ(2, 16) |
| 15 #include <sys/auxv.h> | 18 #include <sys/auxv.h> |
| 16 #else | 19 #else |
| 17 #include <fcntl.h> | 20 #include <fcntl.h> |
| 18 #include <unistd.h> | 21 #include <unistd.h> |
| 19 #include <errno.h> | 22 #include <errno.h> |
| 20 #include <link.h> | 23 #include <link.h> |
| 21 #endif | 24 #endif |
| 22 #include "webrtc/system_wrappers/include/cpu_features_wrapper.h" | 25 #include "webrtc/system_wrappers/include/cpu_features_wrapper.h" |
| 23 | 26 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 if ((hwcap & HWCAP_NEON) != 0) | 77 if ((hwcap & HWCAP_NEON) != 0) |
| 75 result |= kCPUFeatureNEON; | 78 result |= kCPUFeatureNEON; |
| 76 #endif | 79 #endif |
| 77 if (architecture >= 7) | 80 if (architecture >= 7) |
| 78 result |= kCPUFeatureARMv7; | 81 result |= kCPUFeatureARMv7; |
| 79 if (architecture >= 6) | 82 if (architecture >= 6) |
| 80 result |= kCPUFeatureLDREXSTREX; | 83 result |= kCPUFeatureLDREXSTREX; |
| 81 return result; | 84 return result; |
| 82 } | 85 } |
| 83 #endif // WEBRTC_ARCH_ARM_FAMILY | 86 #endif // WEBRTC_ARCH_ARM_FAMILY |
| OLD | NEW |