1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 #ifndef XEN_BYTESWAP_H
3 #define XEN_BYTESWAP_H
4 
5 #define bswap16(x) __builtin_bswap16(x)
6 #define bswap32(x) __builtin_bswap32(x)
7 #define bswap64(x) __builtin_bswap64(x)
8 
9 #if BITS_PER_LONG == 64
10 # define bswapl(x) bswap64(x)
11 #elif BITS_PER_LONG == 32
12 # define bswapl(x) bswap32(x)
13 #endif
14 
15 #endif /* XEN_BYTESWAP_H */
16