RMIF

Data processing (register)

fixed bit field field the encoding fixes should be

Integer flags rmif

313029282726252423222120191817161514131211109876543210
10111010000imm600001Rn0mask
sf

10111010000xxxxxx00001xxxxx0xxxx

Decode Sail

if not_bool(HaveFlagManipulateExt()) | sf != 0b1 then {
    throw(Error_Undefined())
};
let 'lsb = UInt(imm6);
let 'n = UInt(Rn);
execute_aarch64_instrs_integer_flags_rmif(lsb, mask, n)

Operation Sail

let tmpreg : bits(64) = X_read(n, 64);
let tmp : bits(4) = (tmpreg @ tmpreg)[lsb + 3 .. lsb];
if [mask[3]] == 0b1 then {
    PSTATE.N = [tmp[3]]
};
if [mask[2]] == 0b1 then {
    PSTATE.Z = [tmp[2]]
};
if [mask[1]] == 0b1 then {
    PSTATE.C = [tmp[1]]
};
if [mask[0]] == 0b1 then {
    PSTATE.V = [tmp[0]]
};
()

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.