pub struct ImulConstraint(pub [Operand; 4]);Expand description
IMUL constraint: A * B = (HI << 64) | LO.
64-bit unsigned integer multiplication producing 128-bit result split into high and low 64-bit words.
The operands are stored in the order given by ImulConstraint::OPERAND_NAMES.
Tuple Fields§
§0: [Operand; 4]Implementations§
Source§impl ImulConstraint
impl ImulConstraint
Sourcepub const KIND: ConstraintKind = ConstraintKind::Imul
pub const KIND: ConstraintKind = ConstraintKind::Imul
Kind of this constraint.
Sourcepub const OPERAND_NAMES: [&'static str; 4]
pub const OPERAND_NAMES: [&'static str; 4]
Names of the operands, in storage order.
Sourcepub const fn lo(&self) -> &Operand
pub const fn lo(&self) -> &Operand
LO operand.
The low 64 bits of the result of the multiplication.
Sourcepub const fn hi(&self) -> &Operand
pub const fn hi(&self) -> &Operand
HI operand.
The high 64 bits of the result of the multiplication.
Sourcepub fn verify(&self, values: &ValueVec) -> Result<(), ConstraintViolation>
pub fn verify(&self, values: &ValueVec) -> Result<(), ConstraintViolation>
Checks that the product of operands A and B equals the HI and LO word pair.
The product is formed over the 128-bit integers. Nothing is truncated before it is split into the two 64-bit halves.
§Errors
Returns the evaluated operands, alongside the halves the product actually has.
Trait Implementations§
Source§impl AsRef<[Vec<ShiftedValueIndex>; 4]> for ImulConstraint
impl AsRef<[Vec<ShiftedValueIndex>; 4]> for ImulConstraint
Source§impl Clone for ImulConstraint
impl Clone for ImulConstraint
Source§fn clone(&self) -> ImulConstraint
fn clone(&self) -> ImulConstraint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImulConstraint
impl Debug for ImulConstraint
Source§impl Default for ImulConstraint
impl Default for ImulConstraint
Source§fn default() -> ImulConstraint
fn default() -> ImulConstraint
Returns the “default value” for a type. Read more
Source§impl DeserializeBytes for ImulConstraint
impl DeserializeBytes for ImulConstraint
fn deserialize(read_buf: impl Buf) -> Result<Self, SerializationError>where
Self: Sized,
Source§impl SerializeBytes for ImulConstraint
impl SerializeBytes for ImulConstraint
Auto Trait Implementations§
impl Freeze for ImulConstraint
impl RefUnwindSafe for ImulConstraint
impl Send for ImulConstraint
impl Sync for ImulConstraint
impl Unpin for ImulConstraint
impl UnsafeUnpin for ImulConstraint
impl UnwindSafe for ImulConstraint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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