"""
In ARM code or pre-Thumb-2 Thumb code, if Rn is in reglist, and writeback is specified with the ! suffix:
if the instruction is STM or STMIA and Rn is the lowest-numbered register in reglist, the initial value of Rn is stored
otherwise, the loaded or stored value of Rn cannot be relied upon.
"""
The function gum_arm_writer_put_ldmia_reg_mask, however, prohibits the use of Rn in the reglist even though it is writing an LDM rather than an STM.
The documentation states that:
""" In ARM code or pre-Thumb-2 Thumb code, if Rn is in reglist, and writeback is specified with the ! suffix:
if the instruction is STM or STMIA and Rn is the lowest-numbered register in reglist, the initial value of Rn is stored otherwise, the loaded or stored value of Rn cannot be relied upon. """
The function
gum_arm_writer_put_ldmia_reg_mask
, however, prohibits the use of Rn in the reglist even though it is writing an LDM rather than an STM.