Trait cranelift_codegen::machinst::MachBackend [−][src]
pub trait MachBackend {
fn compile_function(
&self,
func: &Function,
want_disasm: bool
) -> CodegenResult<MachCompileResult>;
fn flags(&self) -> &Flags;
fn isa_flags(&self) -> Vec<Value>;
fn hash_all_flags(&self, hasher: &mut dyn Hasher);
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> { ... }
fn map_reg_to_dwarf(&self, _: Reg) -> Result<u16, RegisterMappingError> { ... }
}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>[src]
fn compile_function(
&self,
func: &Function,
want_disasm: bool
) -> CodegenResult<MachCompileResult>[src]Compile the given function.
fn flags(&self) -> &Flags[src]
fn flags(&self) -> &Flags[src]Return flags for this backend.
fn isa_flags(&self) -> Vec<Value>[src]
fn isa_flags(&self) -> Vec<Value>[src]Get the ISA-dependent flag values that were used to make this trait object.
fn hash_all_flags(&self, hasher: &mut dyn Hasher)[src]
fn hash_all_flags(&self, hasher: &mut dyn Hasher)[src]Hashes all flags, both ISA-independent and ISA-dependent, into the specified hasher.
fn triple(&self) -> Triple[src]
fn triple(&self) -> Triple[src]Return triple for this backend.
fn name(&self) -> &'static str[src]
fn name(&self) -> &'static str[src]Return name for this backend.
fn reg_universe(&self) -> &RealRegUniverse[src]
fn reg_universe(&self) -> &RealRegUniverse[src]Return the register universe for this backend.
fn unsigned_add_overflow_condition(&self) -> IntCC[src]
fn unsigned_add_overflow_condition(&self) -> IntCC[src]Machine-specific condcode info needed by TargetIsa. Condition that will be true when an IaddIfcout overflows.
fn unsigned_sub_overflow_condition(&self) -> IntCC[src]
fn unsigned_sub_overflow_condition(&self) -> IntCC[src]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>>[src]
fn emit_unwind_info(
&self,
_result: &MachCompileResult,
_kind: UnwindInfoKind
) -> CodegenResult<Option<UnwindInfo>>[src]Produces unwind info based on backend results.
fn create_systemv_cie(&self) -> Option<CommonInformationEntry>[src]
fn create_systemv_cie(&self) -> Option<CommonInformationEntry>[src]Creates a new System V Common Information Entry for the ISA.
fn map_reg_to_dwarf(&self, _: Reg) -> Result<u16, RegisterMappingError>[src]
fn map_reg_to_dwarf(&self, _: Reg) -> Result<u16, RegisterMappingError>[src]Maps a regalloc::Reg to a DWARF register number.