A32: data processing and miscellaneous instructions
fixed bit field field the encoding fixes should be
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| cond | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | Rn | 0 | 0 | 0 | 0 | Rs | 0 | stype | 1 | Rm | |||||||||||||
xxxx00010001xxxx0000xxxx0xx1xxxx
cond != 1111
if ConditionPassed() then {
assert(cond != 0b1111);
let 'n = UInt(Rn);
let 'm = UInt(Rm);
let 's = UInt(Rs);
let shift_t : SRType = DecodeRegShift(stype);
if (n == 15 | m == 15) | s == 15 then {
throw(Error_Unpredictable())
};
execute_aarch32_instrs_TST_rr_Op_A_txt(m, n, s, shift_t)
};
()
carry : bits(1) = undefined; shifted : bits(32) = undefined; let 'shift_n = UInt(R_read(s)[7 .. 0]); (shifted, carry) = Shift_C(R_read(m), shift_t, shift_n, PSTATE.C); let result : bits(32) = R_read(n) & shifted; 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.