Skip to main content

Instruction

Trait Instruction 

Source
pub trait Instruction:
    Display
    + Debug
    + Copy
    + Sized {
    type Reg: Register;

    // Required methods
    fn try_decode(instruction: u32) -> Option<Self>;
    fn alignment() -> u8;
    fn size(&self) -> u8;
}
Expand description

Generic instruction

Required Associated Types§

Source

type Reg: Register

A register type used by the instruction

Required Methods§

Source

fn try_decode(instruction: u32) -> Option<Self>

Try to decode a single valid instruction

Source

fn alignment() -> u8

Instruction alignment in bytes

Source

fn size(&self) -> u8

Instruction size in bytes

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl<Reg> Instruction for Rv64BInstruction<Reg>
where Reg: Register<Type = u64>,

§

type Reg = Reg

§

impl<Reg> Instruction for Rv64ZbaInstruction<Reg>
where Reg: Register<Type = u64>,

§

type Reg = Reg

§

impl<Reg> Instruction for Rv64ZbbInstruction<Reg>
where Reg: Register<Type = u64>,

§

type Reg = Reg

§

impl<Reg> Instruction for Rv64ZbcInstruction<Reg>
where Reg: Register<Type = u64>,

§

type Reg = Reg

§

impl<Reg> Instruction for Rv64ZbsInstruction<Reg>
where Reg: Register<Type = u64>,

§

type Reg = Reg

§

impl<Reg> Instruction for Rv64Instruction<Reg>
where Reg: Register<Type = u64>,

§

type Reg = Reg

§

impl<Reg> Instruction for Rv64MInstruction<Reg>
where Reg: Register<Type = u64>,

§

type Reg = Reg

§

impl<Reg> Instruction for Rv64ZmmulInstruction<Reg>
where Reg: Register<Type = u64>,

§

type Reg = Reg

§

impl<Reg> Instruction for Rv64Zve64xInstruction<Reg>
where Reg: Register<Type = u64>,

§

type Reg = Reg

§

impl<Reg> Instruction for Rv64ZicsrInstruction<Reg>
where Reg: Register,

§

type Reg = Reg

§

impl<Reg> Instruction for Rv64ZbkcInstruction<Reg>
where Reg: Register<Type = u64>,

§

type Reg = Reg

§

impl<Reg> Instruction for Rv64ZknhInstruction<Reg>
where Reg: Register<Type = u64>,

§

type Reg = Reg