fixed bit field field the encoding fixes should be
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| 1 | 1 | 0 | 0 | 1 | Rn | register_list | |||||||||
11001xxxxxxxxxxx
if ConditionPassed() then {
let 'n = UInt(Rn);
let registers : bits(16) = 0b00000000 @ register_list;
let wback : bool = [registers[n]] == 0b0;
if BitCount(registers) < 1 then {
throw(Error_Unpredictable())
};
execute_aarch32_instrs_LDM_Op_A_txt(n, registers, wback)
};
()
if BitCount(registers) == 0 then {
throw(Error_Undefined())
};
address : bits(32) = R_read(n);
GuestTransfer(address, 4 * BitCount(registers), false);
foreach (i from 0 to 14 by 1 in inc) {
if [registers[i]] == 0b1 then {
R_set(i) = MemS_read(address, 4);
address = address + 4
};
()
};
if [registers[15]] == 0b1 then {
LoadWritePC(MemS_read(address, 4))
};
if wback & [registers[n]] == 0b0 then {
R_set(n) = R_read(n) + 4 * BitCount(registers)
};
if wback & [registers[n]] == 0b1 then {
R_set(n) = __UNKNOWN_bits(32)
};
()
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.