BaseInstruction

Trait BaseInstruction 

Source
pub trait BaseInstruction: Instruction {
    type Reg: Register;

    // Required methods
    fn from_base(base: Self::Base) -> Self;
    fn decode(instruction: u32) -> Self;
}
Expand description

Generic base instruction

Required Associated Types§

Source

type Reg: Register

A register type used by the instruction

Required Methods§

Source

fn from_base(base: Self::Base) -> Self

Create an instruction from a lower-level base instruction

Source

fn decode(instruction: u32) -> Self

Decode a single instruction

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> BaseInstruction for Tuple3Instruction<A, B, Base>
where A: Instruction<Base = Base>, B: Instruction<Base = Base>, Base: BaseInstruction,

Source§

type Reg = <Base as BaseInstruction>::Reg

Source§

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

Source§

type Reg = <Base as BaseInstruction>::Reg

Source§

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

Source§

type Reg = Reg