1 /* Generated by ./xlat/gen.sh from ./xlat/bpf_op_alu.in; do not edit. */
2 
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5 
6 #if defined(BPF_ADD) || (defined(HAVE_DECL_BPF_ADD) && HAVE_DECL_BPF_ADD)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((BPF_ADD) == (0x00), "BPF_ADD != 0x00");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define BPF_ADD 0x00
12 #endif
13 #if defined(BPF_SUB) || (defined(HAVE_DECL_BPF_SUB) && HAVE_DECL_BPF_SUB)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((BPF_SUB) == (0x10), "BPF_SUB != 0x10");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define BPF_SUB 0x10
19 #endif
20 #if defined(BPF_MUL) || (defined(HAVE_DECL_BPF_MUL) && HAVE_DECL_BPF_MUL)
21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
22 static_assert((BPF_MUL) == (0x20), "BPF_MUL != 0x20");
23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
24 #else
25 # define BPF_MUL 0x20
26 #endif
27 #if defined(BPF_DIV) || (defined(HAVE_DECL_BPF_DIV) && HAVE_DECL_BPF_DIV)
28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
29 static_assert((BPF_DIV) == (0x30), "BPF_DIV != 0x30");
30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
31 #else
32 # define BPF_DIV 0x30
33 #endif
34 #if defined(BPF_OR) || (defined(HAVE_DECL_BPF_OR) && HAVE_DECL_BPF_OR)
35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
36 static_assert((BPF_OR) == (0x40), "BPF_OR != 0x40");
37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
38 #else
39 # define BPF_OR 0x40
40 #endif
41 #if defined(BPF_AND) || (defined(HAVE_DECL_BPF_AND) && HAVE_DECL_BPF_AND)
42 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
43 static_assert((BPF_AND) == (0x50), "BPF_AND != 0x50");
44 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
45 #else
46 # define BPF_AND 0x50
47 #endif
48 #if defined(BPF_LSH) || (defined(HAVE_DECL_BPF_LSH) && HAVE_DECL_BPF_LSH)
49 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
50 static_assert((BPF_LSH) == (0x60), "BPF_LSH != 0x60");
51 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
52 #else
53 # define BPF_LSH 0x60
54 #endif
55 #if defined(BPF_RSH) || (defined(HAVE_DECL_BPF_RSH) && HAVE_DECL_BPF_RSH)
56 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
57 static_assert((BPF_RSH) == (0x70), "BPF_RSH != 0x70");
58 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
59 #else
60 # define BPF_RSH 0x70
61 #endif
62 #if defined(BPF_NEG) || (defined(HAVE_DECL_BPF_NEG) && HAVE_DECL_BPF_NEG)
63 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
64 static_assert((BPF_NEG) == (0x80), "BPF_NEG != 0x80");
65 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
66 #else
67 # define BPF_NEG 0x80
68 #endif
69 #if defined(BPF_MOD) || (defined(HAVE_DECL_BPF_MOD) && HAVE_DECL_BPF_MOD)
70 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
71 static_assert((BPF_MOD) == (0x90), "BPF_MOD != 0x90");
72 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
73 #else
74 # define BPF_MOD 0x90
75 #endif
76 #if defined(BPF_XOR) || (defined(HAVE_DECL_BPF_XOR) && HAVE_DECL_BPF_XOR)
77 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
78 static_assert((BPF_XOR) == (0xa0), "BPF_XOR != 0xa0");
79 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
80 #else
81 # define BPF_XOR 0xa0
82 #endif
83 #if defined(BPF_MOV) || (defined(HAVE_DECL_BPF_MOV) && HAVE_DECL_BPF_MOV)
84 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
85 static_assert((BPF_MOV) == (0xb0), "BPF_MOV != 0xb0");
86 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
87 #else
88 # define BPF_MOV 0xb0
89 #endif
90 #if defined(BPF_ARSH) || (defined(HAVE_DECL_BPF_ARSH) && HAVE_DECL_BPF_ARSH)
91 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
92 static_assert((BPF_ARSH) == (0xc0), "BPF_ARSH != 0xc0");
93 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
94 #else
95 # define BPF_ARSH 0xc0
96 #endif
97 #if defined(BPF_END) || (defined(HAVE_DECL_BPF_END) && HAVE_DECL_BPF_END)
98 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
99 static_assert((BPF_END) == (0xd0), "BPF_END != 0xd0");
100 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
101 #else
102 # define BPF_END 0xd0
103 #endif
104 
105 #ifndef XLAT_MACROS_ONLY
106 
107 # ifdef IN_MPERS
108 
109 #  error static const struct xlat bpf_op_alu in mpers mode
110 
111 # else
112 
113 static
114 const struct xlat bpf_op_alu[] = {
115  XLAT(BPF_ADD),
116  XLAT(BPF_SUB),
117  XLAT(BPF_MUL),
118  XLAT(BPF_DIV),
119  XLAT(BPF_OR),
120  XLAT(BPF_AND),
121  XLAT(BPF_LSH),
122  XLAT(BPF_RSH),
123  XLAT(BPF_NEG),
124  XLAT(BPF_MOD),
125  XLAT(BPF_XOR),
126  XLAT(BPF_MOV),
127  XLAT(BPF_ARSH),
128  XLAT(BPF_END),
129  XLAT_END
130 };
131 
132 # endif /* !IN_MPERS */
133 
134 #endif /* !XLAT_MACROS_ONLY */
135