Struct cranelift_codegen::machinst::adapter::TargetIsaAdapter[][src]

pub struct TargetIsaAdapter { /* fields omitted */ }
Expand description

A wrapper around a MachBackend that provides a TargetIsa impl.

Implementations

impl TargetIsaAdapter[src]

pub fn new<B: MachBackend + Send + Sync + 'static>(
    backend: B
) -> TargetIsaAdapter
[src]

Create a new TargetIsa wrapper around a MachBackend.

Trait Implementations

impl Display for TargetIsaAdapter[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl TargetIsa for TargetIsaAdapter[src]

fn emit_function_to_memory(
    &self,
    _func: &Function,
    _sink: &mut MemoryCodeSink<'_>
)
[src]

Emit a whole function into memory.

fn name(&self) -> &'static str[src]

Get the name of this ISA.

fn triple(&self) -> &Triple[src]

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

fn flags(&self) -> &Flags[src]

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

fn isa_flags(&self) -> Vec<Value>[src]

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

fn variant(&self) -> BackendVariant[src]

Get the variant of this ISA (Legacy or MachInst).

fn hash_all_flags(&self, hasher: &mut dyn Hasher)[src]

Hashes all flags, both ISA-independent and ISA-specific, into the specified hasher. Read more

fn register_info(&self) -> RegInfo[src]

Get a data structure describing the registers in this ISA.

fn legal_encodings<'a>(
    &'a self,
    _func: &'a Function,
    _inst: &'a InstructionData,
    _ctrl_typevar: Type
) -> Encodings<'a>

Notable traits for Encodings<'a>

impl<'a> Iterator for Encodings<'a> type Item = Encoding;
[src]

Returns an iterator over legal encodings for the instruction.

fn encode(
    &self,
    _func: &Function,
    _inst: &InstructionData,
    _ctrl_typevar: Type
) -> Result<Encoding, Legalize>
[src]

Encode an instruction after determining it is legal. Read more

fn encoding_info(&self) -> EncInfo[src]

Get a data structure describing the instruction encodings in this ISA.

fn legalize_signature(&self, _sig: &mut Cow<'_, Signature>, _current: bool)[src]

Legalize a function signature. Read more

fn regclass_for_abi_type(&self, _ty: Type) -> RegClass[src]

Get the register class that should be used to represent an ABI argument or return value of type ty. This should be the top-level register class that contains the argument registers. Read more

fn allocatable_registers(&self, _func: &Function) -> RegisterSet[src]

Get the set of allocatable registers that can be used when compiling func. Read more

fn prologue_epilogue(&self, _func: &mut Function) -> CodegenResult<()>[src]

Compute the stack layout and insert prologue and epilogue code into func. Read more

fn get_mach_backend(&self) -> Option<&dyn MachBackend>[src]

Get the new-style MachBackend, if this is an adapter around one.

fn unsigned_add_overflow_condition(&self) -> IntCC[src]

IntCC condition for Unsigned Addition Overflow (Carry).

fn unsigned_sub_overflow_condition(&self) -> IntCC[src]

IntCC condition for Unsigned Subtraction Overflow (Borrow/Carry).

fn create_systemv_cie(&self) -> Option<CommonInformationEntry>[src]

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

fn map_regalloc_reg_to_dwarf(&self, r: Reg) -> Result<u16, RegisterMappingError>[src]

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

fn as_any(&self) -> &dyn Any[src]

Return an Any reference for downcasting to the ISA-specific implementation of this trait with isa.as_any().downcast_ref::<isa::foo::Isa>(). Read more

fn default_call_conv(&self) -> CallConv[src]

Get the default calling convention of this target.

fn endianness(&self) -> Endianness[src]

Get the endianness of this ISA.

fn pointer_type(&self) -> Type[src]

Get the pointer type of this ISA.

fn pointer_width(&self) -> PointerWidth[src]

Get the width of pointers on this ISA.

fn pointer_bits(&self) -> u8[src]

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

fn pointer_bytes(&self) -> u8[src]

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

fn frontend_config(&self) -> TargetFrontendConfig[src]

Get the information needed by frontends producing Cranelift IR.

fn uses_cpu_flags(&self) -> bool[src]

Does the CPU implement scalar comparisons using a CPU flags register?

fn uses_complex_addresses(&self) -> bool[src]

Does the CPU implement multi-register addressing?

fn map_dwarf_register(&self, _: RegUnit) -> Result<u16, RegisterMappingError>[src]

Map a Cranelift register to its corresponding DWARF register.

fn unwind_info_kind(&self) -> UnwindInfoKind[src]

Returns the flavor of unwind information emitted for this target.

fn create_unwind_info(
    &self,
    _func: &Function
) -> CodegenResult<Option<UnwindInfo>>
[src]

Creates unwind information for the function. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.