Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _M68K_BYTEORDER_H |
| 2 | #define _M68K_BYTEORDER_H |
| 3 | |
| 4 | #include <asm/types.h> |
| 5 | #include <linux/compiler.h> |
| 6 | |
Harvey Harrison | aa6eeee | 2008-11-18 20:45:23 +0100 | [diff] [blame] | 7 | #define __BIG_ENDIAN |
| 8 | #define __SWAB_64_THRU_32__ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | |
Harvey Harrison | aa6eeee | 2008-11-18 20:45:23 +0100 | [diff] [blame] | 10 | static inline __attribute_const__ __u32 __arch_swab32(__u32 val) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 11 | { |
| 12 | __asm__("rolw #8,%0; swap %0; rolw #8,%0" : "=d" (val) : "0" (val)); |
| 13 | return val; |
| 14 | } |
Harvey Harrison | aa6eeee | 2008-11-18 20:45:23 +0100 | [diff] [blame] | 15 | #define __arch_swab32 __arch_swab32 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | |
Harvey Harrison | aa6eeee | 2008-11-18 20:45:23 +0100 | [diff] [blame] | 17 | #include <linux/byteorder.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | |
| 19 | #endif /* _M68K_BYTEORDER_H */ |