CleverOpcode

Enum CleverOpcode 

Source
#[non_exhaustive]
pub enum CleverOpcode {
Show 248 variants Und0, Add { lock: bool, flags: bool, }, Sub { lock: bool, flags: bool, }, And { lock: bool, flags: bool, }, Or { lock: bool, flags: bool, }, Xor { lock: bool, flags: bool, }, Mul { ss: u16, flags: bool, }, Div { ss: u16, wide: bool, flags: bool, }, Mov, Lea, MovRD { r: CleverRegister, }, MovRS { r: CleverRegister, }, LeaRD { r: CleverRegister, }, Nop10 { any: u16, }, Nop11 { any: u16, }, Nop12 { any: u16, }, Nop13 { any: u16, }, Push, Pop, PushR { r: CleverRegister, }, PopR { r: CleverRegister, }, Stogpr, Stoar, Rstogpr, Rstoar, Pushgpr, Pushar, Popgpr, Popar, Movsx { flags: bool, }, Bswap { flags: bool, }, Movsif { flags: bool, }, Movxf { ss: u16, int: bool, flags: bool, }, Movfsi { flags: bool, }, Movfx { ss: u16, int: bool, flags: bool, }, Cvtf { flags: bool, }, Repbi { cc: ConditionCode, }, Repbc, Bcpy { ss: u16, }, Bsto { ss: u16, }, Bsca { ss: u16, }, Bcmp { ss: u16, }, Btst { ss: u16, }, Lsh { l: bool, f: bool, }, Rsh { l: bool, f: bool, }, Arsh { l: bool, f: bool, }, Lshc { l: bool, f: bool, }, Rshc { l: bool, f: bool, }, Lrot { l: bool, f: bool, }, Rrot { l: bool, f: bool, }, LshR { r: CleverRegister, }, RshR { r: CleverRegister, }, ArshR { r: CleverRegister, }, LshcR { r: CleverRegister, }, RshcR { r: CleverRegister, }, LrotR { r: CleverRegister, }, RrotR { r: CleverRegister, }, Imul { ss: u16, flags: bool, }, AddRD { r: CleverRegister, }, SubRD { r: CleverRegister, }, AndRD { r: CleverRegister, }, OrRD { r: CleverRegister, }, XorRD { r: CleverRegister, }, BNot { l: bool, f: bool, }, Neg { l: bool, f: bool, }, Idiv { ss: u16, wide: bool, flags: bool, }, AddRS { r: CleverRegister, }, SubRS { r: CleverRegister, }, AndRS { r: CleverRegister, }, OrRS { r: CleverRegister, }, XorRS { r: CleverRegister, }, BNotR { r: CleverRegister, }, NegR { r: CleverRegister, }, Cmp, Test, CmpR { r: CleverRegister, }, TestR { r: CleverRegister, }, Round { f: bool, }, Ceil { f: bool, }, Floor { f: bool, }, FAbs { f: bool, }, FNeg { f: bool, }, FInv { f: bool, }, FAdd { f: bool, }, FSub { f: bool, }, FMul { f: bool, }, FDiv { f: bool, }, FRem { f: bool, }, FFma { f: bool, }, FCmpz, FCmp, Exp { f: bool, }, Ln { f: bool, }, Lg { f: bool, }, Sin { f: bool, }, Cos { f: bool, }, Tan { f: bool, }, Asin { f: bool, }, Acos { f: bool, }, Atan { f: bool, }, Exp2 { f: bool, }, Log10 { f: bool, }, Lnp1 { f: bool, }, Expm1 { f: bool, }, Sqrt { f: bool, }, FRaiseExcept, FTriggerExcept, Xchg, Cmpxchg, Wcmpxchg, Fence, RPoll { r: CleverRegister, }, Vec, Vmov, VShuffle, CBP0A { w: i8, }, CBC0A { w: i8, }, CBV0A { w: i8, }, CBZ0A { w: i8, }, CBL0A { w: i8, }, CBLE0A { w: i8, }, CBBE0A { w: i8, }, CBM0A { w: i8, }, CBPS0A { w: i8, }, CBA0A { w: i8, }, CBG0A { w: i8, }, CBGE0A { w: i8, }, CBNZ0A { w: i8, }, CBNV0A { w: i8, }, CBNC0A { w: i8, }, CBNP0A { w: i8, }, CBP0R { w: i8, }, CBC0R { w: i8, }, CBV0R { w: i8, }, CBZ0R { w: i8, }, CBL0R { w: i8, }, CBLE0R { w: i8, }, CBBE0R { w: i8, }, CBM0R { w: i8, }, CBPS0R { w: i8, }, CBA0R { w: i8, }, CBG0R { w: i8, }, CBGE0R { w: i8, }, CBNZ0R { w: i8, }, CBNV0R { w: i8, }, CBNC0R { w: i8, }, CBNP0R { w: i8, }, CBP1A { w: i8, }, CBC1A { w: i8, }, CBV1A { w: i8, }, CBZ1A { w: i8, }, CBL1A { w: i8, }, CBLE1A { w: i8, }, CBBE1A { w: i8, }, CBM1A { w: i8, }, CBPS1A { w: i8, }, CBA1A { w: i8, }, CBG1A { w: i8, }, CBGE1A { w: i8, }, CBNZ1A { w: i8, }, CBNV1A { w: i8, }, CBNC1A { w: i8, }, CBNP1A { w: i8, }, CBP1R { w: i8, }, CBC1R { w: i8, }, CBV1R { w: i8, }, CBZ1R { w: i8, }, CBL1R { w: i8, }, CBLE1R { w: i8, }, CBBE1R { w: i8, }, CBM1R { w: i8, }, CBPS1R { w: i8, }, CBA1R { w: i8, }, CBG1R { w: i8, }, CBGE1R { w: i8, }, CBNZ1R { w: i8, }, CBNV1R { w: i8, }, CBNC1R { w: i8, }, CBNP1R { w: i8, }, CBP2A { w: i8, }, CBC2A { w: i8, }, CBV2A { w: i8, }, CBZ2A { w: i8, }, CBL2A { w: i8, }, CBLE2A { w: i8, }, CBBE2A { w: i8, }, CBM2A { w: i8, }, CBPS2A { w: i8, }, CBA2A { w: i8, }, CBG2A { w: i8, }, CBGE2A { w: i8, }, CBNZ2A { w: i8, }, CBNV2A { w: i8, }, CBNC2A { w: i8, }, CBNP2A { w: i8, }, CBP2R { w: i8, }, CBC2R { w: i8, }, CBV2R { w: i8, }, CBZ2R { w: i8, }, CBL2R { w: i8, }, CBLE2R { w: i8, }, CBBE2R { w: i8, }, CBM2R { w: i8, }, CBPS2R { w: i8, }, CBA2R { w: i8, }, CBG2R { w: i8, }, CBGE2R { w: i8, }, CBNZ2R { w: i8, }, CBNV2R { w: i8, }, CBNC2R { w: i8, }, CBNP2R { w: i8, }, JmpA { ss: u16, }, CallA { ss: u16, }, FcallA { ss: u16, }, Ret, Scall, Int { i: u16, }, IjmpA { r: CleverRegister, }, IcallA { r: CleverRegister, }, IfcallA, JmpSM { ss: u16, }, CallSM { v: bool, ss: u16, }, RetRSM, JmpR { ss: u16, }, CallR { ss: u16, }, FcallR { ss: u16, }, IjmpR { r: CleverRegister, }, IcallR { r: CleverRegister, }, IfcallR, JmpSMR { ss: u16, }, CallSMR { ss: u16, v: bool, }, Halt, Pcfl, FlAll, Dflush, Iflush, In { ss: u16, }, Out { ss: u16, }, StoRegF, RstRegF, Scret, Iret, Hcall, Hret, Hresume, VMCreate, VMDestroy, Und255,
}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Und0

§

Add

Fields

§lock: bool
§flags: bool
§

Sub

Fields

§lock: bool
§flags: bool
§

And

Fields

§lock: bool
§flags: bool
§

Or

Fields

§lock: bool
§flags: bool
§

Xor

Fields

§lock: bool
§flags: bool
§

Mul

Fields

§ss: u16
§flags: bool
§

Div

Fields

§ss: u16
§wide: bool
§flags: bool
§

Mov

§

Lea

§

MovRD

§

MovRS

§

LeaRD

§

Nop10

Fields

§any: u16
§

Nop11

Fields

§any: u16
§

Nop12

Fields

§any: u16
§

Nop13

Fields

§any: u16
§

Push

§

Pop

§

PushR

§

PopR

§

Stogpr

§

Stoar

§

Rstogpr

§

Rstoar

§

Pushgpr

§

Pushar

§

Popgpr

§

Popar

§

Movsx

Fields

§flags: bool
§

Bswap

Fields

§flags: bool
§

Movsif

Fields

§flags: bool
§

Movxf

Fields

§ss: u16
§int: bool
§flags: bool
§

Movfsi

Fields

§flags: bool
§

Movfx

Fields

§ss: u16
§int: bool
§flags: bool
§

Cvtf

Fields

§flags: bool
§

Repbi

Fields

§

Repbc

§

Bcpy

Fields

§ss: u16
§

Bsto

Fields

§ss: u16
§

Bsca

Fields

§ss: u16
§

Bcmp

Fields

§ss: u16
§

Btst

Fields

§ss: u16
§

Lsh

Fields

§

Rsh

Fields

§

Arsh

Fields

§

Lshc

Fields

§

Rshc

Fields

§

Lrot

Fields

§

Rrot

Fields

§

LshR

§

RshR

§

ArshR

§

LshcR

§

RshcR

§

LrotR

§

RrotR

§

Imul

Fields

§ss: u16
§flags: bool
§

AddRD

§

SubRD

§

AndRD

§

OrRD

§

XorRD

§

BNot

Fields

§

Neg

Fields

§

Idiv

Fields

§ss: u16
§wide: bool
§flags: bool
§

AddRS

§

SubRS

§

AndRS

§

OrRS

§

XorRS

§

BNotR

§

NegR

§

Cmp

§

Test

§

CmpR

§

TestR

§

Round

Fields

§

Ceil

Fields

§

Floor

Fields

§

FAbs

Fields

§

FNeg

Fields

§

FInv

Fields

§

FAdd

Fields

§

FSub

Fields

§

FMul

Fields

§

FDiv

Fields

§

FRem

Fields

§

FFma

Fields

§

FCmpz

§

FCmp

§

Exp

Fields

§

Ln

Fields

§

Lg

Fields

§

Sin

Fields

§

Cos

Fields

§

Tan

Fields

§

Asin

Fields

§

Acos

Fields

§

Atan

Fields

§

Exp2

Fields

§

Log10

Fields

§

Lnp1

Fields

§

Expm1

Fields

§

Sqrt

Fields

§

FRaiseExcept

§

FTriggerExcept

§

Xchg

§

Cmpxchg

§

Wcmpxchg

§

Fence

§

RPoll

§

Vec

§

Vmov

§

VShuffle

§

CBP0A

Fields

§w: i8
§

CBC0A

Fields

§w: i8
§

CBV0A

Fields

§w: i8
§

CBZ0A

Fields

§w: i8
§

CBL0A

Fields

§w: i8
§

CBLE0A

Fields

§w: i8
§

CBBE0A

Fields

§w: i8
§

CBM0A

Fields

§w: i8
§

CBPS0A

Fields

§w: i8
§

CBA0A

Fields

§w: i8
§

CBG0A

Fields

§w: i8
§

CBGE0A

Fields

§w: i8
§

CBNZ0A

Fields

§w: i8
§

CBNV0A

Fields

§w: i8
§

CBNC0A

Fields

§w: i8
§

CBNP0A

Fields

§w: i8
§

CBP0R

Fields

§w: i8
§

CBC0R

Fields

§w: i8
§

CBV0R

Fields

§w: i8
§

CBZ0R

Fields

§w: i8
§

CBL0R

Fields

§w: i8
§

CBLE0R

Fields

§w: i8
§

CBBE0R

Fields

§w: i8
§

CBM0R

Fields

§w: i8
§

CBPS0R

Fields

§w: i8
§

CBA0R

Fields

§w: i8
§

CBG0R

Fields

§w: i8
§

CBGE0R

Fields

§w: i8
§

CBNZ0R

Fields

§w: i8
§

CBNV0R

Fields

§w: i8
§

CBNC0R

Fields

§w: i8
§

CBNP0R

Fields

§w: i8
§

CBP1A

Fields

§w: i8
§

CBC1A

Fields

§w: i8
§

CBV1A

Fields

§w: i8
§

CBZ1A

Fields

§w: i8
§

CBL1A

Fields

§w: i8
§

CBLE1A

Fields

§w: i8
§

CBBE1A

Fields

§w: i8
§

CBM1A

Fields

§w: i8
§

CBPS1A

Fields

§w: i8
§

CBA1A

Fields

§w: i8
§

CBG1A

Fields

§w: i8
§

CBGE1A

Fields

§w: i8
§

CBNZ1A

Fields

§w: i8
§

CBNV1A

Fields

§w: i8
§

CBNC1A

Fields

§w: i8
§

CBNP1A

Fields

§w: i8
§

CBP1R

Fields

§w: i8
§

CBC1R

Fields

§w: i8
§

CBV1R

Fields

§w: i8
§

CBZ1R

Fields

§w: i8
§

CBL1R

Fields

§w: i8
§

CBLE1R

Fields

§w: i8
§

CBBE1R

Fields

§w: i8
§

CBM1R

Fields

§w: i8
§

CBPS1R

Fields

§w: i8
§

CBA1R

Fields

§w: i8
§

CBG1R

Fields

§w: i8
§

CBGE1R

Fields

§w: i8
§

CBNZ1R

Fields

§w: i8
§

CBNV1R

Fields

§w: i8
§

CBNC1R

Fields

§w: i8
§

CBNP1R

Fields

§w: i8
§

CBP2A

Fields

§w: i8
§

CBC2A

Fields

§w: i8
§

CBV2A

Fields

§w: i8
§

CBZ2A

Fields

§w: i8
§

CBL2A

Fields

§w: i8
§

CBLE2A

Fields

§w: i8
§

CBBE2A

Fields

§w: i8
§

CBM2A

Fields

§w: i8
§

CBPS2A

Fields

§w: i8
§

CBA2A

Fields

§w: i8
§

CBG2A

Fields

§w: i8
§

CBGE2A

Fields

§w: i8
§

CBNZ2A

Fields

§w: i8
§

CBNV2A

Fields

§w: i8
§

CBNC2A

Fields

§w: i8
§

CBNP2A

Fields

§w: i8
§

CBP2R

Fields

§w: i8
§

CBC2R

Fields

§w: i8
§

CBV2R

Fields

§w: i8
§

CBZ2R

Fields

§w: i8
§

CBL2R

Fields

§w: i8
§

CBLE2R

Fields

§w: i8
§

CBBE2R

Fields

§w: i8
§

CBM2R

Fields

§w: i8
§

CBPS2R

Fields

§w: i8
§

CBA2R

Fields

§w: i8
§

CBG2R

Fields

§w: i8
§

CBGE2R

Fields

§w: i8
§

CBNZ2R

Fields

§w: i8
§

CBNV2R

Fields

§w: i8
§

CBNC2R

Fields

§w: i8
§

CBNP2R

Fields

§w: i8
§

JmpA

Fields

§ss: u16
§

CallA

Fields

§ss: u16
§

FcallA

Fields

§ss: u16
§

Ret

§

Scall

§

Int

Fields

§

IjmpA

§

IcallA

§

IfcallA

§

JmpSM

Fields

§ss: u16
§

CallSM

Fields

§ss: u16
§

RetRSM

§

JmpR

Fields

§ss: u16
§

CallR

Fields

§ss: u16
§

FcallR

Fields

§ss: u16
§

IjmpR

§

IcallR

§

IfcallR

§

JmpSMR

Fields

§ss: u16
§

CallSMR

Fields

§ss: u16
§

Halt

§

Pcfl

§

FlAll

§

Dflush

§

Iflush

§

In

Fields

§ss: u16
§

Out

Fields

§ss: u16
§

StoRegF

§

RstRegF

§

Scret

§

Iret

§

Hcall

§

Hret

§

Hresume

§

VMCreate

§

VMDestroy

§

Und255

Implementations§

Source§

impl CleverOpcode

Source

pub fn from_opcode(opc: u16) -> Option<CleverOpcode>

Source

pub fn extension(&self) -> CleverExtension

Source

pub fn name(&self) -> &'static str

Source

pub fn opcode(&self) -> u16

Source

pub fn operands(&self) -> CleverOperandKind

Source§

impl CleverOpcode

Source

pub fn valid_prefix_for(&self, prefixed: &CleverOpcode) -> bool

Source§

impl CleverOpcode

Source§

impl CleverOpcode

Source

pub const NOP0: Self

Source

pub const NOP1: Self

Source

pub const NOP2: Self

Source

pub const NOP3: Self

Source§

impl CleverOpcode

Source

pub fn is_branch(&self) -> bool

Source

pub fn is_cbranch(&self) -> bool

Source

pub fn branch_pcrel(&self) -> Option<bool>

Source

pub fn branch_set_relative(&self, isrel: bool) -> Option<CleverOpcode>

Source

pub fn branch_condition(&self) -> Option<ConditionCode>

Source

pub fn branch_weight(&self) -> Option<i8>

Source

pub fn branch_width(&self) -> Option<u16>

Source

pub fn cbranch(cc: ConditionCode, width: u16, pcrel: bool, weight: i8) -> Self

Trait Implementations§

Source§

impl Clone for CleverOpcode

Source§

fn clone(&self) -> CleverOpcode

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 CleverOpcode

Source§

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

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

impl Display for CleverOpcode

Source§

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

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

impl Hash for CleverOpcode

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 CleverOpcode

Source§

fn eq(&self, other: &CleverOpcode) -> 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 Copy for CleverOpcode

Source§

impl Eq for CleverOpcode

Source§

impl StructuralPartialEq for CleverOpcode

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<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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.