riscv64: fix linking with binutils 2.40
[uclibc-ng.git] / libc / sysdeps / linux / cris / bits / byteswap.h
bloba82f9c0987d8c4a66f7363aee8955cb89b2b7d54
1 #ifndef _ASM_BITS_BYTESWAP_H
2 #define _ASM_BITS_BYTESWAP_H 1
4 /* CRIS specific byte swap operations: 16, 32 and 64-bit */
6 #define __bswap_non_constant_16(x) \
7 __extension__ \
8 ({ unsigned short __bswap_16_v; \
9 __asm__ ("swapb %0" : "=r" (__bswap_16_v) : "0" (x)); \
10 __bswap_16_v; })
12 #define __bswap_non_constant_32(x) \
13 __extension__ \
14 ({ unsigned int __bswap_32_v; \
15 __asm__ ("swapwb %0" : "=r" (__bswap_32_v) : "0" (x)); \
16 __bswap_32_v; })
18 #endif
20 #include <bits/byteswap-common.h>