polkavm_common::programTrait ParsingVisitor
Source pub trait ParsingVisitor {
type ReturnTy;
Show 141 methods
// Required methods
fn trap(&mut self, offset: u32, args_length: u32) -> Self::ReturnTy;
fn fallthrough(&mut self, offset: u32, args_length: u32) -> Self::ReturnTy;
fn jump_indirect(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn load_imm(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn load_u8(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn load_i8(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn load_u16(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn load_i16(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn load_i32(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn load_u32(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn load_u64(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn store_u8(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn store_u16(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn store_u32(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn store_u64(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn load_imm_and_jump(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn branch_eq_imm(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn branch_not_eq_imm(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn branch_less_unsigned_imm(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn branch_less_signed_imm(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn branch_greater_or_equal_unsigned_imm(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn branch_greater_or_equal_signed_imm(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn branch_less_or_equal_signed_imm(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn branch_less_or_equal_unsigned_imm(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn branch_greater_signed_imm(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn branch_greater_unsigned_imm(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn store_imm_indirect_u8(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn store_imm_indirect_u16(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn store_imm_indirect_u32(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn store_imm_indirect_u64(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn store_indirect_u8(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn store_indirect_u16(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn store_indirect_u32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn store_indirect_u64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn load_indirect_u8(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn load_indirect_i8(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn load_indirect_u16(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn load_indirect_i16(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn load_indirect_i32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn load_indirect_u32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn load_indirect_u64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn add_imm_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn add_imm_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn and_imm(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn xor_imm(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn or_imm(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn mul_imm_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn mul_imm_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn set_less_than_unsigned_imm(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn set_less_than_signed_imm(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn shift_logical_left_imm_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn shift_logical_left_imm_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn shift_logical_right_imm_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn shift_logical_right_imm_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn shift_arithmetic_right_imm_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn shift_arithmetic_right_imm_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn negate_and_add_imm_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn negate_and_add_imm_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn set_greater_than_unsigned_imm(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn set_greater_than_signed_imm(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn shift_logical_right_imm_alt_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn shift_logical_right_imm_alt_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn shift_arithmetic_right_imm_alt_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn shift_arithmetic_right_imm_alt_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn shift_logical_left_imm_alt_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn shift_logical_left_imm_alt_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn cmov_if_zero_imm(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn cmov_if_not_zero_imm(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn rotate_right_32_imm(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn rotate_right_32_imm_alt(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn rotate_right_64_imm(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn rotate_right_64_imm_alt(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn branch_eq(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn branch_not_eq(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn branch_less_unsigned(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn branch_less_signed(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn branch_greater_or_equal_unsigned(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn branch_greater_or_equal_signed(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm: u32,
) -> Self::ReturnTy;
fn add_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn add_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn sub_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn sub_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn and(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn xor(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn or(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn mul_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn mul_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn mul_upper_signed_signed(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn mul_upper_unsigned_unsigned(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn mul_upper_signed_unsigned(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn set_less_than_unsigned(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn set_less_than_signed(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn shift_logical_left_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn shift_logical_left_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn shift_logical_right_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn shift_logical_right_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn shift_arithmetic_right_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn shift_arithmetic_right_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn div_unsigned_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn div_unsigned_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn div_signed_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn div_signed_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn rem_unsigned_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn rem_unsigned_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn rem_signed_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn rem_signed_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn cmov_if_zero(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn cmov_if_not_zero(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn and_inverted(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn or_inverted(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn xnor(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn maximum(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn maximum_unsigned(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn minimum(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn minimum_unsigned(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn rotate_left_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn rotate_left_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn rotate_right_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn rotate_right_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
reg3: RawReg,
) -> Self::ReturnTy;
fn jump(
&mut self,
offset: u32,
args_length: u32,
imm: u32,
) -> Self::ReturnTy;
fn ecalli(
&mut self,
offset: u32,
args_length: u32,
imm: u32,
) -> Self::ReturnTy;
fn store_imm_u8(
&mut self,
offset: u32,
args_length: u32,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn store_imm_u16(
&mut self,
offset: u32,
args_length: u32,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn store_imm_u32(
&mut self,
offset: u32,
args_length: u32,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn store_imm_u64(
&mut self,
offset: u32,
args_length: u32,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn move_reg(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
) -> Self::ReturnTy;
fn sbrk(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
) -> Self::ReturnTy;
fn count_leading_zero_bits_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
) -> Self::ReturnTy;
fn count_leading_zero_bits_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
) -> Self::ReturnTy;
fn count_trailing_zero_bits_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
) -> Self::ReturnTy;
fn count_trailing_zero_bits_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
) -> Self::ReturnTy;
fn count_set_bits_32(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
) -> Self::ReturnTy;
fn count_set_bits_64(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
) -> Self::ReturnTy;
fn sign_extend_8(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
) -> Self::ReturnTy;
fn sign_extend_16(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
) -> Self::ReturnTy;
fn zero_extend_16(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
) -> Self::ReturnTy;
fn or_combine_byte(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
) -> Self::ReturnTy;
fn reverse_byte(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
) -> Self::ReturnTy;
fn load_imm_and_jump_indirect(
&mut self,
offset: u32,
args_length: u32,
reg1: RawReg,
reg2: RawReg,
imm1: u32,
imm2: u32,
) -> Self::ReturnTy;
fn load_imm64(
&mut self,
offset: u32,
args_length: u32,
reg: RawReg,
imm: u64,
) -> Self::ReturnTy;
fn invalid(&mut self, offset: u32, args_length: u32) -> Self::ReturnTy;
}