1 #ifndef __ASM_SH_BYTEORDER_H
2 #define __ASM_SH_BYTEORDER_H
5 * Copyright (C) 1999 Niibe Yutaka
6 * Copyright (C) 2000, 2001 Paolo Alberelli
8 #include <linux/compiler.h>
9 #include <linux/types.h>
11 #ifdef __LITTLE_ENDIAN__
12 # define __LITTLE_ENDIAN
17 #define __SWAB_64_THRU_32__
19 static inline __attribute_const__ __u32
__arch_swab32(__u32 x
)
35 #define __arch_swab32 __arch_swab32
37 static inline __attribute_const__ __u16
__arch_swab16(__u16 x
)
51 #define __arch_swab16 __arch_swab16
53 static inline __u64
__arch_swab64(__u64 val
)
56 struct { __u32 a
,b
; } s
;
60 w
.s
.b
= __arch_swab32(v
.s
.a
);
61 w
.s
.a
= __arch_swab32(v
.s
.b
);
64 #define __arch_swab64 __arch_swab64
66 #include <linux/byteorder.h>
68 #endif /* __ASM_SH_BYTEORDER_H */