CPS

T32: 16-bit instructions

fixed bit field field the encoding fixes should be

T1

1514131211109876543210
10110110011im0AIF

10110110011x0xxx

Decode Sail

mode : bits(5) = undefined;
if ((A @ I) @ F) == 0b000 then {
    throw(Error_Unpredictable())
};
let mode = mode;
let enable : bool = im == 0b0;
let disable : bool = im == 0b1;
let changemode : bool = false;
let affectA : bool = A == 0b1;
let affectI : bool = I == 0b1;
let affectF : bool = F == 0b1;
if InITBlock() then {
    throw(Error_Unpredictable())
};
execute_aarch32_instrs_CPS_OpT_AS_txt(affectA, affectF, affectI, changemode, disable, enable, mode)

Operation Sail

if PSTATE.EL != EL0 then {
    if enable then {
        if affectA then {
            PSTATE.A = 0b0
        };
        if affectI then {
            PSTATE.I = 0b0
        };
        if affectF then {
            PSTATE.F = 0b0
        };
        ()
    };
    if disable then {
        if affectA then {
            PSTATE.A = 0b1
        };
        if affectI then {
            PSTATE.I = 0b1
        };
        if affectF then {
            PSTATE.F = 0b1
        };
        ()
    };
    if changemode then {
        AArch32_WriteModeByInstr(mode)
    };
    ()
};
()

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.