Lines Matching refs:code
126 insn->code, insn->dst_reg, in print_bpf_end_insn()
127 BPF_SRC(insn->code) == BPF_TO_BE ? "be" : "le", in print_bpf_end_insn()
136 u8 class = BPF_CLASS(insn->code); in print_bpf_insn()
139 if (BPF_OP(insn->code) == BPF_END) { in print_bpf_insn()
141 verbose(cbs->private_data, "BUG_alu64_%02x\n", insn->code); in print_bpf_insn()
144 } else if (BPF_OP(insn->code) == BPF_NEG) { in print_bpf_insn()
146 insn->code, class == BPF_ALU ? 'w' : 'r', in print_bpf_insn()
149 } else if (BPF_SRC(insn->code) == BPF_X) { in print_bpf_insn()
151 insn->code, class == BPF_ALU ? 'w' : 'r', in print_bpf_insn()
153 bpf_alu_string[BPF_OP(insn->code) >> 4], in print_bpf_insn()
158 insn->code, class == BPF_ALU ? 'w' : 'r', in print_bpf_insn()
160 bpf_alu_string[BPF_OP(insn->code) >> 4], in print_bpf_insn()
164 if (BPF_MODE(insn->code) == BPF_MEM) in print_bpf_insn()
166 insn->code, in print_bpf_insn()
167 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
170 else if (BPF_MODE(insn->code) == BPF_ATOMIC && in print_bpf_insn()
174 insn->code, in print_bpf_insn()
175 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
179 } else if (BPF_MODE(insn->code) == BPF_ATOMIC && in print_bpf_insn()
185 insn->code, insn->src_reg, in print_bpf_insn()
186 BPF_SIZE(insn->code) == BPF_DW ? "64" : "", in print_bpf_insn()
188 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
190 } else if (BPF_MODE(insn->code) == BPF_ATOMIC && in print_bpf_insn()
193 insn->code, in print_bpf_insn()
194 BPF_SIZE(insn->code) == BPF_DW ? "64" : "", in print_bpf_insn()
195 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
198 } else if (BPF_MODE(insn->code) == BPF_ATOMIC && in print_bpf_insn()
201 insn->code, insn->src_reg, in print_bpf_insn()
202 BPF_SIZE(insn->code) == BPF_DW ? "64" : "", in print_bpf_insn()
203 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
206 verbose(cbs->private_data, "BUG_%02x\n", insn->code); in print_bpf_insn()
209 if (BPF_MODE(insn->code) == BPF_MEM) { in print_bpf_insn()
211 insn->code, in print_bpf_insn()
212 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
215 } else if (BPF_MODE(insn->code) == 0xc0 /* BPF_NOSPEC, no UAPI */) { in print_bpf_insn()
216 verbose(cbs->private_data, "(%02x) nospec\n", insn->code); in print_bpf_insn()
218 verbose(cbs->private_data, "BUG_st_%02x\n", insn->code); in print_bpf_insn()
221 if (BPF_MODE(insn->code) != BPF_MEM) { in print_bpf_insn()
222 verbose(cbs->private_data, "BUG_ldx_%02x\n", insn->code); in print_bpf_insn()
226 insn->code, insn->dst_reg, in print_bpf_insn()
227 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
230 if (BPF_MODE(insn->code) == BPF_ABS) { in print_bpf_insn()
232 insn->code, in print_bpf_insn()
233 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
235 } else if (BPF_MODE(insn->code) == BPF_IND) { in print_bpf_insn()
237 insn->code, in print_bpf_insn()
238 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
240 } else if (BPF_MODE(insn->code) == BPF_IMM && in print_bpf_insn()
241 BPF_SIZE(insn->code) == BPF_DW) { in print_bpf_insn()
254 insn->code, insn->dst_reg, in print_bpf_insn()
258 verbose(cbs->private_data, "BUG_ld_%02x\n", insn->code); in print_bpf_insn()
262 u8 opcode = BPF_OP(insn->code); in print_bpf_insn()
269 insn->code, in print_bpf_insn()
274 verbose(cbs->private_data, "(%02x) call %s#%d\n", insn->code, in print_bpf_insn()
279 } else if (insn->code == (BPF_JMP | BPF_JA)) { in print_bpf_insn()
281 insn->code, insn->off); in print_bpf_insn()
282 } else if (insn->code == (BPF_JMP | BPF_EXIT)) { in print_bpf_insn()
283 verbose(cbs->private_data, "(%02x) exit\n", insn->code); in print_bpf_insn()
284 } else if (BPF_SRC(insn->code) == BPF_X) { in print_bpf_insn()
287 insn->code, class == BPF_JMP32 ? 'w' : 'r', in print_bpf_insn()
289 bpf_jmp_string[BPF_OP(insn->code) >> 4], in print_bpf_insn()
295 insn->code, class == BPF_JMP32 ? 'w' : 'r', in print_bpf_insn()
297 bpf_jmp_string[BPF_OP(insn->code) >> 4], in print_bpf_insn()
302 insn->code, bpf_class_string[class]); in print_bpf_insn()