This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cortex-M0 Thumb-2 instruction: Is this instruction valid?

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.

Parents
  • 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.

Reply
  • 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.

Children