pub trait TargetIsa: Display + Send + Sync {
    fn name(&self) -> &'static str;
    fn triple(&self) -> &Triple;
    fn flags(&self) -> &Flags;
    fn isa_flags(&self) -> Vec<Value>;
    fn compile_function(
        &self,
        func: &Function,
        want_disasm: bool
    ) -> CodegenResult<MachCompileResult>; fn unsigned_add_overflow_condition(&self) -> IntCC; fn emit_unwind_info(
        &self,
        result: &MachCompileResult,
        kind: UnwindInfoKind
    ) -> CodegenResult<Option<UnwindInfo>>; fn text_section_builder(
        &self,
        num_labeled_funcs: u32
    ) -> Box<dyn TextSectionBuilder>; fn map_regalloc_reg_to_dwarf(
        &self,
        _: Reg
    ) -> Result<u16, RegisterMappingError> { ... } fn create_systemv_cie(&self) -> Option<CommonInformationEntry> { ... } }
Expand description

Methods that are specialized to a target ISA.

Implies a Display trait that shows the shared flags, as well as any ISA-specific flags.

Required Methods

Get the name of this ISA.

Get the target triple that was used to make this trait object.

Get the ISA-independent flags that were used to make this trait object.

Get the ISA-dependent flag values that were used to make this trait object.

Compile the given function.

IntCC condition for Unsigned Addition Overflow (Carry).

Creates unwind information for the function.

Returns None if there is no unwind information for the function.

Returns an object that can be used to build the text section of an executable.

This object will internally attempt to handle as many relocations as possible using relative calls/jumps/etc between functions.

The num_labeled_funcs argument here is the number of functions which will be “labeled” or might have calls between them, typically the number of defined functions in the object file.

Provided Methods

Map a regalloc::Reg to its corresponding DWARF register.

Creates a new System V Common Information Entry for the ISA.

Returns None if the ISA does not support System V unwind information.

Implementations

Methods implemented for free for target ISA!

Get the default calling convention of this target.

Get the endianness of this ISA.

Returns the code (text) section alignment for this ISA.

Get the pointer type of this ISA.

Get the width of pointers on this ISA, in units of bits.

Get the width of pointers on this ISA, in units of bytes.

Get the information needed by frontends producing Cranelift IR.

Trait Implementations

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Implementors