0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef __ASM_ARM_SWAB_H
0017 #define __ASM_ARM_SWAB_H
0018
0019 #include <uapi/asm/swab.h>
0020
0021 #if __LINUX_ARM_ARCH__ >= 6
0022
0023 static inline __attribute_const__ __u32 __arch_swahb32(__u32 x)
0024 {
0025 __asm__ ("rev16 %0, %1" : "=r" (x) : "r" (x));
0026 return x;
0027 }
0028 #define __arch_swahb32 __arch_swahb32
0029 #define __arch_swab16(x) ((__u16)__arch_swahb32(x))
0030
0031 static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
0032 {
0033 __asm__ ("rev %0, %1" : "=r" (x) : "r" (x));
0034 return x;
0035 }
0036 #define __arch_swab32 __arch_swab32
0037
0038 #endif
0039 #endif