Lines Matching refs:ebpf
23 ebpf::{self, Insn},
47 ("add", ebpf::BPF_ADD), in make_instruction_map()
48 ("sub", ebpf::BPF_SUB), in make_instruction_map()
49 ("mul", ebpf::BPF_MUL), in make_instruction_map()
50 ("div", ebpf::BPF_DIV), in make_instruction_map()
51 ("or", ebpf::BPF_OR), in make_instruction_map()
52 ("and", ebpf::BPF_AND), in make_instruction_map()
53 ("lsh", ebpf::BPF_LSH), in make_instruction_map()
54 ("rsh", ebpf::BPF_RSH), in make_instruction_map()
55 ("mod", ebpf::BPF_MOD), in make_instruction_map()
56 ("xor", ebpf::BPF_XOR), in make_instruction_map()
57 ("mov", ebpf::BPF_MOV), in make_instruction_map()
58 ("arsh", ebpf::BPF_ARSH), in make_instruction_map()
62 ("w", ebpf::BPF_W), in make_instruction_map()
63 ("h", ebpf::BPF_H), in make_instruction_map()
64 ("b", ebpf::BPF_B), in make_instruction_map()
65 ("dw", ebpf::BPF_DW), in make_instruction_map()
69 ("jeq", ebpf::BPF_JEQ), in make_instruction_map()
70 ("jgt", ebpf::BPF_JGT), in make_instruction_map()
71 ("jge", ebpf::BPF_JGE), in make_instruction_map()
72 ("jlt", ebpf::BPF_JLT), in make_instruction_map()
73 ("jle", ebpf::BPF_JLE), in make_instruction_map()
74 ("jset", ebpf::BPF_JSET), in make_instruction_map()
75 ("jne", ebpf::BPF_JNE), in make_instruction_map()
76 ("jsgt", ebpf::BPF_JSGT), in make_instruction_map()
77 ("jsge", ebpf::BPF_JSGE), in make_instruction_map()
78 ("jslt", ebpf::BPF_JSLT), in make_instruction_map()
79 ("jsle", ebpf::BPF_JSLE), in make_instruction_map()
88 entry("exit", NoOperand, ebpf::EXIT); in make_instruction_map()
89 entry("ja", JumpUnconditional, ebpf::JA); in make_instruction_map()
90 entry("call", Call, ebpf::CALL); in make_instruction_map()
91 entry("lddw", LoadImm, ebpf::LD_DW_IMM); in make_instruction_map()
94 entry("neg", AluUnary, ebpf::NEG64); in make_instruction_map()
95 entry("neg32", AluUnary, ebpf::NEG32); in make_instruction_map()
96 entry("neg64", AluUnary, ebpf::NEG64); in make_instruction_map()
100 entry(name, AluBinary, ebpf::BPF_ALU64 | opc); in make_instruction_map()
101 entry(&format!("{name}32"), AluBinary, ebpf::BPF_ALU | opc); in make_instruction_map()
102 entry(&format!("{name}64"), AluBinary, ebpf::BPF_ALU64 | opc); in make_instruction_map()
110 ebpf::BPF_ABS | ebpf::BPF_LD | size, in make_instruction_map()
115 ebpf::BPF_IND | ebpf::BPF_LD | size, in make_instruction_map()
120 ebpf::BPF_MEM | ebpf::BPF_LDX | size, in make_instruction_map()
125 ebpf::BPF_MEM | ebpf::BPF_ST | size, in make_instruction_map()
130 ebpf::BPF_MEM | ebpf::BPF_STX | size, in make_instruction_map()
136 entry(name, JumpConditional, ebpf::BPF_JMP | condition); in make_instruction_map()
140 ebpf::BPF_JMP32 | condition, in make_instruction_map()
146 entry(&format!("be{size}"), Endian(size), ebpf::BE); in make_instruction_map()
147 entry(&format!("le{size}"), Endian(size), ebpf::LE); in make_instruction_map()
190 (AluBinary, Register(dst), Register(src), Nil) => insn(opc | ebpf::BPF_X, dst, src, 0, 0), in encode()
191 (AluBinary, Register(dst), Integer(imm), Nil) => insn(opc | ebpf::BPF_K, dst, 0, 0, imm), in encode()
201 insn(opc | ebpf::BPF_X, dst, src, off, 0) in encode()
204 insn(opc | ebpf::BPF_K, dst, 0, off, imm) in encode()