STM r0!, {}
I have looked at Thumb2 instruction set web but I can't find the behaviour of STM command if the reglist is empty.
Thanks in advance.
Looking at the spec it says for encoding T2
if n == 15 || BitCount(registers) < 2 then UNPREDICTABLE;
So the effect if you have even only one register in the list never mind zero is not defined. I must admit to be a bit surprised when I saw this, for ARM it is undefined only for zero registers, same for encoding T1.
Just noticed you are talking about the M0 which has the ARMv6-M instruction set not ARMv7-M. It excludes most of the 32 bit Thumb-2 instructions including the T2 form of LDMIA.