The ARMv6-M Architecture Reference Manual section "A6.7.40 MOV (register)" on page A6-140 states that the T1 encoding of the MOV instruction is only available on the ARMv6-M architecture if both the source and destination register are from R0-R7. However arm-none-eabi-as assembles the instruction "MOV r15, r14" without any problems:
$ echo 'mov r15,r14' | arm-none-eabi-as -march=armv6-m
$ arm-none-eabi-objdump -d a.out... 0: 46f7 mov pc, lr
$ arm-none-eabi-objdump -d a.out
0: 46f7 mov pc, lr
Also, this answer on stackoverflow states that it is possible to acces the high registers on the ARMv6-M architecture.
Could this be a mistake in the reference manual? Or am I reading it wrong?
Right, the comment seems to be wrong. In fact, you can move to/from hi-regs.
Thank you. Do you know where such a documentation error can be reported?
The email is noted in the manual.
View all questions in Cortex-M / M-Profile forum