Home
last modified time | relevance | path

Searched refs:opc (Results 1 – 11 of 11) sorted by relevance

/DragonOS/kernel/crates/rbpf/src/
H A Dassembler.rs83 let mut entry = |name: &str, inst_type: InstructionType, opc: u8| { in make_instruction_map()
84 result.insert(name.to_string(), (inst_type, opc)) in make_instruction_map()
99 for &(name, opc) in &alu_binary_ops { 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()
154 fn insn(opc: u8, dst: i64, src: i64, off: i64, imm: i64) -> Result<Insn, String> { in insn()
168 opc, in insn()
187 fn encode(inst_type: InstructionType, opc: u8, operands: &[Operand]) -> Result<Insn, String> { in encode()
190 (AluBinary, Register(dst), Register(src), Nil) => insn(opc | ebpf::BPF_X, dst, src, 0, 0), in encode()
[all …]
H A Dverifier.rs48 let last_opc = ebpf::get_insn(prog, (prog.len() / ebpf::INSN_SIZE) - 1).opc; in check_prog_len()
69 if next_insn.opc != 0 { in check_load_dw()
90 if dst_insn.opc == 0 { in check_jmp_offset()
121 match insn.opc { in check()
370 insn.opc in check()
H A Debpf.rs445 pub opc: u8, field
478 self.opc,
510 self.opc, in to_vec()
566 opc: prog[INSN_SIZE * idx], in get_insn()
H A Djit.rs383 opc: u8, in emit_muldivmod()
388 let mul = (opc & ebpf::BPF_ALU_OP_MASK) == (ebpf::MUL32_IMM & ebpf::BPF_ALU_OP_MASK); in emit_muldivmod()
389 let div = (opc & ebpf::BPF_ALU_OP_MASK) == (ebpf::DIV32_IMM & ebpf::BPF_ALU_OP_MASK); in emit_muldivmod()
390 let modrm = (opc & ebpf::BPF_ALU_OP_MASK) == (ebpf::MOD32_IMM & ebpf::BPF_ALU_OP_MASK); in emit_muldivmod()
391 let is64 = (opc & ebpf::BPF_CLS_MASK) == ebpf::BPF_ALU64; in emit_muldivmod()
392 let is_reg = (opc & ebpf::BPF_X) == ebpf::BPF_X; in emit_muldivmod()
546 match insn.opc { in jit_compile()
622 self.emit_muldivmod(mem, insn_ptr as u16, insn.opc, src, dst, insn.imm) in jit_compile()
683 self.emit_muldivmod(mem, insn_ptr as u16, insn.opc, src, dst, insn.imm) in jit_compile()
923 insn.opc in jit_compile()
H A Dcranelift.rs269 match insn.opc { in translate_program()
282 let ty = match insn.opc { in translate_program()
298 let is_ind = (insn.opc & BPF_IND) != 0; in translate_program()
328 let ty = match insn.opc { in translate_program()
357 let ty = match insn.opc { in translate_program()
364 let is_imm = match insn.opc { in translate_program()
587 let should_swap = match insn.opc { in translate_program()
869 let is_reg = (insn.opc & BPF_X) != 0; in translate_program()
870 let is_32 = (insn.opc & BPF_JMP32) != 0; in translate_program()
871 let intcc = match insn.opc { in translate_program()
[all …]
H A Ddisassembler.rs135 pub opc: u8, field
222 match insn.opc { in to_insn_vec()
742 insn.opc, insn_ptr in to_insn_vec()
748 opc: insn.opc, in to_insn_vec()
H A Dinsn_builder.rs185 opc: 0x00, in mov_internal()
200 opc: 0x00, in swap_bytes()
237 opc: 0x00, in load_internal()
263 opc: 0x00, in store_internal()
284 opc: 0x00, in jump_conditional()
298 opc: 0x00, in call()
312 opc: 0x00, in exit()
H A Dinterpreter.rs138 match insn.opc { in execute_program()
/DragonOS/kernel/crates/rbpf/examples/
H A Dto_json.rs31 "opc" => format!("{:#x}", insn.opc), // => insn.opc, in to_json()
/DragonOS/kernel/src/bpf/prog/
H A Dverifier.rs46 if insn.opc == ebpf::LD_DW_IMM { in relocation()
/DragonOS/kernel/crates/rbpf/tests/
H A Dassembler.rs16 fn insn(opc: u8, dst: u8, src: u8, off: i16, imm: i32) -> ebpf::Insn { in insn()
18 opc, in insn()