llvm-native-core 0.1.15

LLVM-native core semantic engine — IR, CodeGen, X86 MC, Clang frontend pipeline
//! BPF / eBPF Backend
//!
//! A compact backend for the Berkeley Packet Filter virtual machine (BPF64).
//! Supports the full eBPF instruction set as used by the Linux kernel, with
//! 64-bit and 32-bit ALU operations, branching, atomic operations, and
//! endian conversion.
//!
//! ## Sub-modules
//!
//! - `bpf_instr_info` — BPF instruction set definitions (opcodes, mnemonics).
//! - `bpf_isel` — BPF instruction selection from LLVM IR.
//! - `bpf_asm_printer` — BPF assembly text format printer.
//! - `bpf_target_machine` — BPF target machine description.
//! - `bpf_mc_encoder` — BPF instruction encoding (8-byte fixed-width).
//!
//! ## Architecture
//!
//! ```text
//! LLVM IR → BpfISel → BpfMCEncoder → BPF bytecode (8-byte insns)
//!                      BpfAsmPrinter → BPF assembly text
//! ```
//!
//! BPF instruction format (64 bits):
//! `opcode:8 | dst_reg:4 | src_reg:4 | offset:16 | immediate:32`
//!
//! Clean-room implementation from the Linux kernel BPF documentation
//! (Documentation/bpf/instruction-set.rst), the eBPF ISA specification,
//! and IETF draft-thaler-bpf-isa. No LLVM C++ source consulted.

pub mod bpf_asm_printer;
pub mod bpf_instr_info;
pub mod bpf_isel;
pub mod bpf_mc_encoder;
pub mod bpf_target_machine;
pub mod bpf_x86_bridge;

// Re-export key types for convenience.
pub use bpf_asm_printer::BpfAsmPrinter;
pub use bpf_instr_info::{BpfInstrInfo, BpfOpcode};
pub use bpf_isel::BpfISel;
pub use bpf_mc_encoder::BpfMCEncoder;
pub use bpf_target_machine::BpfTargetMachine;