aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/include/asm/swab.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/include/asm/swab.h')
-rw-r--r--arch/m68k/include/asm/swab.h30
1 files changed, 26 insertions, 4 deletions
diff --git a/arch/m68k/include/asm/swab.h b/arch/m68k/include/asm/swab.h
index 7d7dde1c73ec..9e3054ea59e9 100644
--- a/arch/m68k/include/asm/swab.h
+++ b/arch/m68k/include/asm/swab.h
@@ -1,5 +1,27 @@
1#ifdef __uClinux__ 1#ifndef _M68K_SWAB_H
2#include "swab_no.h" 2#define _M68K_SWAB_H
3#else 3
4#include "swab_mm.h" 4#include <asm/types.h>
5#include <linux/compiler.h>
6
7#define __SWAB_64_THRU_32__
8
9#if defined (__mcfisaaplus__) || defined (__mcfisac__)
10static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
11{
12 __asm__("byterev %0" : "=d" (val) : "0" (val));
13 return val;
14}
15
16#define __arch_swab32 __arch_swab32
17#elif !defined(__uClinux__)
18
19static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
20{
21 __asm__("rolw #8,%0; swap %0; rolw #8,%0" : "=d" (val) : "0" (val));
22 return val;
23}
24#define __arch_swab32 __arch_swab32
5#endif 25#endif
26
27#endif /* _M68K_SWAB_H */