Enum Operation

Source
pub enum Operation {
Show 25 variants Add(Value, Value), Subtract(Value, Value), Multiply(Value, Value), DivideUnsigned(Value, Value), DivideSigned(Value, Value), ShiftLeft(Value, Value), ShiftRightUnsigned(Value, Value), ShiftRightSigned(Value, Value), Modulo(Value, Value), And(Value, Value), InclusiveOr(Value, Value), ExclusiveOr(Value, Value), Equal(Value, Value), LessOrEqualUnsigned(Value, Value), LessOrEqualSigned(Value, Value), LessUnsigned(Value, Value), LessSigned(Value, Value), ZeroExtend(usize, Value), SignExtend(usize, Value), Move(Value), Initialize(StrRef, usize), Select(usize, usize, Value), Assume(Constraint, Value), Load(Segment, Endianess, usize, Value), Phi(Value, Value, Value),
}
Expand description

A RREIL operation.

Variants§

§

Add(Value, Value)

Integer addition

§

Subtract(Value, Value)

Integer subtraction

§

Multiply(Value, Value)

Unsigned integer multiplication

§

DivideUnsigned(Value, Value)

Unsigned integer division

§

DivideSigned(Value, Value)

Signed integer division

§

ShiftLeft(Value, Value)

Bitwise left shift

§

ShiftRightUnsigned(Value, Value)

Bitwise logical right shift

§

ShiftRightSigned(Value, Value)

Bitwise arithmetic right shift

§

Modulo(Value, Value)

Integer modulo

§

And(Value, Value)

Bitwise logical and

§

InclusiveOr(Value, Value)

Bitwise logical or

§

ExclusiveOr(Value, Value)

Bitwise logical xor

§

Equal(Value, Value)

Compare both operands for equality and returns 1 or 0

§

LessOrEqualUnsigned(Value, Value)

Returns 1 if the first operand is less than or equal to the second and 0 otherwise. Comparison assumes unsigned values.

§

LessOrEqualSigned(Value, Value)

Returns 1 if the first operand is less than or equal to the second and 0 otherwise. Comparison assumes signed values.

§

LessUnsigned(Value, Value)

Returns 1 if the first operand is less than the second and 0 otherwise. Comparison assumes unsigned values.

§

LessSigned(Value, Value)

Returns 1 if the first operand is less than the second and 0 otherwise. Comparison assumes signed values.

§

ZeroExtend(usize, Value)

Zero extends the operand.

§

SignExtend(usize, Value)

Sign extends the operand.

§

Move(Value)

Copies the operand without modification.

§

Initialize(StrRef, usize)

Initializes a global variable.

§

Select(usize, usize, Value)

Copies only the range [self.0, self.0 + self.1] of bits from the operand.

§

Assume(Constraint, Value)

Asserts that the second operand is constraint by the first.

§

Load(Segment, Endianess, usize, Value)

Reads a memory cell

§

Phi(Value, Value, Value)

SSA Phi function

Implementations§

Source§

impl Operation

Source

pub fn reads<'x>(&'x self) -> SmallVec<[&'x Value; 3]>

Returns references values that are read by the operation.

Source

pub fn reads_mut<'x>(&'x mut self) -> SmallVec<[&'x mut Value; 3]>

Returns mutables references values that are read by the operation.

Source

pub fn execute(&self) -> Result<Value>

Executes a RREIL operation returning the result.

Trait Implementations§

Source§

impl Arbitrary for Operation

Source§

fn arbitrary<G: Gen>(g: &mut G) -> Self

Source§

fn shrink(&self) -> Box<dyn Iterator<Item = Self>>

Source§

impl Clone for Operation

Source§

fn clone(&self) -> Operation

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Operation

Source§

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

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

impl PartialEq for Operation

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Operation

Source§

impl StructuralPartialEq for Operation

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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 = 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.