1 /****************************************************************************
2 ****************************************************************************
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
10 ****************************************************************************
11 ****************************************************************************/
12 #ifndef __ASM_ARM_BYTEORDER_H
13 #define __ASM_ARM_BYTEORDER_H
15 #include <linux/compiler.h>
16 #include <asm/types.h>
18 static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
23 if (!__builtin_constant_p(x)) {
25 asm ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x));
28 t = x ^ ((x << 16) | (x >> 16));
30 x = (x << 24) | (x >> 8);
37 #define __arch__swab32(x) ___arch__swab32(x)
39 #ifndef __STRICT_ANSI__
40 #define __BYTEORDER_HAS_U64__
41 #define __SWAB_64_THRU_32__
45 #include <linux/byteorder/big_endian.h>
47 #include <linux/byteorder/little_endian.h>