[]Struct cranelift::prelude::isa::registers::RegInfo

pub struct RegInfo {
    pub banks: &'static [RegBank],
    pub classes: &'static [&'static RegClassData],
}

Information about the registers in an ISA.

The RegUnit data structure collects all relevant static information about the registers in an ISA.

Fields

banks: &'static [RegBank]

All register banks, ordered by their first_unit. The register banks are disjoint, but there may be holes of unused register unit numbers between banks due to alignment.

classes: &'static [&'static RegClassData]

All register classes ordered topologically so a sub-class always follows its parent.

Methods

impl RegInfo

pub fn bank_containing_regunit(&self, regunit: u16) -> Option<&RegBank>

Get the register bank holding regunit.

pub fn parse_regunit(&self, name: &str) -> Option<u16>

Try to parse a regunit name. The name is not expected to begin with %.

pub fn display_regunit(&self, regunit: u16) -> DisplayRegUnit

Make a temporary object that can display a register unit.

pub fn rc(&self, idx: RegClassIndex) -> &'static RegClassData

Get the register class corresponding to idx.

pub fn toprc(&self, idx: RegClassIndex) -> &'static RegClassData

Get the top-level register class containing the idx class.

Trait Implementations

impl Clone for RegInfo

Auto Trait Implementations

impl RefUnwindSafe for RegInfo

impl Send for RegInfo

impl Sync for RegInfo

impl Unpin for RegInfo

impl UnwindSafe for RegInfo

Blanket Implementations

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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.