Enum polkavm_common::program::Instruction
source · pub enum Instruction {
Show 88 variants
trap,
fallthrough,
call(Reg, u32),
jump_indirect(Reg, u32),
load_imm(Reg, u32),
load_u8(Reg, u32),
load_i8(Reg, u32),
load_u16(Reg, u32),
load_i16(Reg, u32),
load_u32(Reg, u32),
store_u8(Reg, u32),
store_u16(Reg, u32),
store_u32(Reg, u32),
branch_eq_imm(Reg, u32, u32),
branch_not_eq_imm(Reg, u32, u32),
branch_less_unsigned_imm(Reg, u32, u32),
branch_less_signed_imm(Reg, u32, u32),
branch_greater_or_equal_unsigned_imm(Reg, u32, u32),
branch_greater_or_equal_signed_imm(Reg, u32, u32),
branch_less_or_equal_signed_imm(Reg, u32, u32),
branch_less_or_equal_unsigned_imm(Reg, u32, u32),
branch_greater_signed_imm(Reg, u32, u32),
branch_greater_unsigned_imm(Reg, u32, u32),
store_imm_indirect_u8(Reg, u32, u32),
store_imm_indirect_u16(Reg, u32, u32),
store_imm_indirect_u32(Reg, u32, u32),
store_indirect_u8(Reg, Reg, u32),
store_indirect_u16(Reg, Reg, u32),
store_indirect_u32(Reg, Reg, u32),
load_indirect_u8(Reg, Reg, u32),
load_indirect_i8(Reg, Reg, u32),
load_indirect_u16(Reg, Reg, u32),
load_indirect_i16(Reg, Reg, u32),
load_indirect_u32(Reg, Reg, u32),
call_indirect(Reg, Reg, u32),
add_imm(Reg, Reg, u32),
and_imm(Reg, Reg, u32),
xor_imm(Reg, Reg, u32),
or_imm(Reg, Reg, u32),
mul_imm(Reg, Reg, u32),
mul_upper_signed_signed_imm(Reg, Reg, u32),
mul_upper_unsigned_unsigned_imm(Reg, Reg, u32),
set_less_than_unsigned_imm(Reg, Reg, u32),
set_less_than_signed_imm(Reg, Reg, u32),
shift_logical_left_imm(Reg, Reg, u32),
shift_logical_right_imm(Reg, Reg, u32),
shift_arithmetic_right_imm(Reg, Reg, u32),
negate_and_add_imm(Reg, Reg, u32),
set_greater_than_unsigned_imm(Reg, Reg, u32),
set_greater_than_signed_imm(Reg, Reg, u32),
shift_logical_right_imm_alt(Reg, Reg, u32),
shift_arithmetic_right_imm_alt(Reg, Reg, u32),
shift_logical_left_imm_alt(Reg, Reg, u32),
branch_eq(Reg, Reg, u32),
branch_not_eq(Reg, Reg, u32),
branch_less_unsigned(Reg, Reg, u32),
branch_less_signed(Reg, Reg, u32),
branch_greater_or_equal_unsigned(Reg, Reg, u32),
branch_greater_or_equal_signed(Reg, Reg, u32),
cmov_if_zero_imm(Reg, Reg, u32),
cmov_if_not_zero_imm(Reg, Reg, u32),
add(Reg, Reg, Reg),
sub(Reg, Reg, Reg),
and(Reg, Reg, Reg),
xor(Reg, Reg, Reg),
or(Reg, Reg, Reg),
mul(Reg, Reg, Reg),
mul_upper_signed_signed(Reg, Reg, Reg),
mul_upper_unsigned_unsigned(Reg, Reg, Reg),
mul_upper_signed_unsigned(Reg, Reg, Reg),
set_less_than_unsigned(Reg, Reg, Reg),
set_less_than_signed(Reg, Reg, Reg),
shift_logical_left(Reg, Reg, Reg),
shift_logical_right(Reg, Reg, Reg),
shift_arithmetic_right(Reg, Reg, Reg),
div_unsigned(Reg, Reg, Reg),
div_signed(Reg, Reg, Reg),
rem_unsigned(Reg, Reg, Reg),
rem_signed(Reg, Reg, Reg),
cmov_if_zero(Reg, Reg, Reg),
cmov_if_not_zero(Reg, Reg, Reg),
jump(u32),
ecalli(u32),
store_imm_u8(u32, u32),
store_imm_u16(u32, u32),
store_imm_u32(u32, u32),
move_reg(Reg, Reg),
sbrk(Reg, Reg),
}
Variants§
trap
fallthrough
call(Reg, u32)
jump_indirect(Reg, u32)
load_imm(Reg, u32)
load_u8(Reg, u32)
load_i8(Reg, u32)
load_u16(Reg, u32)
load_i16(Reg, u32)
load_u32(Reg, u32)
store_u8(Reg, u32)
store_u16(Reg, u32)
store_u32(Reg, u32)
branch_eq_imm(Reg, u32, u32)
branch_not_eq_imm(Reg, u32, u32)
branch_less_unsigned_imm(Reg, u32, u32)
branch_less_signed_imm(Reg, u32, u32)
branch_greater_or_equal_unsigned_imm(Reg, u32, u32)
branch_greater_or_equal_signed_imm(Reg, u32, u32)
branch_less_or_equal_signed_imm(Reg, u32, u32)
branch_less_or_equal_unsigned_imm(Reg, u32, u32)
branch_greater_signed_imm(Reg, u32, u32)
branch_greater_unsigned_imm(Reg, u32, u32)
store_imm_indirect_u8(Reg, u32, u32)
store_imm_indirect_u16(Reg, u32, u32)
store_imm_indirect_u32(Reg, u32, u32)
store_indirect_u8(Reg, Reg, u32)
store_indirect_u16(Reg, Reg, u32)
store_indirect_u32(Reg, Reg, u32)
load_indirect_u8(Reg, Reg, u32)
load_indirect_i8(Reg, Reg, u32)
load_indirect_u16(Reg, Reg, u32)
load_indirect_i16(Reg, Reg, u32)
load_indirect_u32(Reg, Reg, u32)
call_indirect(Reg, Reg, u32)
add_imm(Reg, Reg, u32)
and_imm(Reg, Reg, u32)
xor_imm(Reg, Reg, u32)
or_imm(Reg, Reg, u32)
mul_imm(Reg, Reg, u32)
mul_upper_signed_signed_imm(Reg, Reg, u32)
mul_upper_unsigned_unsigned_imm(Reg, Reg, u32)
set_less_than_unsigned_imm(Reg, Reg, u32)
set_less_than_signed_imm(Reg, Reg, u32)
shift_logical_left_imm(Reg, Reg, u32)
shift_logical_right_imm(Reg, Reg, u32)
shift_arithmetic_right_imm(Reg, Reg, u32)
negate_and_add_imm(Reg, Reg, u32)
set_greater_than_unsigned_imm(Reg, Reg, u32)
set_greater_than_signed_imm(Reg, Reg, u32)
shift_logical_right_imm_alt(Reg, Reg, u32)
shift_arithmetic_right_imm_alt(Reg, Reg, u32)
shift_logical_left_imm_alt(Reg, Reg, u32)
branch_eq(Reg, Reg, u32)
branch_not_eq(Reg, Reg, u32)
branch_less_unsigned(Reg, Reg, u32)
branch_less_signed(Reg, Reg, u32)
branch_greater_or_equal_unsigned(Reg, Reg, u32)
branch_greater_or_equal_signed(Reg, Reg, u32)
cmov_if_zero_imm(Reg, Reg, u32)
cmov_if_not_zero_imm(Reg, Reg, u32)
add(Reg, Reg, Reg)
sub(Reg, Reg, Reg)
and(Reg, Reg, Reg)
xor(Reg, Reg, Reg)
or(Reg, Reg, Reg)
mul(Reg, Reg, Reg)
mul_upper_signed_signed(Reg, Reg, Reg)
mul_upper_unsigned_unsigned(Reg, Reg, Reg)
mul_upper_signed_unsigned(Reg, Reg, Reg)
set_less_than_unsigned(Reg, Reg, Reg)
set_less_than_signed(Reg, Reg, Reg)
shift_logical_left(Reg, Reg, Reg)
shift_logical_right(Reg, Reg, Reg)
shift_arithmetic_right(Reg, Reg, Reg)
div_unsigned(Reg, Reg, Reg)
div_signed(Reg, Reg, Reg)
rem_unsigned(Reg, Reg, Reg)
rem_signed(Reg, Reg, Reg)
cmov_if_zero(Reg, Reg, Reg)
cmov_if_not_zero(Reg, Reg, Reg)
jump(u32)
ecalli(u32)
store_imm_u8(u32, u32)
store_imm_u16(u32, u32)
store_imm_u32(u32, u32)
move_reg(Reg, Reg)
sbrk(Reg, Reg)
Implementations§
source§impl Instruction
impl Instruction
source§impl Instruction
impl Instruction
pub fn deserialize(input: &[u8]) -> Option<(usize, Self)>
Trait Implementations§
source§impl Clone for Instruction
impl Clone for Instruction
source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
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 Instruction
impl Debug for Instruction
source§impl Display for Instruction
impl Display for Instruction
source§impl PartialEq for Instruction
impl PartialEq for Instruction
source§fn eq(&self, other: &Instruction) -> bool
fn eq(&self, other: &Instruction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for Instruction
impl Eq for Instruction
impl StructuralPartialEq for Instruction
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
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: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)