xref: /arm-trusted-firmware/include/lib/libc/arm_acle.h (revision 91f16700b400a8c0651d24a598fc48ee2997a0d7)
1*91f16700Schasinglulu /*
2*91f16700Schasinglulu  * Copyright (c) 2021 Arm Limited
3*91f16700Schasinglulu  *
4*91f16700Schasinglulu  * SPDX-License-Identifier: BSD-3-Clause
5*91f16700Schasinglulu  *
6*91f16700Schasinglulu  * The definitions below are a subset of what we would normally get by using
7*91f16700Schasinglulu  * the compiler's version of arm_acle.h. We can't use that directly because
8*91f16700Schasinglulu  * we specify -nostdinc in the Makefiles.
9*91f16700Schasinglulu  *
10*91f16700Schasinglulu  * We just define the functions we need so far.
11*91f16700Schasinglulu  */
12*91f16700Schasinglulu 
13*91f16700Schasinglulu #ifndef ARM_ACLE_H
14*91f16700Schasinglulu #define ARM_ACLE_H
15*91f16700Schasinglulu 
16*91f16700Schasinglulu #if !defined(__aarch64__) || defined(__clang__)
17*91f16700Schasinglulu #	define __crc32b __builtin_arm_crc32b
18*91f16700Schasinglulu #	define __crc32w __builtin_arm_crc32w
19*91f16700Schasinglulu #else
20*91f16700Schasinglulu #	define __crc32b __builtin_aarch64_crc32b
21*91f16700Schasinglulu #	define __crc32w __builtin_aarch64_crc32w
22*91f16700Schasinglulu #endif
23*91f16700Schasinglulu 
24*91f16700Schasinglulu #endif	/* ARM_ACLE_H */
25