15 #ifndef _UAPI__ASM_ARM_SWAB_H
16 #define _UAPI__ASM_ARM_SWAB_H
18 #include <linux/compiler.h>
19 #include <linux/types.h>
21 #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
22 # define __SWAB_64_THRU_32__
26 #if !defined(__KERNEL__) || __LINUX_ARM_ARCH__ < 6
32 if (!__builtin_constant_p(x)) {
38 asm (
"eor\t%0, %1, %1, ror #16" :
"=r" (
t) :
"r" (x));
41 t = x ^ ((x << 16) | (x >> 16));
43 x = (x << 24) | (x >> 8);
49 #define __arch_swab32 __arch_swab32