Most armv7-a implementations support a number of basic extensions to the
architecture which are not particularly important to the compiler, but
can matter if code contains inline assembly.  This patch adds support
for these extensions, based on the capabilities that GAS already
provides for the appropriate CPUs.  For the purposes of multilib
selection we ignore these extensions entirely and map the extended
architecture versions down to the base versions we have already support for.

gcc:
        PR target/88799
        * config/arm/arm-cpus.in (mp): New feature.
        (sec): New feature.
        (fgroup ARMv7ve): Add mp and sec features.
        (arch armv7-a): Add options to allow mp and sec extensions.
        (cpu generic-armv7-a): Add options to allow mp and sec extensions.
        (cpu cortex-a5, cpu cortex-7, cpu cortex-a9): Add mp and sec
        extenstions to the base architecture.
        (cpu cortex-a8): Add sec extension to the base architecture.
        (cpu marvell-pj4): Add mp and sec extensions to the base architecture.
        * config/arm/t-aprofile (MULTILIB_MATCHES): Map all armv7-a arch
        variants down to the base v7-a varaint.
        * config/arm/t-multilib (v7_a_arch_variants): New variable.
        * doc/invoke.texi (ARM Options): Add +mp and +sec to the list
        of permitted extensions for -march=armv7-a and for
        -mcpu=generic-armv7-a.

testsuite:
        * gcc.target/arm/multilib.exp (config "aprofile"): Add tests for
        mp and sec extensions to armv7-a.

Applied to trunk.  There are a couple of minor tweaks needed for the
backport to gcc-8.  I'll post those shortly.

Reply via email to