Skip to main content

RegType

Enum RegType 

Source
#[repr(u32)]
pub enum RegType {
Show 26 variants None = 0, LabelTag = 1, SymTag = 2, PC = 3, Gp8Lo = 4, Gp8Hi = 5, Gp16 = 6, Gp32 = 7, Gp64 = 8, Vec8 = 9, Vec16 = 10, Vec32 = 11, Vec64 = 12, Vec128 = 13, Vec256 = 14, Vec512 = 15, VecNLen = 16, Mask = 17, Extra = 18, X86SReg = 19, X86CReg = 20, X86DReg = 21, X86St = 22, X86Bnd = 23, X86Tmm = 24, MaxValue = 31,
}
Expand description

Register type.

Provides a unique type that can be used to identify a register or its view.

Variants§

§

None = 0

No register - unused, invalid, multiple meanings.

§

LabelTag = 1

Label - local to current assembler label

§

SymTag = 2

Symbol - global symbol, produces relocation

§

PC = 3

Program counter (PC) register.

§

Gp8Lo = 4

8-bit general-purpose register (low part).

§

Gp8Hi = 5

8-bit general-purpose register (high part).

§

Gp16 = 6

General-purpose word register.

§

Gp32 = 7

General-purpose doubleword register.

§

Gp64 = 8

General-purpose quadword register (64-bit).

§

Vec8 = 9

128-bit vector register (SSE+).

§

Vec16 = 10

128-bit vector register (high part, SSE+).

§

Vec32 = 11

128-bit vector register (SSE+).

§

Vec64 = 12

256-bit vector register (AVX+).

§

Vec128 = 13

256-bit vector register (AVX+).

§

Vec256 = 14

512-bit vector register (AVX512+).

§

Vec512 = 15

1024-bit vector register (AVX512+).

§

VecNLen = 16

128-bit vector register with variable length (AVX512+).

§

Mask = 17

Mask register (AVX512+).

§

Extra = 18

Extra registers.

§

X86SReg = 19

§

X86CReg = 20

§

X86DReg = 21

§

X86St = 22

§

X86Bnd = 23

§

X86Tmm = 24

§

MaxValue = 31

Implementations§

Source§

impl RegType

Source

pub const X86Mm: Self = Self::Extra

Source

pub const X86Rip: Self = Self::PC

Source

pub const X86GpbLo: Self = Self::Gp8Lo

Source

pub const X86GpbHi: Self = Self::Gp8Hi

Source

pub const X86Gpw: Self = Self::Gp16

Source

pub const X86Gpd: Self = Self::Gp32

Source

pub const X86Gpq: Self = Self::Gp64

Source

pub const X86Xmm: Self = Self::Vec128

Source

pub const X86Ymm: Self = Self::Vec256

Source

pub const X86Zmm: Self = Self::Vec512

Source

pub const X86KReg: Self = Self::Mask

Source

pub const RISCVPC: Self = Self::PC

Source

pub const RISCV64Gp: Self = Self::Gp64

Source

pub const RISCV32Gp: Self = Self::Gp32

Source

pub const RISCVFp: Self = Self::Vec64

Source

pub const RISCVVec: Self = Self::VecNLen

Trait Implementations§

Source§

impl Clone for RegType

Source§

fn clone(&self) -> RegType

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for RegType

Source§

impl Display for RegType

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Eq for RegType

Source§

impl Hash for RegType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for RegType

Source§

fn cmp(&self, other: &RegType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for RegType

Source§

fn eq(&self, other: &RegType) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for RegType

Source§

fn partial_cmp(&self, other: &RegType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for RegType

Source§

impl TryFrom<u32> for RegType

Source§

type Error = ()

The type returned in the event of a conversion error.
Source§

fn try_from(value: u32) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.