Enum cranelift_codegen::data_value::DataValue
source · pub enum DataValue {
}
Expand description
Variants§
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§
source§impl 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_ne(&self, dst: &mut [u8])
pub fn write_to_slice_ne(&self, dst: &mut [u8])
sourcepub fn write_to_slice_be(&self, dst: &mut [u8])
pub fn write_to_slice_be(&self, dst: &mut [u8])
sourcepub fn write_to_slice_le(&self, dst: &mut [u8])
pub fn write_to_slice_le(&self, dst: &mut [u8])
sourcepub fn read_from_slice_ne(src: &[u8], ty: Type) -> Self
pub fn read_from_slice_ne(src: &[u8], ty: Type) -> Self
sourcepub fn read_from_slice_be(src: &[u8], ty: Type) -> Self
pub fn read_from_slice_be(src: &[u8], ty: Type) -> Self
sourcepub fn read_from_slice_le(src: &[u8], ty: Type) -> Self
pub fn read_from_slice_le(src: &[u8], ty: Type) -> Self
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 in native-endian byte order.
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§
source§impl PartialEq<DataValue> for DataValue
impl PartialEq<DataValue> for DataValue
source§impl PartialOrd<DataValue> for DataValue
impl PartialOrd<DataValue> for DataValue
1.0.0 · source§fn 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 moreAuto Trait Implementations§
impl RefUnwindSafe for DataValue
impl Send for DataValue
impl Sync for DataValue
impl Unpin for DataValue
impl UnwindSafe for DataValue
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