Struct Lanes4Word32
#[repr(C, align(16))]pub struct Lanes4Word32(pub [u32; 4]);Expand description
Four lanes of Word32 = one 128-bit register (__m128i) — the SHA-1 state/message carrier. Unlike
the arithmetic lane types, its vocabulary is the four Intel SHA operations (sha1rnds4/sha1msg1/
sha1msg2/sha1nexte), so SHA-1 WRITTEN in Logos over these compiles to the sha1rnds4 hardware
sequence (AOT) and runs the byte-identical software spec [crate::sha_ops] on the interpreter.
Lane i is bits [32i+31 : 32i] — index 0 low, index 3 high — matching _mm_loadu_si128.
Tuple Fields§
§0: [u32; 4]Implementations§
§impl Lanes4Word32
impl Lanes4Word32
pub const fn splat(x: u32) -> Lanes4Word32
pub const fn splat(x: u32) -> Lanes4Word32
Broadcast one value into all four lanes.
pub fn from_words(s: &[Word32]) -> Lanes4Word32
pub fn from_words(s: &[Word32]) -> Lanes4Word32
Pack the first four Word32s of a slice (shorter slices zero-fill), lane 0 = element 0.
pub fn sha1rnds4(self, msg: Lanes4Word32, func: u32) -> Lanes4Word32
pub fn sha1rnds4(self, msg: Lanes4Word32, func: u32) -> Lanes4Word32
Four SHA-1 rounds (sha1rnds4), func ∈ 0..=3 — the Intel SHA-NI instruction when the CPU has
it, else the byte-identical software spec ([crate::sha_ops], proven equal by fuzz). self is
the ABCD state, msg the four message dwords with the round’s E folded in.
pub fn sha1msg1(self, o: Lanes4Word32) -> Lanes4Word32
pub fn sha1msg1(self, o: Lanes4Word32) -> Lanes4Word32
Message-schedule step 1 (sha1msg1).
pub fn sha1msg2(self, o: Lanes4Word32) -> Lanes4Word32
pub fn sha1msg2(self, o: Lanes4Word32) -> Lanes4Word32
Message-schedule step 2 (sha1msg2).
pub fn sha1nexte(self, o: Lanes4Word32) -> Lanes4Word32
pub fn sha1nexte(self, o: Lanes4Word32) -> Lanes4Word32
Fold the next round constant E (sha1nexte).
pub fn add(self, o: Lanes4Word32) -> Lanes4Word32
pub fn add(self, o: Lanes4Word32) -> Lanes4Word32
Lane-wise wrapping add (_mm_add_epi32) — folds the round E into the message dwords and the
per-block state back into the running hash. LLVM lowers the four-lane loop to one paddd.
pub fn bitxor(self, o: Lanes4Word32) -> Lanes4Word32
pub fn bitxor(self, o: Lanes4Word32) -> Lanes4Word32
Lane-wise XOR (_mm_xor_si128) — the message-schedule W_t ⊕ W_{t-2} coupling; lowers to pxor.
Trait Implementations§
§impl Add for Lanes4Word32
impl Add for Lanes4Word32
§type Output = Lanes4Word32
type Output = Lanes4Word32
+ operator.§fn add(self, o: Lanes4Word32) -> Lanes4Word32
fn add(self, o: Lanes4Word32) -> Lanes4Word32
+ operation. Read more§impl BitXor for Lanes4Word32
impl BitXor for Lanes4Word32
§type Output = Lanes4Word32
type Output = Lanes4Word32
^ operator.§fn bitxor(self, o: Lanes4Word32) -> Lanes4Word32
fn bitxor(self, o: Lanes4Word32) -> Lanes4Word32
^ operation. Read more§impl Clone for Lanes4Word32
impl Clone for Lanes4Word32
§fn clone(&self) -> Lanes4Word32
fn clone(&self) -> Lanes4Word32
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for Lanes4Word32
impl Debug for Lanes4Word32
§impl Hash for Lanes4Word32
impl Hash for Lanes4Word32
§impl PartialEq for Lanes4Word32
impl PartialEq for Lanes4Word32
impl Copy for Lanes4Word32
impl Eq for Lanes4Word32
impl StructuralPartialEq for Lanes4Word32
Auto Trait Implementations§
impl Freeze for Lanes4Word32
impl RefUnwindSafe for Lanes4Word32
impl Send for Lanes4Word32
impl Sync for Lanes4Word32
impl Unpin for Lanes4Word32
impl UnsafeUnpin for Lanes4Word32
impl UnwindSafe for Lanes4Word32
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.