Trait cranelift_codegen::MachInstEmit

source ·
pub trait MachInstEmit: MachInst {
    type State: MachInstEmitState<Self>;
    type Info;

    // Required methods
    fn emit(
        &self,
        code: &mut MachBuffer<Self>,
        info: &Self::Info,
        state: &mut Self::State,
    );
    fn pretty_print_inst(&self, state: &mut Self::State) -> String;
}
Expand description

A trait describing the ability to encode a MachInst into binary machine code.

Required Associated Types§

source

type State: MachInstEmitState<Self>

Persistent state carried across emit invocations.

source

type Info

Constant information used in emit invocations.

Required Methods§

source

fn emit( &self, code: &mut MachBuffer<Self>, info: &Self::Info, state: &mut Self::State, )

Emit the instruction.

source

fn pretty_print_inst(&self, state: &mut Self::State) -> String

Pretty-print the instruction.

Object Safety§

This trait is not object safe.

Implementors§