1 #ifndef _CRIS_BYTEORDER_H
2 #define _CRIS_BYTEORDER_H
8 /* we just define these two (as we can do the swap in a single
9 * asm instruction in CRIS) and the arch-independent files will put
10 * them together into ntohl etc.
13 extern __inline__ __const__ __u32 ___arch__swab32(__u32 x)
15 __asm__ ("swapwb %0" : "=r" (x) : "0" (x));
20 extern __inline__ __const__ __u16 ___arch__swab16(__u16 x)
22 __asm__ ("swapb %0" : "=r" (x) : "0" (x));
27 /* defines are necessary because the other files detect the presence
28 * of a defined __arch_swab32, not an inline
31 #define __arch__swab32(x) ___arch__swab32(x)
32 #define __arch__swab16(x) ___arch__swab16(x)
34 #if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
35 # define __BYTEORDER_HAS_U64__
36 # define __SWAB_64_THRU_32__
41 #include <linux/byteorder/little_endian.h>