1/* 2 * This header was generated from the Linux kernel headers by update_headers.py, 3 * to provide necessary information from kernel to userspace, such as constants, 4 * structures, and macros, and thus, contains no copyrightable information. 5 */ 6#ifndef __ASM_ARM_SWAB_H 7#define __ASM_ARM_SWAB_H 8#include <linux/types.h> 9#if !defined(__STRICT_ANSI__) || defined(__KERNEL__) 10# define __SWAB_64_THRU_32__ 11#endif 12static __inline__ __u32 __arch_swab32(__u32 x) 13{ 14 __u32 t; 15#ifndef __thumb__ 16 if (!__builtin_constant_p(x)) { 17 18 __asm__ ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x)); 19 } else 20#endif 21 t = x ^ ((x << 16) | (x >> 16)); 22 x = (x << 24) | (x >> 8); 23 t &= ~0x00FF0000; 24 x ^= (t >> 8); 25 return x; 26} 27#define __arch_swab32 __arch_swab32 28#endif 29