Skip to main content

Opcode

Enum Opcode 

Source
#[repr(u8)]
pub enum Opcode {
Show 139 variants Trap = 0, Fallthrough = 1, Ecalli = 10, LoadImm64 = 20, StoreImmU8 = 30, StoreImmU16 = 31, StoreImmU32 = 32, StoreImmU64 = 33, Jump = 40, JumpInd = 50, LoadImm = 51, LoadU8 = 52, LoadI8 = 53, LoadU16 = 54, LoadI16 = 55, LoadU32 = 56, LoadI32 = 57, LoadU64 = 58, StoreU8 = 59, StoreU16 = 60, StoreU32 = 61, StoreU64 = 62, StoreImmIndU8 = 70, StoreImmIndU16 = 71, StoreImmIndU32 = 72, StoreImmIndU64 = 73, LoadImmJump = 80, BranchEqImm = 81, BranchNeImm = 82, BranchLtUImm = 83, BranchLeUImm = 84, BranchGeUImm = 85, BranchGtUImm = 86, BranchLtSImm = 87, BranchLeSImm = 88, BranchGeSImm = 89, BranchGtSImm = 90, MoveReg = 100, Sbrk = 101, CountSetBits64 = 102, CountSetBits32 = 103, LeadingZeroBits64 = 104, LeadingZeroBits32 = 105, TrailingZeroBits64 = 106, TrailingZeroBits32 = 107, SignExtend8 = 108, SignExtend16 = 109, ZeroExtend16 = 110, ReverseBytes = 111, StoreIndU8 = 120, StoreIndU16 = 121, StoreIndU32 = 122, StoreIndU64 = 123, LoadIndU8 = 124, LoadIndI8 = 125, LoadIndU16 = 126, LoadIndI16 = 127, LoadIndU32 = 128, LoadIndI32 = 129, LoadIndU64 = 130, AddImm32 = 131, AndImm = 132, XorImm = 133, OrImm = 134, MulImm32 = 135, SetLtUImm = 136, SetLtSImm = 137, ShloLImm32 = 138, ShloRImm32 = 139, SharRImm32 = 140, NegAddImm32 = 141, SetGtUImm = 142, SetGtSImm = 143, ShloLImmAlt32 = 144, ShloRImmAlt32 = 145, SharRImmAlt32 = 146, CmovIzImm = 147, CmovNzImm = 148, AddImm64 = 149, MulImm64 = 150, ShloLImm64 = 151, ShloRImm64 = 152, SharRImm64 = 153, NegAddImm64 = 154, ShloLImmAlt64 = 155, ShloRImmAlt64 = 156, SharRImmAlt64 = 157, RotRImm64 = 158, RotRImmAlt64 = 159, RotRImm32 = 160, RotRImmAlt32 = 161, BranchEq = 170, BranchNe = 171, BranchLtU = 172, BranchLtS = 173, BranchGeU = 174, BranchGeS = 175, LoadImmJumpInd = 180, Add32 = 190, Sub32 = 191, Mul32 = 192, DivU32 = 193, DivS32 = 194, RemU32 = 195, RemS32 = 196, ShloL32 = 197, ShloR32 = 198, SharR32 = 199, Add64 = 200, Sub64 = 201, Mul64 = 202, DivU64 = 203, DivS64 = 204, RemU64 = 205, RemS64 = 206, ShloL64 = 207, ShloR64 = 208, SharR64 = 209, And = 210, Xor = 211, Or = 212, MulUpperSS = 213, MulUpperUU = 214, MulUpperSU = 215, SetLtU = 216, SetLtS = 217, CmovIz = 218, CmovNz = 219, RotL64 = 220, RotL32 = 221, RotR64 = 222, RotR32 = 223, AndInv = 224, OrInv = 225, Xnor = 226, Max = 227, MaxU = 228, Min = 229, MinU = 230,
}

Variants§

§

Trap = 0

§

Fallthrough = 1

§

Ecalli = 10

§

LoadImm64 = 20

§

StoreImmU8 = 30

§

StoreImmU16 = 31

§

StoreImmU32 = 32

§

StoreImmU64 = 33

§

Jump = 40

§

JumpInd = 50

§

LoadImm = 51

§

LoadU8 = 52

§

LoadI8 = 53

§

LoadU16 = 54

§

LoadI16 = 55

§

LoadU32 = 56

§

LoadI32 = 57

§

LoadU64 = 58

§

StoreU8 = 59

§

StoreU16 = 60

§

StoreU32 = 61

§

StoreU64 = 62

§

StoreImmIndU8 = 70

§

StoreImmIndU16 = 71

§

StoreImmIndU32 = 72

§

StoreImmIndU64 = 73

§

LoadImmJump = 80

§

BranchEqImm = 81

§

BranchNeImm = 82

§

BranchLtUImm = 83

§

BranchLeUImm = 84

§

BranchGeUImm = 85

§

BranchGtUImm = 86

§

BranchLtSImm = 87

§

BranchLeSImm = 88

§

BranchGeSImm = 89

§

BranchGtSImm = 90

§

MoveReg = 100

§

Sbrk = 101

§

CountSetBits64 = 102

§

CountSetBits32 = 103

§

LeadingZeroBits64 = 104

§

LeadingZeroBits32 = 105

§

TrailingZeroBits64 = 106

§

TrailingZeroBits32 = 107

§

SignExtend8 = 108

§

SignExtend16 = 109

§

ZeroExtend16 = 110

§

ReverseBytes = 111

§

StoreIndU8 = 120

§

StoreIndU16 = 121

§

StoreIndU32 = 122

§

StoreIndU64 = 123

§

LoadIndU8 = 124

§

LoadIndI8 = 125

§

LoadIndU16 = 126

§

LoadIndI16 = 127

§

LoadIndU32 = 128

§

LoadIndI32 = 129

§

LoadIndU64 = 130

§

AddImm32 = 131

§

AndImm = 132

§

XorImm = 133

§

OrImm = 134

§

MulImm32 = 135

§

SetLtUImm = 136

§

SetLtSImm = 137

§

ShloLImm32 = 138

§

ShloRImm32 = 139

§

SharRImm32 = 140

§

NegAddImm32 = 141

§

SetGtUImm = 142

§

SetGtSImm = 143

§

ShloLImmAlt32 = 144

§

ShloRImmAlt32 = 145

§

SharRImmAlt32 = 146

§

CmovIzImm = 147

§

CmovNzImm = 148

§

AddImm64 = 149

§

MulImm64 = 150

§

ShloLImm64 = 151

§

ShloRImm64 = 152

§

SharRImm64 = 153

§

NegAddImm64 = 154

§

ShloLImmAlt64 = 155

§

ShloRImmAlt64 = 156

§

SharRImmAlt64 = 157

§

RotRImm64 = 158

§

RotRImmAlt64 = 159

§

RotRImm32 = 160

§

RotRImmAlt32 = 161

§

BranchEq = 170

§

BranchNe = 171

§

BranchLtU = 172

§

BranchLtS = 173

§

BranchGeU = 174

§

BranchGeS = 175

§

LoadImmJumpInd = 180

§

Add32 = 190

§

Sub32 = 191

§

Mul32 = 192

§

DivU32 = 193

§

DivS32 = 194

§

RemU32 = 195

§

RemS32 = 196

§

ShloL32 = 197

§

ShloR32 = 198

§

SharR32 = 199

§

Add64 = 200

§

Sub64 = 201

§

Mul64 = 202

§

DivU64 = 203

§

DivS64 = 204

§

RemU64 = 205

§

RemS64 = 206

§

ShloL64 = 207

§

ShloR64 = 208

§

SharR64 = 209

§

And = 210

§

Xor = 211

§

Or = 212

§

MulUpperSS = 213

§

MulUpperUU = 214

§

MulUpperSU = 215

§

SetLtU = 216

§

SetLtS = 217

§

CmovIz = 218

§

CmovNz = 219

§

RotL64 = 220

§

RotL32 = 221

§

RotR64 = 222

§

RotR32 = 223

§

AndInv = 224

§

OrInv = 225

§

Xnor = 226

§

Max = 227

§

MaxU = 228

§

Min = 229

§

MinU = 230

Implementations§

Source§

impl Opcode

Source

pub const fn from_u8(opcode: u8) -> Option<Self>

Source

pub const fn is_terminating(self) -> bool

Trait Implementations§

Source§

impl Clone for Opcode

Source§

fn clone(&self) -> Opcode

Returns a duplicate 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 PartialEq for Opcode

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<u8> for Opcode

Source§

type Error = ()

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

fn try_from(value: u8) -> Result<Self, Self::Error>

Performs the conversion.
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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more