1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2*4882a593Smuzhiyun #ifndef _ASM_GENERIC_SWAB_H 3*4882a593Smuzhiyun #define _ASM_GENERIC_SWAB_H 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun #include <asm/bitsperlong.h> 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun /* 8*4882a593Smuzhiyun * 32 bit architectures typically (but not always) want to 9*4882a593Smuzhiyun * set __SWAB_64_THRU_32__. In user space, this is only 10*4882a593Smuzhiyun * valid if the compiler supports 64 bit data types. 11*4882a593Smuzhiyun */ 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun #if __BITS_PER_LONG == 32 14*4882a593Smuzhiyun #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) 15*4882a593Smuzhiyun #define __SWAB_64_THRU_32__ 16*4882a593Smuzhiyun #endif 17*4882a593Smuzhiyun #endif 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun #endif /* _ASM_GENERIC_SWAB_H */ 20