#[repr(u8)]
pub enum Opcode {
Show 88 variants trap = 0, fallthrough = 17, call = 6, jump_indirect = 19, load_imm = 4, load_u8 = 60, load_i8 = 74, load_u16 = 76, load_i16 = 66, load_u32 = 10, store_u8 = 71, store_u16 = 69, store_u32 = 22, branch_eq_imm = 7, branch_not_eq_imm = 15, branch_less_unsigned_imm = 44, branch_less_signed_imm = 32, branch_greater_or_equal_unsigned_imm = 52, branch_greater_or_equal_signed_imm = 45, branch_less_or_equal_signed_imm = 46, branch_less_or_equal_unsigned_imm = 59, branch_greater_signed_imm = 53, branch_greater_unsigned_imm = 50, store_imm_indirect_u8 = 26, store_imm_indirect_u16 = 54, store_imm_indirect_u32 = 13, store_indirect_u8 = 16, store_indirect_u16 = 29, store_indirect_u32 = 3, load_indirect_u8 = 11, load_indirect_i8 = 21, load_indirect_u16 = 37, load_indirect_i16 = 33, load_indirect_u32 = 1, call_indirect = 42, add_imm = 2, and_imm = 18, xor_imm = 31, or_imm = 49, mul_imm = 35, mul_upper_signed_signed_imm = 65, mul_upper_unsigned_unsigned_imm = 63, set_less_than_unsigned_imm = 27, set_less_than_signed_imm = 56, shift_logical_left_imm = 9, shift_logical_right_imm = 14, shift_arithmetic_right_imm = 25, negate_and_add_imm = 40, set_greater_than_unsigned_imm = 39, set_greater_than_signed_imm = 61, shift_logical_right_imm_alt = 72, shift_arithmetic_right_imm_alt = 80, shift_logical_left_imm_alt = 75, branch_eq = 24, branch_not_eq = 30, branch_less_unsigned = 47, branch_less_signed = 48, branch_greater_or_equal_unsigned = 41, branch_greater_or_equal_signed = 43, cmov_if_zero_imm = 85, cmov_if_not_zero_imm = 86, add = 8, sub = 20, and = 23, xor = 28, or = 12, mul = 34, mul_upper_signed_signed = 67, mul_upper_unsigned_unsigned = 57, mul_upper_signed_unsigned = 81, set_less_than_unsigned = 36, set_less_than_signed = 58, shift_logical_left = 55, shift_logical_right = 51, shift_arithmetic_right = 77, div_unsigned = 68, div_signed = 64, rem_unsigned = 73, rem_signed = 70, cmov_if_zero = 83, cmov_if_not_zero = 84, jump = 5, ecalli = 78, store_imm_u8 = 62, store_imm_u16 = 79, store_imm_u32 = 38, move_reg = 82, sbrk = 87,
}

Variants§

§

trap = 0

§

fallthrough = 17

§

call = 6

§

jump_indirect = 19

§

load_imm = 4

§

load_u8 = 60

§

load_i8 = 74

§

load_u16 = 76

§

load_i16 = 66

§

load_u32 = 10

§

store_u8 = 71

§

store_u16 = 69

§

store_u32 = 22

§

branch_eq_imm = 7

§

branch_not_eq_imm = 15

§

branch_less_unsigned_imm = 44

§

branch_less_signed_imm = 32

§

branch_greater_or_equal_unsigned_imm = 52

§

branch_greater_or_equal_signed_imm = 45

§

branch_less_or_equal_signed_imm = 46

§

branch_less_or_equal_unsigned_imm = 59

§

branch_greater_signed_imm = 53

§

branch_greater_unsigned_imm = 50

§

store_imm_indirect_u8 = 26

§

store_imm_indirect_u16 = 54

§

store_imm_indirect_u32 = 13

§

store_indirect_u8 = 16

§

store_indirect_u16 = 29

§

store_indirect_u32 = 3

§

load_indirect_u8 = 11

§

load_indirect_i8 = 21

§

load_indirect_u16 = 37

§

load_indirect_i16 = 33

§

load_indirect_u32 = 1

§

call_indirect = 42

§

add_imm = 2

§

and_imm = 18

§

xor_imm = 31

§

or_imm = 49

§

mul_imm = 35

§

mul_upper_signed_signed_imm = 65

§

mul_upper_unsigned_unsigned_imm = 63

§

set_less_than_unsigned_imm = 27

§

set_less_than_signed_imm = 56

§

shift_logical_left_imm = 9

§

shift_logical_right_imm = 14

§

shift_arithmetic_right_imm = 25

§

negate_and_add_imm = 40

§

set_greater_than_unsigned_imm = 39

§

set_greater_than_signed_imm = 61

§

shift_logical_right_imm_alt = 72

§

shift_arithmetic_right_imm_alt = 80

§

shift_logical_left_imm_alt = 75

§

branch_eq = 24

§

branch_not_eq = 30

§

branch_less_unsigned = 47

§

branch_less_signed = 48

§

branch_greater_or_equal_unsigned = 41

§

branch_greater_or_equal_signed = 43

§

cmov_if_zero_imm = 85

§

cmov_if_not_zero_imm = 86

§

add = 8

§

sub = 20

§

and = 23

§

xor = 28

§

or = 12

§

mul = 34

§

mul_upper_signed_signed = 67

§

mul_upper_unsigned_unsigned = 57

§

mul_upper_signed_unsigned = 81

§

set_less_than_unsigned = 36

§

set_less_than_signed = 58

§

shift_logical_left = 55

§

shift_logical_right = 51

§

shift_arithmetic_right = 77

§

div_unsigned = 68

§

div_signed = 64

§

rem_unsigned = 73

§

rem_signed = 70

§

cmov_if_zero = 83

§

cmov_if_not_zero = 84

§

jump = 5

§

ecalli = 78

§

store_imm_u8 = 62

§

store_imm_u16 = 79

§

store_imm_u32 = 38

§

move_reg = 82

§

sbrk = 87

Implementations§

Trait Implementations§

source§

impl Clone for Opcode

source§

fn clone(&self) -> Opcode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Opcode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Hash for Opcode

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Opcode

source§

fn eq(&self, other: &Opcode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Opcode

source§

impl Eq for Opcode

source§

impl StructuralPartialEq for Opcode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.