Trait cranelift_codegen::machinst::MachBackend
source · [−]pub trait MachBackend {
fn compile_function(
&self,
func: &Function,
want_disasm: bool
) -> CodegenResult<MachCompileResult>;
fn flags(&self) -> &Flags;
fn triple(&self) -> Triple;
fn name(&self) -> &'static str;
fn reg_universe(&self) -> &RealRegUniverse;
fn unsigned_add_overflow_condition(&self) -> IntCC;
fn unsigned_sub_overflow_condition(&self) -> IntCC;
fn emit_unwind_info(
&self,
_result: &MachCompileResult,
_kind: UnwindInfoKind
) -> CodegenResult<Option<UnwindInfo>> { ... }
fn create_systemv_cie(&self) -> Option<CommonInformationEntry> { ... }
}
Expand description
Top-level machine backend trait, which wraps all monomorphized code and
allows a virtual call from the machine-independent Function::compile()
.
Required methods
fn compile_function(
&self,
func: &Function,
want_disasm: bool
) -> CodegenResult<MachCompileResult>
fn compile_function(
&self,
func: &Function,
want_disasm: bool
) -> CodegenResult<MachCompileResult>
Compile the given function.
fn reg_universe(&self) -> &RealRegUniverse
fn reg_universe(&self) -> &RealRegUniverse
Return the register universe for this backend.
fn unsigned_add_overflow_condition(&self) -> IntCC
fn unsigned_add_overflow_condition(&self) -> IntCC
Machine-specific condcode info needed by TargetIsa. Condition that will be true when an IaddIfcout overflows.
fn unsigned_sub_overflow_condition(&self) -> IntCC
fn unsigned_sub_overflow_condition(&self) -> IntCC
Machine-specific condcode info needed by TargetIsa. Condition that will be true when an IsubIfcout overflows.
Provided methods
fn emit_unwind_info(
&self,
_result: &MachCompileResult,
_kind: UnwindInfoKind
) -> CodegenResult<Option<UnwindInfo>>
fn emit_unwind_info(
&self,
_result: &MachCompileResult,
_kind: UnwindInfoKind
) -> CodegenResult<Option<UnwindInfo>>
Produces unwind info based on backend results.
fn create_systemv_cie(&self) -> Option<CommonInformationEntry>
fn create_systemv_cie(&self) -> Option<CommonInformationEntry>
Machine-specific condcode info needed by TargetIsa. Creates a new System V Common Information Entry for the ISA.