Trait cranelift_codegen::MachInstEmit
source · pub trait MachInstEmit: MachInst {
type State: MachInstEmitState<Self>;
type Info;
// Required methods
fn emit(
&self,
allocs: &[Allocation],
code: &mut MachBuffer<Self>,
info: &Self::Info,
state: &mut Self::State,
);
fn pretty_print_inst(
&self,
allocs: &[Allocation],
state: &mut Self::State,
) -> String;
}
Expand description
A trait describing the ability to encode a MachInst into binary machine code.
Required Associated Types§
Required Methods§
sourcefn emit(
&self,
allocs: &[Allocation],
code: &mut MachBuffer<Self>,
info: &Self::Info,
state: &mut Self::State,
)
fn emit( &self, allocs: &[Allocation], code: &mut MachBuffer<Self>, info: &Self::Info, state: &mut Self::State, )
Emit the instruction.
sourcefn pretty_print_inst(
&self,
allocs: &[Allocation],
state: &mut Self::State,
) -> String
fn pretty_print_inst( &self, allocs: &[Allocation], state: &mut Self::State, ) -> String
Pretty-print the instruction.
Object Safety§
This trait is not object safe.