1 /* SPDX-License-Identifier: GPL-2.0 */
5 static __always_inline __attribute_const__ u32
__arch_bitrev32(u32 x
)
7 __asm__ ("rbit %0, %1" : "=r" (x
) : "r" (x
));
11 static __always_inline __attribute_const__ u16
__arch_bitrev16(u16 x
)
13 return __arch_bitrev32((u32
)x
) >> 16;
16 static __always_inline __attribute_const__ u8
__arch_bitrev8(u8 x
)
18 return __arch_bitrev32((u32
)x
) >> 24;