1 #ifndef __ASM_METAG_SWAB_H
2 #define __ASM_METAG_SWAB_H
4 #include <linux/compiler.h>
5 #include <linux/types.h>
6 #include <asm-generic/swab.h>
8 static inline __attribute_const__ __u16 __arch_swab16(__u16 x)
10 return __builtin_metag_bswaps(x);
12 #define __arch_swab16 __arch_swab16
14 static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
16 return __builtin_metag_bswap(x);
18 #define __arch_swab32 __arch_swab32
20 static inline __attribute_const__ __u64 __arch_swab64(__u64 x)
22 return __builtin_metag_bswapll(x);
24 #define __arch_swab64 __arch_swab64
26 #endif /* __ASM_METAG_SWAB_H */