sha1nexte
SHA1 State Variable E
SHA1NEXTE xmm1, xmm2/m128
Calculates SHA1 state variable E.
Details
Calculates intermediate SHA-1 state variable E for one round, adding the source operand (containing message schedule and round constants) to the destination operand and applying left rotation. The result updates the destination with the next E value; no flags are affected.
Pseudocode Operation
E ← dest[0];
W ← src[0];
dest[0] ← ROTL32(E, 5) + W;
dest[1..3] ← dest[1..3] rotated left by 30 bits from the previous round state;
Example
SHA1NEXTE xmm1, xmm2/m128
Encoding
Binary Layout
0F
+0
38
+1
C8
+2
Operands
-
dest
128-bit XMM SIMD register -
src
128-bit XMM SIMD register or Memory operand
Reference (Intel® SDM)
Instruction Forms
| Opcode | Instruction | Op/En | 64/32-bit Mode | CPUID | Description |
|---|---|---|---|---|---|
| NP 0F 38 C8 /r | SHA1NEXTE xmm1, xmm2/m128 | RM | V/V | SHA | Calculates SHA1 state variable E after four rounds of operation from the current SHA1 state variable A in xmm1. The calculated value of the SHA1 state variable E is added to the scheduled dwords in xmm2/m128, and stored with some of the scheduled dwords in xmm1. |
Description
The SHA1NEXTE calculates the SHA1 state variable E after four rounds of operation from the current SHA1 state variable A in the destination operand. The calculated value of the SHA1 state variable E is added to the source operand, which contains the scheduled dwords.
Operation
SHA1NEXTE TMP := (SRC1[127:96] ROL 30); DEST[127:96] := SRC2[127:96] + TMP; DEST[95:64] := SRC2[95:64]; DEST[63:32] := SRC2[63:32]; DEST[31:0] := SRC2[31:0];
Intel C/C++ Compiler Intrinsic Equivalent
SHA1NEXTE __m128i _mm_sha1nexte_epu32(__m128i, __m128i);
Flags Affected
None.
Exceptions
SIMD Floating-Point Exceptions
None.
Other Exceptions
See Table 2-21, “Type 4 Class Exception Conditions.”
SHA1NEXTE—Calculate SHA1 State Variable E After Four Rounds Vol. 2B 4-632