xref: /dpdk/lib/eal/ppc/include/rte_altivec.h (revision b251bb76308f664c24a3dffd55236e92a2230901)
1 /*
2  * SPDX-License-Identifier: BSD-3-Clause
3  * Copyright (C) Mellanox 2020.
4  */
5 
6 #ifndef _RTE_ALTIVEC_H_
7 #define _RTE_ALTIVEC_H_
8 
9 /* To include altivec.h, GCC version must be >= 4.8 */
10 #include <altivec.h>
11 
12 /*
13  * The keyword "vector" is defined in altivec.h,
14  * and often conflicts with code in applications or dependencies.
15  * It is preferred to use the alternative keyword "__vector".
16  */
17 #undef vector
18 
19 /*
20  * Compilation workaround for PPC64 when AltiVec is fully enabled, e.g. std=c11.
21  * Otherwise there would be a type conflict between stdbool and altivec.
22  */
23 #if defined(__PPC64__) && !defined(__APPLE_ALTIVEC__)
24 #undef bool
25 /* redefine as in stdbool.h */
26 #define bool _Bool
27 #endif
28 
29 #endif /* _RTE_ALTIVEC_H_ */
30