1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
5 #include <linux/types.h>
6 #include <linux/compiler.h>
8 #define __SWAB_64_THRU_32__
10 #if defined (__mcfisaaplus__) || defined (__mcfisac__)
11 static inline __attribute_const__ __u32
__arch_swab32(__u32 val
)
13 __asm__("byterev %0" : "=d" (val
) : "0" (val
));
17 #define __arch_swab32 __arch_swab32
18 #elif !defined(__mcoldfire__)
20 static inline __attribute_const__ __u32
__arch_swab32(__u32 val
)
22 __asm__("rolw #8,%0; swap %0; rolw #8,%0" : "=d" (val
) : "0" (val
));
25 #define __arch_swab32 __arch_swab32
28 #endif /* _M68K_SWAB_H */