Enum solana_rbpf::program::SBPFVersion
source · pub enum SBPFVersion {
V1,
V2,
V3,
}
Expand description
Defines a set of sbpf_version of an executable
Variants§
Implementations§
source§impl SBPFVersion
impl SBPFVersion
sourcepub fn enable_neg(&self) -> bool
pub fn enable_neg(&self) -> bool
Enable the negation instruction
sourcepub fn swap_sub_reg_imm_operands(&self) -> bool
pub fn swap_sub_reg_imm_operands(&self) -> bool
Swaps the reg and imm operands of the subtraction instruction
sourcepub fn enable_lddw(&self) -> bool
pub fn enable_lddw(&self) -> bool
Enable the only two slots long instruction: LD_DW_IMM
sourcepub fn enable_pqr(&self) -> bool
pub fn enable_pqr(&self) -> bool
Enable the BPF_PQR instruction class
sourcepub fn callx_uses_src_reg(&self) -> bool
pub fn callx_uses_src_reg(&self) -> bool
Use src reg instead of imm in callx
sourcepub fn reject_rodata_stack_overlap(&self) -> bool
pub fn reject_rodata_stack_overlap(&self) -> bool
Ensure that rodata sections don’t exceed their maximum allowed size and overlap with the stack
sourcepub fn enable_elf_vaddr(&self) -> bool
pub fn enable_elf_vaddr(&self) -> bool
Allow sh_addr != sh_offset in elf sections. Used in V2 to align section vaddrs to MM_PROGRAM_START.
sourcepub fn dynamic_stack_frames(&self) -> bool
pub fn dynamic_stack_frames(&self) -> bool
Use dynamic stack frame sizes
sourcepub fn static_syscalls(&self) -> bool
pub fn static_syscalls(&self) -> bool
Support syscalls via pseudo calls (insn.src = 0)
Trait Implementations§
source§impl Clone for SBPFVersion
impl Clone for SBPFVersion
source§fn clone(&self) -> SBPFVersion
fn clone(&self) -> SBPFVersion
Returns a copy 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 SBPFVersion
impl Debug for SBPFVersion
source§impl PartialEq for SBPFVersion
impl PartialEq for SBPFVersion
source§fn eq(&self, other: &SBPFVersion) -> bool
fn eq(&self, other: &SBPFVersion) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for SBPFVersion
impl StructuralPartialEq for SBPFVersion
Auto Trait Implementations§
impl Freeze for SBPFVersion
impl RefUnwindSafe for SBPFVersion
impl Send for SBPFVersion
impl Sync for SBPFVersion
impl Unpin for SBPFVersion
impl UnwindSafe for SBPFVersion
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> 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