https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64224
Bug ID: 64224
Summary: [ARM] -mapcs -marm uses deprecated forms (as of
ARMv7-A) of LDM in epilogues
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: ktkachov at gcc dot gnu.org
Reporter: ktkachov at gcc dot gnu.org
Target: arm*
The ARMv7-A specification says on the load-multiple (LDM) instruction:
"The SP can be in the list. However, ARM deprecates using these instructions
with SP in the list."
and
"ARM deprecates using these instructions with both the LR and the PC in the
list."
However GCC generates both forms in function epilogues when compiling with
-mapcs. gas doesn't have a warning for these (I'm working on a patch to add
those to gas) which is probably why this hasn't been noticed yet.
We should fix GCC so that it doesn't generate deprecated sequences for ARMv7-A
and later.