Enum cranelift_codegen::data_value::DataValue
source · [−]pub enum DataValue {
}
Expand description
Variants
B(bool)
I8(i8)
I16(i16)
I32(i32)
I64(i64)
I128(i128)
U8(u8)
U16(u16)
U32(u32)
U64(u64)
U128(u128)
F32(Ieee32)
F64(Ieee64)
V128([u8; 16])
V64([u8; 8])
Implementations
sourceimpl DataValue
impl DataValue
sourcepub fn from_integer(
imm: i128,
ty: Type
) -> Result<DataValue, DataValueCastFailure>
pub fn from_integer(
imm: i128,
ty: Type
) -> Result<DataValue, DataValueCastFailure>
Try to cast an immediate integer (a wrapped i64
on most Cranelift instructions) to the
given Cranelift Type.
sourcepub fn write_to_slice(&self, dst: &mut [u8])
pub fn write_to_slice(&self, dst: &mut [u8])
sourcepub unsafe fn write_value_to(&self, p: *mut u128)
pub unsafe fn write_value_to(&self, p: *mut u128)
Write a DataValue to a memory location.
sourcepub unsafe fn read_value_from(p: *const u128, ty: Type) -> Self
pub unsafe fn read_value_from(p: *const u128, ty: Type) -> Self
sourcepub fn bitwise_eq(&self, other: &DataValue) -> bool
pub fn bitwise_eq(&self, other: &DataValue) -> bool
Performs a bitwise comparison over the contents of DataValue.
Returns true if all bits are equal.
This behaviour is different from PartialEq for NaN floats.
Trait Implementations
sourceimpl PartialOrd<DataValue> for DataValue
impl PartialOrd<DataValue> for DataValue
sourcefn partial_cmp(&self, other: &DataValue) -> Option<Ordering>
fn partial_cmp(&self, other: &DataValue) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for DataValue
impl Send for DataValue
impl Sync for DataValue
impl Unpin for DataValue
impl UnwindSafe for DataValue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more