SHA1P

SHA1 hash update (parity)

SHA1 hash update (parity).

Encoding: Advanced SIMD

Variants: FEAT_SHA1 (ARMv8.0)

313029282726252423222120191817161514131211109876543210
01011110000000100
sizeRmopcodeRnRd

SHA1P <Qd>, <Sn>, <Vm>.4S

Decoding algorithm

if !IsFeatureImplemented(FEAT_SHA1) then EndOfDecode(Decode_UNDEF);
constant integer d = UInt(Rd);
constant integer n = UInt(Rn);
constant integer m = UInt(Rm);

Operation

AArch64.CheckFPAdvSIMDEnabled();

bits(128) x = V[d, 128];
bits(32)  y = V[n, 32];    // Note: 32 not 128 bits wide
constant bits(128) w = V[m, 128];

for e = 0 to 3
    constant bits(32) t = SHAparity(x<63:32>, x<95:64>, x<127:96>);
    y = y + ROL(x<31:0>, 5) + t + Elem[w, e, 32];
    x<63:32> = ROL(x<63:32>, 30);
    constant bits(160) yx = ROL(y:x, 32);
    (y, x) = (yx<159:128>, yx<127:0>);
V[d, 128] = x;

Explanations

<Qd>: Is the 128-bit name of the SIMD&FP source and destination, encoded in the "Rd" field.
<Sn>: Is the 32-bit name of the second SIMD&FP source register, encoded in the "Rn" field.
<Vm>: Is the name of the third SIMD&FP source register, encoded in the "Rm" field.

Operational Notes

If PSTATE.DIT is 1: