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

Funny asymmetry with banked register names

Is there a reason why banked registers SP and LR can't be accessed as r13_<mode> or r14_<mode>, but

one has to use SP_<mode> or LR_<mode> instead? It makes macros and inline assembly difficult.

In document (ARMv7-A/R ARM Issue C) it says:

Software using an MRS (Banked register) or MSR (Banked register) instruction specifies one of these registers using a

name shown in Figure B9-1, or an alternative name for SP or LR.

But in both the figure and the text the names are the same: SP or LR. There is no alternative.

Parents
  • Maybe considering them as regular registers r13/14 is deprecated? Especially for SP, a lot of operations are deprecated in ARMv7. With LR is seem less critical, but there might be core internals like a return stack that don't work too well if it is used as general purpose r14?

Reply
  • Maybe considering them as regular registers r13/14 is deprecated? Especially for SP, a lot of operations are deprecated in ARMv7. With LR is seem less critical, but there might be core internals like a return stack that don't work too well if it is used as general purpose r14?

Children
No data