Trait cranelift_codegen::machinst::MachInstEmit
source · [−]pub trait MachInstEmit: MachInst {
type State: MachInstEmitState<Self>;
type Info: MachInstEmitInfo;
type UnwindInfo: UnwindInfoGenerator<Self>;
fn emit(
&self,
code: &mut MachBuffer<Self>,
info: &Self::Info,
state: &mut Self::State
);
fn pretty_print(
&self,
mb_rru: Option<&RealRegUniverse>,
state: &mut Self::State
) -> String;
}
Expand description
A trait describing the ability to encode a MachInst into binary machine code.
Associated Types
type State: MachInstEmitState<Self>
type State: MachInstEmitState<Self>
Persistent state carried across emit
invocations.
type Info: MachInstEmitInfo
type Info: MachInstEmitInfo
Constant information used in emit
invocations.
type UnwindInfo: UnwindInfoGenerator<Self>
type UnwindInfo: UnwindInfoGenerator<Self>
Unwind info generator.
Required methods
fn emit(
&self,
code: &mut MachBuffer<Self>,
info: &Self::Info,
state: &mut Self::State
)
fn emit(
&self,
code: &mut MachBuffer<Self>,
info: &Self::Info,
state: &mut Self::State
)
Emit the instruction.
fn pretty_print(
&self,
mb_rru: Option<&RealRegUniverse>,
state: &mut Self::State
) -> String
fn pretty_print(
&self,
mb_rru: Option<&RealRegUniverse>,
state: &mut Self::State
) -> String
Pretty-print the instruction.