Lines Matching +full:x +full:-

1 /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
13 #define ___bpf_mvb(x, b, n, m) ((__u##b)(x) << (b-(n+1)*8) >> (b-8) << (m*8)) argument
15 #define ___bpf_swab16(x) ((__u16)( \ argument
16 ___bpf_mvb(x, 16, 0, 1) | \
17 ___bpf_mvb(x, 16, 1, 0)))
19 #define ___bpf_swab32(x) ((__u32)( \ argument
20 ___bpf_mvb(x, 32, 0, 3) | \
21 ___bpf_mvb(x, 32, 1, 2) | \
22 ___bpf_mvb(x, 32, 2, 1) | \
23 ___bpf_mvb(x, 32, 3, 0)))
25 #define ___bpf_swab64(x) ((__u64)( \ argument
26 ___bpf_mvb(x, 64, 0, 7) | \
27 ___bpf_mvb(x, 64, 1, 6) | \
28 ___bpf_mvb(x, 64, 2, 5) | \
29 ___bpf_mvb(x, 64, 3, 4) | \
30 ___bpf_mvb(x, 64, 4, 3) | \
31 ___bpf_mvb(x, 64, 5, 2) | \
32 ___bpf_mvb(x, 64, 6, 1) | \
33 ___bpf_mvb(x, 64, 7, 0)))
51 # define __bpf_ntohs(x) __builtin_bswap16(x) argument
52 # define __bpf_htons(x) __builtin_bswap16(x) argument
53 # define __bpf_constant_ntohs(x) ___bpf_swab16(x) argument
54 # define __bpf_constant_htons(x) ___bpf_swab16(x) argument
55 # define __bpf_ntohl(x) __builtin_bswap32(x) argument
56 # define __bpf_htonl(x) __builtin_bswap32(x) argument
57 # define __bpf_constant_ntohl(x) ___bpf_swab32(x) argument
58 # define __bpf_constant_htonl(x) ___bpf_swab32(x) argument
59 # define __bpf_be64_to_cpu(x) __builtin_bswap64(x) argument
60 # define __bpf_cpu_to_be64(x) __builtin_bswap64(x) argument
61 # define __bpf_constant_be64_to_cpu(x) ___bpf_swab64(x) argument
62 # define __bpf_constant_cpu_to_be64(x) ___bpf_swab64(x) argument
64 # define __bpf_ntohs(x) (x) argument
65 # define __bpf_htons(x) (x) argument
66 # define __bpf_constant_ntohs(x) (x) argument
67 # define __bpf_constant_htons(x) (x) argument
68 # define __bpf_ntohl(x) (x) argument
69 # define __bpf_htonl(x) (x) argument
70 # define __bpf_constant_ntohl(x) (x) argument
71 # define __bpf_constant_htonl(x) (x) argument
72 # define __bpf_be64_to_cpu(x) (x) argument
73 # define __bpf_cpu_to_be64(x) (x) argument
74 # define __bpf_constant_be64_to_cpu(x) (x) argument
75 # define __bpf_constant_cpu_to_be64(x) (x) argument
80 #define bpf_htons(x) \ argument
81 (__builtin_constant_p(x) ? \
82 __bpf_constant_htons(x) : __bpf_htons(x))
83 #define bpf_ntohs(x) \ argument
84 (__builtin_constant_p(x) ? \
85 __bpf_constant_ntohs(x) : __bpf_ntohs(x))
86 #define bpf_htonl(x) \ argument
87 (__builtin_constant_p(x) ? \
88 __bpf_constant_htonl(x) : __bpf_htonl(x))
89 #define bpf_ntohl(x) \ argument
90 (__builtin_constant_p(x) ? \
91 __bpf_constant_ntohl(x) : __bpf_ntohl(x))
92 #define bpf_cpu_to_be64(x) \ argument
93 (__builtin_constant_p(x) ? \
94 __bpf_constant_cpu_to_be64(x) : __bpf_cpu_to_be64(x))
95 #define bpf_be64_to_cpu(x) \ argument
96 (__builtin_constant_p(x) ? \
97 __bpf_constant_be64_to_cpu(x) : __bpf_be64_to_cpu(x))