Struct solana_rbpf::disassembler::HlInsn [−][src]
High-level representation of an eBPF instruction.
In addition to standard operation code and various operand, this struct has the following properties:
- It stores a name, corresponding to a mnemonic for the operation code.
- It also stores a description, which is a mnemonic for the full instruction, using the actual values of the relevant operands, and that can be used for disassembling the eBPF program for example.
- Immediate values are stored in an
i64
instead of a traditional i32, in order to merge the two parts of (otherwise double-length)LD_DW_IMM
instructions.
See https://www.kernel.org/doc/Documentation/networking/filter.txt for the Linux kernel documentation about eBPF, or https://github.com/iovisor/bpf-docs/blob/master/eBPF.md for a more concise version.
Fields
ptr: usize
Instruction pointer.
opc: u8
Operation code.
name: String
Name (mnemonic). This name is not canon.
desc: String
Description of the instruction. This is not canon.
dst: u8
Destination register operand.
src: u8
Source register operand.
off: i16
Offset operand.
imm: i64
Immediate value operand. For LD_DW_IMM
instructions, contains the whole value merged from
the two 8-bytes parts of the instruction.
Trait Implementations
impl Debug for HlInsn
[src]
impl PartialEq<HlInsn> for HlInsn
[src]
impl StructuralPartialEq for HlInsn
[src]
Auto Trait Implementations
impl RefUnwindSafe for HlInsn
impl Send for HlInsn
impl Sync for HlInsn
impl Unpin for HlInsn
impl UnwindSafe for HlInsn
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,