This source file includes following definitions.
- __arch_swab16
- __arch_swab32
1
2
3
4
5
6
7
8
9
10
11 #ifndef _ASM_NIOS2_SWAB_H
12 #define _ASM_NIOS2_SWAB_H
13
14 #include <linux/types.h>
15 #include <asm-generic/swab.h>
16
17 #ifdef CONFIG_NIOS2_CI_SWAB_SUPPORT
18 #ifdef __GNUC__
19
20 #define __nios2_swab(x) \
21 __builtin_custom_ini(CONFIG_NIOS2_CI_SWAB_NO, (x))
22
23 static inline __attribute__((const)) __u16 __arch_swab16(__u16 x)
24 {
25 return (__u16) __nios2_swab(((__u32) x) << 16);
26 }
27 #define __arch_swab16 __arch_swab16
28
29 static inline __attribute__((const)) __u32 __arch_swab32(__u32 x)
30 {
31 return (__u32) __nios2_swab(x);
32 }
33 #define __arch_swab32 __arch_swab32
34
35 #endif
36 #endif
37
38 #endif