Struct cranelift_codegen_meta::shared::immediates::Immediates

source ·
pub(crate) struct Immediates {
    pub imm64: OperandKind,
    pub uimm8: OperandKind,
    pub uimm128: OperandKind,
    pub pool_constant: OperandKind,
    pub offset32: OperandKind,
    pub ieee32: OperandKind,
    pub ieee64: OperandKind,
    pub intcc: OperandKind,
    pub floatcc: OperandKind,
    pub memflags: OperandKind,
    pub trapcode: OperandKind,
    pub atomic_rmw_op: OperandKind,
}

Fields§

§imm64: OperandKind

A 64-bit immediate integer operand.

This type of immediate integer can interact with SSA values with any IntType type.

§uimm8: OperandKind

An unsigned 8-bit immediate integer operand.

This small operand is used to indicate lane indexes in SIMD vectors and immediate bit counts on shift instructions.

§uimm128: OperandKind

An unsigned 128-bit immediate integer operand.

This operand is used to pass entire 128-bit vectors as immediates to instructions like const.

§pool_constant: OperandKind

A constant stored in the constant pool.

This operand is used to pass constants to instructions like vconst while storing the actual bytes in the constant pool.

§offset32: OperandKind

A 32-bit immediate signed offset.

This is used to represent an immediate address offset in load/store instructions.

§ieee32: OperandKind

A 32-bit immediate floating point operand.

IEEE 754-2008 binary32 interchange format.

§ieee64: OperandKind

A 64-bit immediate floating point operand.

IEEE 754-2008 binary64 interchange format.

§intcc: OperandKind

A condition code for comparing integer values.

This enumerated operand kind is used for the icmp instruction and corresponds to the condcodes::IntCC` Rust type.

§floatcc: OperandKind

A condition code for comparing floating point values.

This enumerated operand kind is used for the fcmp instruction and corresponds to the condcodes::FloatCC Rust type.

§memflags: OperandKind

Flags for memory operations like load and store.

§trapcode: OperandKind

A trap code indicating the reason for trapping.

The Rust enum type also has a User(u16) variant for user-provided trap codes.

§atomic_rmw_op: OperandKind

A code indicating the arithmetic operation to perform in an atomic_rmw memory access.

Implementations§

source§

impl Immediates

source

pub fn new() -> Self

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> 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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.