ASR (register)

T32: 16-bit instructions

fixed bit field field the encoding fixes should be

T1

1514131211109876543210
0100000100RmRdn

0100000100xxxxxx

Decode Sail

if ConditionPassed() then {
    let 'd = UInt(Rdn);
    let 'n = UInt(Rdn);
    let 'm = UInt(Rm);
    let setflags : bool = not_bool(InITBlock());
    execute_aarch32_instrs_ASR_r_Op_A_txt(d, m, n, setflags)
};
()

Operation Sail

carry : bits(1) = undefined;
result : bits(32) = undefined;
let 'shift_n = UInt(R_read(m)[7 .. 0]);
(result, carry) = Shift_C(R_read(n), SRType_ASR, shift_n, PSTATE.C);
R_set(d) = result;
if setflags then {
    PSTATE.N = [result[31]];
    PSTATE.Z = IsZeroBit(result);
    PSTATE.C = carry
};
()

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.