I don't really see anything odd in DP instructions. There are several other obscurities that don't look right, no sane compiler would make use of them but perhaps some hand-crafted assembly?
- Block transfer will always load the new value from memory over any base writeback. Easiest way to fix this is to modify lines 1638 & 1665 to check for presence of rb in bit mask. If it's there, the writeback should not happen.
- Block transfer store does indeed add +12 to stored R15. There's a log to catch that in the code but no actual addition takes place?
- Block transfer store with base writeback will store either unmodified base, if it's the very first register on the list, or fully modified in any other case. That by the way means you need to check the mask in correct order - and that is R0 first, R15 last. Decrementing transfers actually happen bottom to top beacuse of that.
- I'm quite puzzled as to how PSR Transfer is supposed to work. There are tons of variables in that procedure, named "newval", actualy holding the old value, then being refreshed, and then not used? Lines 1202 & 1205 - is this correct?