pub enum ComputeStep {
Show 29 variants
LoadRegister(u16),
PushConstant(i64),
Dereference {
size: MemoryAccessSize,
},
Add,
Sub,
Mul,
Div,
Mod,
And,
Or,
Xor,
Shl,
Shr,
Shra,
Not,
Neg,
Abs,
Dup,
Drop,
Swap,
Rot,
Pick(u8),
Eq,
Ne,
Lt,
Le,
Gt,
Ge,
If {
then_branch: Vec<ComputeStep>,
else_branch: Vec<ComputeStep>,
},
}Expand description
Computation step for LLVM IR generation These map directly to LLVM IR operations that can be generated in eBPF
Variants§
LoadRegister(u16)
Load register value from pt_regs
PushConstant(i64)
Push constant
Dereference
Memory dereference via bpf_probe_read_user
Fields
§
size: MemoryAccessSizeAdd
Binary arithmetic operations (pop 2, push 1)
Sub
Mul
Div
Mod
And
Binary bitwise operations
Or
Xor
Shl
Shr
Shra
Not
Unary operations
Neg
Abs
Dup
Stack manipulation
Drop
Swap
Rot
Pick(u8)
Eq
Comparison operations (pop 2, push bool)
Ne
Lt
Le
Gt
Ge
If
Control flow (simplified for eBPF)
Trait Implementations§
Source§impl Clone for ComputeStep
impl Clone for ComputeStep
Source§fn clone(&self) -> ComputeStep
fn clone(&self) -> ComputeStep
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComputeStep
impl Debug for ComputeStep
Source§impl Display for ComputeStep
impl Display for ComputeStep
Source§impl PartialEq for ComputeStep
impl PartialEq for ComputeStep
impl StructuralPartialEq for ComputeStep
Auto Trait Implementations§
impl Freeze for ComputeStep
impl RefUnwindSafe for ComputeStep
impl Send for ComputeStep
impl Sync for ComputeStep
impl Unpin for ComputeStep
impl UnwindSafe for ComputeStep
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more