Struct cranelift_codegen::machinst::adapter::TargetIsaAdapter
source · [−]pub struct TargetIsaAdapter { /* private fields */ }
Expand description
A wrapper around a MachBackend
that provides a TargetIsa
impl.
Implementations
sourceimpl TargetIsaAdapter
impl TargetIsaAdapter
sourcepub fn new<B: MachBackend + Send + Sync + 'static>(
backend: B
) -> TargetIsaAdapter
pub fn new<B: MachBackend + Send + Sync + 'static>(
backend: B
) -> TargetIsaAdapter
Create a new TargetIsa
wrapper around a MachBackend
.
Trait Implementations
sourceimpl Display for TargetIsaAdapter
impl Display for TargetIsaAdapter
sourceimpl TargetIsa for TargetIsaAdapter
impl TargetIsa for TargetIsaAdapter
sourcefn emit_function_to_memory(
&self,
_func: &Function,
_sink: &mut MemoryCodeSink<'_>
)
fn emit_function_to_memory(
&self,
_func: &Function,
_sink: &mut MemoryCodeSink<'_>
)
Emit a whole function into memory.
sourcefn flags(&self) -> &Flags
fn flags(&self) -> &Flags
Get the ISA-independent flags that were used to make this trait object.
sourcefn register_info(&self) -> RegInfo
fn register_info(&self) -> RegInfo
Get a data structure describing the registers in this ISA.
sourcefn 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;
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;
Returns an iterator over legal encodings for the instruction.
sourcefn encode(
&self,
_func: &Function,
_inst: &InstructionData,
_ctrl_typevar: Type
) -> Result<Encoding, Legalize>
fn encode(
&self,
_func: &Function,
_inst: &InstructionData,
_ctrl_typevar: Type
) -> Result<Encoding, Legalize>
Encode an instruction after determining it is legal. Read more
sourcefn encoding_info(&self) -> EncInfo
fn encoding_info(&self) -> EncInfo
Get a data structure describing the instruction encodings in this ISA.
sourcefn legalize_signature(&self, _sig: &mut Cow<'_, Signature>, _current: bool)
fn legalize_signature(&self, _sig: &mut Cow<'_, Signature>, _current: bool)
Legalize a function signature. Read more
sourcefn regclass_for_abi_type(&self, _ty: Type) -> RegClass
fn regclass_for_abi_type(&self, _ty: Type) -> RegClass
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
sourcefn allocatable_registers(&self, _func: &Function) -> RegisterSet
fn allocatable_registers(&self, _func: &Function) -> RegisterSet
Get the set of allocatable registers that can be used when compiling func
. Read more
sourcefn prologue_epilogue(&self, _func: &mut Function) -> CodegenResult<()>
fn prologue_epilogue(&self, _func: &mut Function) -> CodegenResult<()>
Compute the stack layout and insert prologue and epilogue code into func
. Read more
sourcefn get_mach_backend(&self) -> Option<&dyn MachBackend>
fn get_mach_backend(&self) -> Option<&dyn MachBackend>
Get the new-style MachBackend, if this is an adapter around one.
sourcefn unsigned_add_overflow_condition(&self) -> IntCC
fn unsigned_add_overflow_condition(&self) -> IntCC
IntCC condition for Unsigned Addition Overflow (Carry).
sourcefn unsigned_sub_overflow_condition(&self) -> IntCC
fn unsigned_sub_overflow_condition(&self) -> IntCC
IntCC condition for Unsigned Subtraction Overflow (Borrow/Carry).
sourcefn create_systemv_cie(&self) -> Option<CommonInformationEntry>
fn create_systemv_cie(&self) -> Option<CommonInformationEntry>
Creates a new System V Common Information Entry for the ISA. Read more
sourcefn default_call_conv(&self) -> CallConv
fn default_call_conv(&self) -> CallConv
Get the default calling convention of this target.
sourcefn endianness(&self) -> Endianness
fn endianness(&self) -> Endianness
Get the endianness of this ISA.
sourcefn pointer_type(&self) -> Type
fn pointer_type(&self) -> Type
Get the pointer type of this ISA.
sourcefn pointer_width(&self) -> PointerWidth
fn pointer_width(&self) -> PointerWidth
Get the width of pointers on this ISA.
sourcefn pointer_bits(&self) -> u8
fn pointer_bits(&self) -> u8
Get the width of pointers on this ISA, in units of bits.
sourcefn pointer_bytes(&self) -> u8
fn pointer_bytes(&self) -> u8
Get the width of pointers on this ISA, in units of bytes.
sourcefn frontend_config(&self) -> TargetFrontendConfig
fn frontend_config(&self) -> TargetFrontendConfig
Get the information needed by frontends producing Cranelift IR.
sourcefn uses_cpu_flags(&self) -> bool
fn uses_cpu_flags(&self) -> bool
Does the CPU implement scalar comparisons using a CPU flags register?
sourcefn uses_complex_addresses(&self) -> bool
fn uses_complex_addresses(&self) -> bool
Does the CPU implement multi-register addressing?
sourcefn map_dwarf_register(&self, _: RegUnit) -> Result<u16, RegisterMappingError>
fn map_dwarf_register(&self, _: RegUnit) -> Result<u16, RegisterMappingError>
Map a Cranelift register to its corresponding DWARF register.
sourcefn create_unwind_info(
&self,
_func: &Function
) -> CodegenResult<Option<UnwindInfo>>
fn create_unwind_info(
&self,
_func: &Function
) -> CodegenResult<Option<UnwindInfo>>
Creates unwind information for the function. Read more
Auto Trait Implementations
impl !RefUnwindSafe for TargetIsaAdapter
impl Send for TargetIsaAdapter
impl Sync for TargetIsaAdapter
impl Unpin for TargetIsaAdapter
impl !UnwindSafe for TargetIsaAdapter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more