pub struct ArchTraits {
    pub sp_reg_id: u8,
    pub fp_reg_id: u8,
    pub link_reg_id: u8,
    pub ip_reg_id: u8,
    pub hw_stack_alignment: u8,
    pub min_stack_offset: u32,
    pub max_stack_offset: u32,
    pub regs_signature: [OperandSignature; 32],
    pub reg_type_to_type_id: [TypeId; 32],
    pub type_id_to_reg_type: [RegType; 32],
}Fields§
§sp_reg_id: u8§fp_reg_id: u8§link_reg_id: u8§ip_reg_id: u8§hw_stack_alignment: u8§min_stack_offset: u32§max_stack_offset: u32§regs_signature: [OperandSignature; 32]§reg_type_to_type_id: [TypeId; 32]§type_id_to_reg_type: [RegType; 32]Implementations§
Source§impl ArchTraits
 
impl ArchTraits
Sourcepub const fn link_reg_id(&self) -> u32
 
pub const fn link_reg_id(&self) -> u32
Returns link register id, if the architecture provides it.
Sourcepub const fn ip_reg_id(&self) -> u32
 
pub const fn ip_reg_id(&self) -> u32
Returns instruction pointer register id, if the architecture provides it.
Sourcepub const fn hw_stack_alignment(&self) -> u32
 
pub const fn hw_stack_alignment(&self) -> u32
Returns a hardware stack alignment requirement.
§Note
This is a hardware constraint. Architectures that don’t constrain it would return the lowest alignment (1), however, some architectures may constrain the alignment, for example AArch64 requires 16-byte alignment.
Sourcepub const fn has_link_reg(&self) -> bool
 
pub const fn has_link_reg(&self) -> bool
Tests whether the architecture provides link register, which is used across function calls. If the link register is not provided then a function call pushes the return address on stack (X86/X64).
Sourcepub const fn min_stack_offset(&self) -> u32
 
pub const fn min_stack_offset(&self) -> u32
Returns minimum addressable offset on stack guaranteed for all instructions.
Sourcepub const fn max_stack_offset(&self) -> u32
 
pub const fn max_stack_offset(&self) -> u32
Returns maximum addressable offset on stack depending on specific instruction.
pub const fn has_reg_type(&self, typ: RegType) -> bool
pub const fn reg_type_to_signature(&self, typ: RegType) -> OperandSignature
pub fn reg_type_to_group(&self, typ: RegType) -> RegGroup
pub fn reg_type_to_size(&self, typ: RegType) -> u32
pub const fn reg_type_to_type_id(&self, typ: RegType) -> TypeId
pub const fn by_arch(arch: Arch) -> &'static Self
Auto Trait Implementations§
impl Freeze for ArchTraits
impl RefUnwindSafe for ArchTraits
impl Send for ArchTraits
impl Sync for ArchTraits
impl Unpin for ArchTraits
impl UnwindSafe for ArchTraits
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more