1 #ifndef _ASM_X86_SWAB_H
2 #define _ASM_X86_SWAB_H
4 #include <linux/types.h>
5 #include <linux/compiler.h>
7 static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
9 asm("bswapl %0" : "=r" (val) : "0" (val));
12 #define __arch_swab32 __arch_swab32
14 static inline __attribute_const__ __u64 __arch_swab64(__u64 val)
25 asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
26 : "=r" (v.s.a), "=r" (v.s.b)
27 : "0" (v.s.a), "1" (v.s.b));
30 asm("bswapq %0" : "=r" (val) : "0" (val));
34 #define __arch_swab64 __arch_swab64
36 #endif /* _ASM_X86_SWAB_H */