STR (register)

T32: 16-bit instructions

fixed bit field field the encoding fixes should be

T1

1514131211109876543210
0101000RmRnRt

0101000xxxxxxxxx

Decode Sail

if ConditionPassed() then {
    shift_n : int = undefined;
    shift_t : SRType = undefined;
    let 't = UInt(Rt);
    let 'n = UInt(Rn);
    let 'm = UInt(Rm);
    let index : bool = true;
    let add : bool = true;
    let wback : bool = false;
    (shift_t, shift_n) = (SRType_LSL, 0);
    let 'shift_n = shift_n;
    execute_aarch32_instrs_STR_r_Op_A_txt(add, index, m, n, shift_n, shift_t, t, wback)
};
()

Operation Sail

let offset : bits(32) = Shift(R_read(m), shift_t, shift_n, PSTATE.C);
let offset_addr : bits(32) = if add then R_read(n) + offset else
  R_read(n) - offset;
let address : bits(32) = if index then offset_addr else R_read(n);
data : bits(32) = undefined;
if t == 15 then {
    data = PCStoreValue()
} else {
    data = R_read(t)
};
if not_bool(wback) & t != 15 then {
    AArch32_SetLSInstructionSyndrome(4, false, t, false)
};
MemU_set(address, 4) = data;
if wback then {
    R_set(n) = offset_addr
};
()

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.