xref: /aosp_15_r20/external/libvpx/vpx_ports/arm.h (revision fb1b10ab9aebc7c7068eedab379b749d7e3900be)
1 /*
2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3  *
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
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #ifndef VPX_VPX_PORTS_ARM_H_
12 #define VPX_VPX_PORTS_ARM_H_
13 #include <stdlib.h>
14 #include "vpx_config.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 // Armv7-A optional Neon instructions, mandatory from Armv8.0-A.
21 #define HAS_NEON (1 << 0)
22 // Armv8.2-A optional Neon dot-product instructions, mandatory from Armv8.4-A.
23 #define HAS_NEON_DOTPROD (1 << 1)
24 // Armv8.2-A optional Neon i8mm instructions, mandatory from Armv8.6-A.
25 #define HAS_NEON_I8MM (1 << 2)
26 // Armv8.2-A optional SVE instructions, mandatory from Armv9.0-A.
27 #define HAS_SVE (1 << 3)
28 // Armv9.0-A SVE2 instructions.
29 #define HAS_SVE2 (1 << 4)
30 
31 int arm_cpu_caps(void);
32 
33 // Earlier gcc compilers have issues with some neon intrinsics
34 #if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 4 && \
35     __GNUC_MINOR__ <= 6
36 #define VPX_INCOMPATIBLE_GCC
37 #endif
38 
39 #ifdef __cplusplus
40 }  // extern "C"
41 #endif
42 
43 #endif  // VPX_VPX_PORTS_ARM_H_
44