Skip to main content

SizedValue

Struct SizedValue 

Source
pub struct SizedValue { /* private fields */ }

Implementations§

Source§

impl SizedValue

Source

pub fn new(value: u64, size: usize) -> Self

Source

pub fn from_bits(value: u128, size: usize) -> Self

Source

pub fn as_bits(&self) -> u128

Trait Implementations§

Source§

impl Clone for SizedValue

Source§

fn clone(&self) -> SizedValue

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 SizedValue

Source§

impl Debug for SizedValue

Source§

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

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

impl DomainValue for SizedValue

Source§

fn size(&self) -> Result<usize, EmulatorErrorKind>

Returns the size of this value in bytes
Source§

fn value(&self) -> Result<u64, EmulatorErrorKind>

Attempt to read this value as a little-endian unsigned integer.
Source§

fn from_u64(value: u64) -> Self

Source§

fn zero(size: usize) -> Self

Creates an all-zero value at size bytes. Domains that track width should override this; the default preserves compatibility for domains that only have a machine-word zero representation.
Source§

fn is_float_nan(&self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_to_float(&self, size: usize) -> Result<Self, EmulatorErrorKind>

Source§

fn float_to_float(&self, size: usize) -> Result<Self, EmulatorErrorKind>

Source§

fn float_to_int(&self, size: usize) -> Result<Self, EmulatorErrorKind>

Source§

fn zext(&self, size: usize) -> Result<Self, EmulatorErrorKind>

Source§

fn sext(&self, size: usize) -> Result<Self, EmulatorErrorKind>

Source§

fn range(&self, start: usize, size: usize) -> Result<Self, EmulatorErrorKind>

Source§

fn byte_swap(&self) -> Result<Self, EmulatorErrorKind>

Source§

fn intrinsic( id: IntrinsicId, args: &[Self], out_size: usize, ) -> Result<Self, EmulatorErrorKind>

Evaluate a pure intrinsic on its concrete operands, producing an out_size-byte result via the intrinsic’s shared evaluator.
Source§

fn pop_count(&self) -> Result<Self, EmulatorErrorKind>

Source§

fn lz_count(&self) -> Result<Self, EmulatorErrorKind>

Source§

fn carry(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn scarry(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn sborrow(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_not(&self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_negate(&self) -> Result<Self, EmulatorErrorKind>

Source§

fn float_negate(&self) -> Result<Self, EmulatorErrorKind>

Source§

fn float_abs(&self) -> Result<Self, EmulatorErrorKind>

Source§

fn float_sqrt(&self) -> Result<Self, EmulatorErrorKind>

Source§

fn float_ceil(&self) -> Result<Self, EmulatorErrorKind>

Source§

fn float_floor(&self) -> Result<Self, EmulatorErrorKind>

Source§

fn float_round(&self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_not_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_less(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_sless(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_less_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_sless_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_add(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_sub(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_xor(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_and(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_or(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_shift_left(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_shift_right(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_sshift_right(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_mul(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_div(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_rem(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_sdiv(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn int_srem(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn float_add(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn float_sub(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn float_mul(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn float_div(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn float_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn float_not_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn float_less(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

Source§

fn float_less_equal(&self, other: &Self) -> Result<Self, EmulatorErrorKind>

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.