Timothy B. Terriberry | b71962f | 2010-10-20 15:39:11 -0700 | [diff] [blame] | 1 | /* |
Yaowu Xu | 9c01aa1 | 2016-09-01 14:32:49 -0700 | [diff] [blame] | 2 | * Copyright (c) 2016, Alliance for Open Media. All rights reserved |
Timothy B. Terriberry | b71962f | 2010-10-20 15:39:11 -0700 | [diff] [blame] | 3 | * |
Yaowu Xu | 9c01aa1 | 2016-09-01 14:32:49 -0700 | [diff] [blame] | 4 | * This source code is subject to the terms of the BSD 2 Clause License and |
| 5 | * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License |
| 6 | * was not distributed with this source code in the LICENSE file, you can |
| 7 | * obtain it at www.aomedia.org/license/software. If the Alliance for Open |
| 8 | * Media Patent License 1.0 was not distributed with this source code in the |
| 9 | * PATENTS file, you can obtain it at www.aomedia.org/license/patent. |
Timothy B. Terriberry | b71962f | 2010-10-20 15:39:11 -0700 | [diff] [blame] | 10 | */ |
| 11 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 12 | #ifndef AOM_PORTS_ARM_H_ |
| 13 | #define AOM_PORTS_ARM_H_ |
Timothy B. Terriberry | b71962f | 2010-10-20 15:39:11 -0700 | [diff] [blame] | 14 | #include <stdlib.h> |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 15 | #include "aom_config.h" |
Timothy B. Terriberry | b71962f | 2010-10-20 15:39:11 -0700 | [diff] [blame] | 16 | |
James Zern | a5d23f5 | 2014-01-18 12:16:11 -0800 | [diff] [blame] | 17 | #ifdef __cplusplus |
| 18 | extern "C" { |
| 19 | #endif |
| 20 | |
Timothy B. Terriberry | b71962f | 2010-10-20 15:39:11 -0700 | [diff] [blame] | 21 | /*ARMv5TE "Enhanced DSP" instructions.*/ |
clang-format | 05ce850 | 2016-08-10 18:23:43 -0700 | [diff] [blame] | 22 | #define HAS_EDSP 0x01 |
Timothy B. Terriberry | b71962f | 2010-10-20 15:39:11 -0700 | [diff] [blame] | 23 | /*ARMv6 "Parallel" or "Media" instructions.*/ |
| 24 | #define HAS_MEDIA 0x02 |
| 25 | /*ARMv7 optional NEON instructions.*/ |
clang-format | 05ce850 | 2016-08-10 18:23:43 -0700 | [diff] [blame] | 26 | #define HAS_NEON 0x04 |
Timothy B. Terriberry | b71962f | 2010-10-20 15:39:11 -0700 | [diff] [blame] | 27 | |
| 28 | int arm_cpu_caps(void); |
| 29 | |
Johann | f6be2f3 | 2014-09-25 09:30:28 -0700 | [diff] [blame] | 30 | // Earlier gcc compilers have issues with some neon intrinsics |
clang-format | 05ce850 | 2016-08-10 18:23:43 -0700 | [diff] [blame] | 31 | #if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 4 && \ |
| 32 | __GNUC_MINOR__ <= 6 |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 33 | #define AOM_INCOMPATIBLE_GCC |
Johann | f6be2f3 | 2014-09-25 09:30:28 -0700 | [diff] [blame] | 34 | #endif |
| 35 | |
James Zern | a5d23f5 | 2014-01-18 12:16:11 -0800 | [diff] [blame] | 36 | #ifdef __cplusplus |
| 37 | } // extern "C" |
| 38 | #endif |
| 39 | |
Yaowu Xu | f883b42 | 2016-08-30 14:01:10 -0700 | [diff] [blame] | 40 | #endif // AOM_PORTS_ARM_H_ |