[][src]Enum peepmatic_runtime::operator::Operator

#[repr(u32)]pub enum Operator {
    AdjustSpDown,
    AdjustSpDownImm,
    Band,
    BandImm,
    Bconst,
    Bint,
    Bor,
    BorImm,
    Brnz,
    Brz,
    Bxor,
    BxorImm,
    Iadd,
    IaddImm,
    Icmp,
    IcmpImm,
    Iconst,
    Ifcmp,
    IfcmpImm,
    Imul,
    ImulImm,
    Ireduce,
    IrsubImm,
    Ishl,
    IshlImm,
    Isub,
    Rotl,
    RotlImm,
    Rotr,
    RotrImm,
    Sdiv,
    SdivImm,
    Select,
    Sextend,
    Srem,
    SremImm,
    Sshr,
    SshrImm,
    Trapnz,
    Trapz,
    Udiv,
    UdivImm,
    Uextend,
    Urem,
    UremImm,
    Ushr,
    UshrImm,
}

An operator.

These are a subset of Cranelift IR's operators.

Caveats for Branching and Trapping Operators

Branching operators are not fully modeled: we do not represent their label and jump arguments. It is up to the interpreter doing the instruction replacement to recognize when we are replacing one branch with another, and copy over the extra information.

Affected operations: brz, brnz, trapz, trapnz.

Variants

AdjustSpDown

adjust_sp_down

AdjustSpDownImm

adjust_sp_down_imm

Band

band

BandImm

band_imm

Bconst

bconst

Bint

bint

Bor

bor

BorImm

bor_imm

Brnz

brnz

Brz

brz

Bxor

bxor

BxorImm

bxor_imm

Iadd

iadd

IaddImm

iadd_imm

Icmp

icmp

IcmpImm

icmp_imm

Iconst

iconst

Ifcmp

ifcmp

IfcmpImm

ifcmp_imm

Imul

imul

ImulImm

imul_imm

Ireduce

ireduce

IrsubImm

irsub_imm

Ishl

ishl

IshlImm

ishl_imm

Isub

isub

Rotl

rotl

RotlImm

rotl_imm

Rotr

rotr

RotrImm

rotr_imm

Sdiv

sdiv

SdivImm

sdiv_imm

Select

select

Sextend

sextend

Srem

srem

SremImm

srem_imm

Sshr

sshr

SshrImm

sshr_imm

Trapnz

trapnz

Trapz

trapz

Udiv

udiv

UdivImm

udiv_imm

Uextend

uextend

Urem

urem

UremImm

urem_imm

Ushr

ushr

UshrImm

ushr_imm

Implementations

impl Operator[src]

pub fn immediates_arity(&self) -> u8[src]

Get the number of immediates that this operator has.

pub fn params_arity(&self) -> u8[src]

Get the number of parameters that this operator takes.

pub const fn num_operators() -> usize[src]

Get the total number of different operators.

Trait Implementations

impl Clone for Operator[src]

impl Copy for Operator[src]

impl Debug for Operator[src]

impl<'de> Deserialize<'de> for Operator[src]

impl Display for Operator[src]

impl Eq for Operator[src]

impl Hash for Operator[src]

impl PartialEq<Operator> for Operator[src]

impl Serialize for Operator[src]

impl StructuralEq for Operator[src]

impl StructuralPartialEq for Operator[src]

impl TryFrom<u32> for Operator[src]

type Error = &'static str

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.