We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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.
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.
Hello,
as you say, the assembler of GCC does not accept r13_<mode> or r14_<mode> but accept sp_<mode> or lr_<mode>.
I think that's absurd.
I agree with you,
Best regards,
Yasuhiko Koumoto.
It is weird, especially when the destination register can be r13, r14 or r15 as well as sp, lr or pc.