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