SHA1C (vector)

Data processing (scalar floating-point and Advanced SIMD)

fixed bit field field the encoding fixes should be

Vector crypto sha3op sha1 hash choose

313029282726252423222120191817161514131211109876543210
01011110000Rm000000RnRd

01011110000xxxxx000000xxxxxxxxxx

Decode Sail

let 'd = UInt(Rd);
let 'n = UInt(Rn);
let 'm = UInt(Rm);
if not_bool(HaveSHA1Ext()) then {
    throw(Error_Undefined())
};
execute_aarch64_instrs_vector_crypto_sha3op_sha1_hash_choose(d, m, n)

Operation Sail

AArch64_CheckFPAdvSIMDEnabled();
x : bits(128) = V_read(d, 128);
y : bits(32) = V_read(n, 32);
let w : bits(128) = V_read(m, 128);
t : bits(32) = undefined;
foreach (e from 0 to 3 by 1 in inc) {
    t = SHAchoose(x[63 .. 32], x[95 .. 64], x[127 .. 96]);
    y = y + ROL(x[31 .. 0], 5) + t + Elem_read(w, e, 32);
    x[63 .. 32] = ROL(x[63 .. 32], 30);
    (y @ x) = ROL(y @ x, 32)
};
V_set(d, 128) = x

Made from ScarletNX's Sail at 166ad3910f80. sail-arm's definitions are Arm's ASL in Sail (BSD 3-Clause Clear, license); ScarletNX's fixups are GPL-3.0-or-later.