Instruction

Trait Instruction 

Source
pub trait Instruction:
    Display
    + Debug
    + Copy
    + Sized {
    type Base: BaseInstruction;

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

Generic instruction

Required Associated Types§

Source

type Base: BaseInstruction

Lower-level instruction like Rv64Instruction

Required Methods§

Source

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

Try to decode a single valid instruction

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§

Source§

impl<A, B, Base> Instruction for Tuple3Instruction<A, B, Base>
where A: Instruction<Base = Base>, B: Instruction<Base = Base>, Base: BaseInstruction,

Source§

type Base = Base

Source§

impl<A, Base> Instruction for Tuple2Instruction<A, Base>
where A: Instruction<Base = Base>, Base: BaseInstruction,

Source§

type Base = Base

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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