Data processing (scalar floating-point and Advanced SIMD)
fixed bit field field the encoding fixes should be
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 1 | 1 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | Rm | 1 | 1 | 0 | 0 | 0 | 0 | Rn | Rd | ||||||||||||
11001110011xxxxx110000xxxxxxxxxx
if not_bool(HaveSM3Ext()) then {
throw(Error_Undefined())
};
let 'd = UInt(Rd);
let 'n = UInt(Rn);
let 'm = UInt(Rm);
execute_aarch64_instrs_vector_crypto_sm3_sm3partw1(d, m, n)
AArch64_CheckFPAdvSIMDEnabled();
let Vm : bits(128) = V_read(m, 128);
let Vn : bits(128) = V_read(n, 128);
let Vd : bits(128) = V_read(d, 128);
result : bits(128) = undefined;
result[95 .. 0] = EOR(EOR(Vd, Vn)[95 .. 0], (ROL(Vm[127 .. 96], 15) @ ROL(Vm[95 .. 64], 15)) @ ROL(Vm[63 .. 32], 15));
foreach (i from 0 to 3 by 1 in inc) {
if i == 3 then {
result[127 .. 96] = EOR(EOR(Vd, Vn)[127 .. 96], ROL(result[31 .. 0], 15))
};
result[32 * i + 31 .. 32 * i] = EOR(EOR(result[32 * i + 31 .. 32 * i], ROL(result[32 * i + 31 .. 32 * i], 15)), ROL(result[32 * i + 31 .. 32 * i], 23))
};
V_set(d, 128) = result
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.