MUL

T32: 16-bit instructions

fixed bit field field the encoding fixes should be

T1

1514131211109876543210
0100001101RnRdm

0100001101xxxxxx

Decode Sail

if ConditionPassed() then {
    let 'd = UInt(Rdm);
    let 'n = UInt(Rn);
    let 'm = UInt(Rdm);
    let setflags : bool = not_bool(InITBlock());
    execute_aarch32_instrs_MUL_Op_A_txt(d, m, n, setflags)
};
()

Operation Sail

if ArchVersion() == 4 then {
    TraceMultiplier(R_read(m));
    if setflags then {
        MultiplyCarry()
    }
};
let 'operand1 = SInt(R_read(n));
let 'operand2 = SInt(R_read(m));
let 'result = operand1 * operand2;
R_set(d) = result[31 .. 0];
if setflags then {
    PSTATE.N = [result[31]];
    PSTATE.Z = IsZeroBit(result[31 .. 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.