blob: b354acdafec8e8a2f958acf6f9639209f9a7c609 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _M68K_BYTEORDER_H
2#define _M68K_BYTEORDER_H
3
4#include <asm/types.h>
5#include <linux/compiler.h>
6
Harvey Harrisonaa6eeee2008-11-18 20:45:23 +01007#define __BIG_ENDIAN
8#define __SWAB_64_THRU_32__
Linus Torvalds1da177e2005-04-16 15:20:36 -07009
Harvey Harrisonaa6eeee2008-11-18 20:45:23 +010010static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
Linus Torvalds1da177e2005-04-16 15:20:36 -070011{
12 __asm__("rolw #8,%0; swap %0; rolw #8,%0" : "=d" (val) : "0" (val));
13 return val;
14}
Harvey Harrisonaa6eeee2008-11-18 20:45:23 +010015#define __arch_swab32 __arch_swab32
Linus Torvalds1da177e2005-04-16 15:20:36 -070016
Harvey Harrisonaa6eeee2008-11-18 20:45:23 +010017#include <linux/byteorder.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070018
19#endif /* _M68K_BYTEORDER_H */