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

Invalid assembly instruction MOV PC, R13 Cortex M3

Note: This was originally posted on 24th March 2009 at http://forums.arm.com

Hi,

I am trying to compile linux kernel 2.27 with CodeSourcery GNU toolchain 4.3.2 and somehow I am getting assembler error for instruction

MOV PC, R13

Well, for some reason ARM Cortex M3 assembler is not happy with moving link register (LR a.k.a R13) to program counter.

I tried to find some documentation about this issue on arm site but no luck so far. I have a way to find a solution for this which is first moving R13 (LR) to a general purpose register and then moving general purpose register to program counter (PC).

MOV R0, R13
MOV PC, R0

Thanks for the comments.
Parents Reply Children
No data