STRB (immediate)

T32: 16-bit instructions

fixed bit field field the encoding fixes should be

T1

1514131211109876543210
01110imm5RnRt

01110xxxxxxxxxxx

Decode Sail

if ConditionPassed() then {
    let 't = UInt(Rt);
    let 'n = UInt(Rn);
    let imm32 : bits(32) = ZeroExtend(imm5, 32);
    let index : bool = true;
    let add : bool = true;
    let wback : bool = false;
    execute_aarch32_instrs_STRB_i_OpT_A_txt(add, imm32, index, n, t, wback)
};
()

Operation Sail

let offset_addr : bits(32) = if add then R_read(n) + imm32 else
  R_read(n) - imm32;
let address : bits(32) = if index then offset_addr else R_read(n);
if not_bool(wback) & t != 15 then {
    AArch32_SetLSInstructionSyndrome(1, false, t, false)
};
MemU_set(address, 1) = R_read(t)[7 .. 0];
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.