Struct UndefinedOutput
pub struct UndefinedOutput<A: Arch> { /* private fields */ }
Expand description
An instruction output that may be undefined.
When the condition returns true, or is None, the target
is undefined.
Implementations§
§impl<A: Arch> UndefinedOutput<A>
impl<A: Arch> UndefinedOutput<A>
pub fn from_target(target: RegOrMem<A>) -> Self
pub fn from_target(target: RegOrMem<A>) -> Self
Creates an unconditionally undefined output.
pub fn with_condition(
self,
condition: SynthesizedComputation,
inputs: Vec<RegOrMem<A>>,
) -> Self
pub fn with_condition( self, condition: SynthesizedComputation, inputs: Vec<RegOrMem<A>>, ) -> Self
Replaces the condition of this undefined output with a new condition.
pub fn only_if_zero(self, target: RegOrMem<A>) -> Self
pub fn only_if_zero(self, target: RegOrMem<A>) -> Self
Replaces the condition of this undefined output with a condition that declares the output undefined only if the value of target
is zero.
pub fn condition(&self) -> Option<&SynthesizedComputation>
pub fn condition(&self) -> Option<&SynthesizedComputation>
The condition under which the output is undefined.
Trait Implementations§
§impl<A: Arch> Debug for UndefinedOutput<A>
impl<A: Arch> Debug for UndefinedOutput<A>
§impl<A: Arch> IntoUndefinedOutputs<A> for UndefinedOutput<A>
impl<A: Arch> IntoUndefinedOutputs<A> for UndefinedOutput<A>
§fn add(self, target: &mut UndefinedOutputs<A>)
fn add(self, target: &mut UndefinedOutputs<A>)
Converts
self
to an undefined output, and adds it to the list of undefined outputs target
.Auto Trait Implementations§
impl<A> Freeze for UndefinedOutput<A>
impl<A> RefUnwindSafe for UndefinedOutput<A>
impl<A> Send for UndefinedOutput<A>
impl<A> Sync for UndefinedOutput<A>
impl<A> Unpin for UndefinedOutput<A>
impl<A> UnwindSafe for UndefinedOutput<A>
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
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more