Trait cranelift_codegen::isa::TargetIsa
source · [−]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 unsigned_add_overflow_condition(&self) -> IntCC;
fn get_mach_backend(&self) -> &dyn MachBackend;
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 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.
fn unsigned_add_overflow_condition(&self) -> IntCC
fn unsigned_add_overflow_condition(&self) -> IntCC
IntCC condition for Unsigned Addition Overflow (Carry).
fn get_mach_backend(&self) -> &dyn MachBackend
fn get_mach_backend(&self) -> &dyn MachBackend
Get the new-style MachBackend.
Provided methods
fn map_regalloc_reg_to_dwarf(&self, _: Reg) -> Result<u16, RegisterMappingError>
fn map_regalloc_reg_to_dwarf(&self, _: Reg) -> Result<u16, RegisterMappingError>
Map a regalloc::Reg to its corresponding DWARF register.
fn create_systemv_cie(&self) -> Option<CommonInformationEntry>
fn create_systemv_cie(&self) -> Option<CommonInformationEntry>
Creates a new System V Common Information Entry for the ISA.
Returns None if the ISA does not support System V unwind information.
Implementations
sourceimpl<'a> dyn TargetIsa + 'a
impl<'a> dyn TargetIsa + 'a
Methods implemented for free for target ISA!
sourcepub fn default_call_conv(&self) -> CallConv
pub fn default_call_conv(&self) -> CallConv
Get the default calling convention of this target.
sourcepub fn endianness(&self) -> Endianness
pub fn endianness(&self) -> Endianness
Get the endianness of this ISA.
sourcepub fn code_section_alignment(&self) -> u64
pub fn code_section_alignment(&self) -> u64
Returns the code (text) section alignment for this ISA.
sourcepub fn pointer_type(&self) -> Type
pub fn pointer_type(&self) -> Type
Get the pointer type of this ISA.
sourcepub fn pointer_bits(&self) -> u8
pub fn pointer_bits(&self) -> u8
Get the width of pointers on this ISA, in units of bits.
sourcepub fn pointer_bytes(&self) -> u8
pub fn pointer_bytes(&self) -> u8
Get the width of pointers on this ISA, in units of bytes.
sourcepub fn frontend_config(&self) -> TargetFrontendConfig
pub fn frontend_config(&self) -> TargetFrontendConfig
Get the information needed by frontends producing Cranelift IR.
Trait Implementations
sourceimpl<'a> From<&'a (dyn TargetIsa + 'a)> for FlagsOrIsa<'a>
impl<'a> From<&'a (dyn TargetIsa + 'a)> for FlagsOrIsa<'a>
sourcefn from(isa: &'a dyn TargetIsa) -> FlagsOrIsa<'_>
fn from(isa: &'a dyn TargetIsa) -> FlagsOrIsa<'_>
Performs the conversion.