WFI

T32: 16-bit instructions

fixed bit field field the encoding fixes should be

T1

1514131211109876543210
1011111100110000

1011111100110000

Decode Sail

if ConditionPassed() then {
    execute_aarch32_instrs_WFI_Op_A_txt()
};
()

Operation Sail

if not_bool(InterruptPending()) then {
    if PSTATE.EL == EL0 then {
        AArch32_CheckForWFxTrap(EL1, WFxType_WFI)
    };
    if ((PSTATE.EL == EL0 | PSTATE.EL == EL1) & EL2Enabled()) & not_bool(IsInHost()) then {
        AArch32_CheckForWFxTrap(EL2, WFxType_WFI)
    };
    if HaveEL(EL3) & PSTATE.M != M32_Monitor then {
        AArch32_CheckForWFxTrap(EL3, WFxType_WFI)
    };
    let 'localtimeout = (1 << 64);
    WaitForInterrupt(localtimeout)
};
()

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.