arm: add armv9-a architecture to -march
Commit Message
Hi,
This patch is adding `armv9-a` to -march in Arm GCC.
In this patch:
+ Add `armv9-a` to -march.
+ Update multilib with armv9-a and armv9-a+simd.
After this patch three additional multilib directories are available:
$ arm-none-eabi-gcc --print-multi-lib
.;
[...vanilla multi-lib dirs...]
thumb/v9-a/nofp;@mthumb@march=armv9-a@mfloat-abi=soft
thumb/v9-a+simd/softfp;@mthumb@march=armv9-a+simd@mfloat-abi=softfp
thumb/v9-a+simd/hard;@mthumb@march=armv9-a+simd@mfloat-abi=hard
New multi-lib directories under
$GCC_INSTALL_DIE/lib/gcc/arm-none-eabi/12.0.0/thumb are created:
thumb/
+--- v9-a
| |--- nofp
|
+--- v9-a+simd
|--- hard
|--- softfp
Regtested on arm-none-eabi cross and no issues.
OK for master?
gcc/ChangeLog:
* config/arm/arm-cpus.in (armv9): New define.
(ARMv9a): New group.
(armv9-a): New arch definition.
* config/arm/arm-tables.opt: Regenerate.
* config/arm/arm.h (BASE_ARCH_9A): New arch enum value.
* config/arm/t-aprofile: Added armv9-a and armv9+simd.
* config/arm/t-arm-elf: Added arm9-a, v9_fps and all_v9_archs
to MULTILIB_MATCHES.
* config/arm/t-multilib: Added v9_a_nosimd_variants and
v9_a_simd_variants to MULTILIB_MATCHES.
* doc/invoke.texi: Update docs.
gcc/testsuite/ChangeLog:
* gcc.target/arm/multilib.exp: Update test with armv9-a entries.
* lib/target-supports.exp (v9a): Add new armflag.
(__ARM_ARCH_9A__): Add new armdef.
Comments
Ping :)
> -----Original Message-----
> From: Przemyslaw Wirkus
> Sent: 18 October 2021 10:37
> To: gcc-patches@gcc.gnu.org
> Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>; Ramana
> Radhakrishnan <Ramana.Radhakrishnan@arm.com>; Kyrylo Tkachov
> <Kyrylo.Tkachov@arm.com>; nickc@redhat.com
> Subject: [PATCH][GCC] arm: add armv9-a architecture to -march
>
> Hi,
>
> This patch is adding `armv9-a` to -march in Arm GCC.
>
> In this patch:
> + Add `armv9-a` to -march.
> + Update multilib with armv9-a and armv9-a+simd.
>
> After this patch three additional multilib directories are available:
>
> $ arm-none-eabi-gcc --print-multi-lib
> .;
> [...vanilla multi-lib dirs...]
> thumb/v9-a/nofp;@mthumb@march=armv9-a@mfloat-abi=soft
> thumb/v9-a+simd/softfp;@mthumb@march=armv9-a+simd@mfloat-
> abi=softfp
> thumb/v9-a+simd/hard;@mthumb@march=armv9-a+simd@mfloat-
> abi=hard
>
> New multi-lib directories under
> $GCC_INSTALL_DIE/lib/gcc/arm-none-eabi/12.0.0/thumb are created:
>
> thumb/
> +--- v9-a
> | |--- nofp
> |
> +--- v9-a+simd
> |--- hard
> |--- softfp
>
> Regtested on arm-none-eabi cross and no issues.
>
> OK for master?
>
> gcc/ChangeLog:
>
> * config/arm/arm-cpus.in (armv9): New define.
> (ARMv9a): New group.
> (armv9-a): New arch definition.
> * config/arm/arm-tables.opt: Regenerate.
> * config/arm/arm.h (BASE_ARCH_9A): New arch enum value.
> * config/arm/t-aprofile: Added armv9-a and armv9+simd.
> * config/arm/t-arm-elf: Added arm9-a, v9_fps and all_v9_archs
> to MULTILIB_MATCHES.
> * config/arm/t-multilib: Added v9_a_nosimd_variants and
> v9_a_simd_variants to MULTILIB_MATCHES.
> * doc/invoke.texi: Update docs.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.target/arm/multilib.exp: Update test with armv9-a entries.
> * lib/target-supports.exp (v9a): Add new armflag.
> (__ARM_ARCH_9A__): Add new armdef.
>
> --
> kind regards,
> Przemyslaw Wirkus
Hi Przemek,
> -----Original Message-----
> From: Przemyslaw Wirkus <Przemyslaw.Wirkus@arm.com>
> Sent: Monday, November 8, 2021 10:34 AM
> To: gcc-patches@gcc.gnu.org
> Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>; Ramana
> Radhakrishnan <Ramana.Radhakrishnan@arm.com>; Kyrylo Tkachov
> <Kyrylo.Tkachov@arm.com>; nickc@redhat.com
> Subject: RE: [PATCH][GCC] arm: add armv9-a architecture to -march
>
> Ping :)
>
> > -----Original Message-----
> > From: Przemyslaw Wirkus
> > Sent: 18 October 2021 10:37
> > To: gcc-patches@gcc.gnu.org
> > Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>; Ramana
> > Radhakrishnan <Ramana.Radhakrishnan@arm.com>; Kyrylo Tkachov
> > <Kyrylo.Tkachov@arm.com>; nickc@redhat.com
> > Subject: [PATCH][GCC] arm: add armv9-a architecture to -march
> >
> > Hi,
> >
> > This patch is adding `armv9-a` to -march in Arm GCC.
> >
> > In this patch:
> > + Add `armv9-a` to -march.
> > + Update multilib with armv9-a and armv9-a+simd.
> >
> > After this patch three additional multilib directories are available:
> >
> > $ arm-none-eabi-gcc --print-multi-lib
> > .;
> > [...vanilla multi-lib dirs...]
> > thumb/v9-a/nofp;@mthumb@march=armv9-a@mfloat-abi=soft
> > thumb/v9-a+simd/softfp;@mthumb@march=armv9-a+simd@mfloat-
> > abi=softfp
> > thumb/v9-a+simd/hard;@mthumb@march=armv9-a+simd@mfloat-
> > abi=hard
> >
> > New multi-lib directories under
> > $GCC_INSTALL_DIE/lib/gcc/arm-none-eabi/12.0.0/thumb are created:
> >
> > thumb/
> > +--- v9-a
> > | |--- nofp
> > |
> > +--- v9-a+simd
> > |--- hard
> > |--- softfp
> >
> > Regtested on arm-none-eabi cross and no issues.
> >
> > OK for master?
Ok.
Thanks,
Kyrill
> >
> > gcc/ChangeLog:
> >
> > * config/arm/arm-cpus.in (armv9): New define.
> > (ARMv9a): New group.
> > (armv9-a): New arch definition.
> > * config/arm/arm-tables.opt: Regenerate.
> > * config/arm/arm.h (BASE_ARCH_9A): New arch enum value.
> > * config/arm/t-aprofile: Added armv9-a and armv9+simd.
> > * config/arm/t-arm-elf: Added arm9-a, v9_fps and all_v9_archs
> > to MULTILIB_MATCHES.
> > * config/arm/t-multilib: Added v9_a_nosimd_variants and
> > v9_a_simd_variants to MULTILIB_MATCHES.
> > * doc/invoke.texi: Update docs.
> >
> > gcc/testsuite/ChangeLog:
> >
> > * gcc.target/arm/multilib.exp: Update test with armv9-a entries.
> > * lib/target-supports.exp (v9a): Add new armflag.
> > (__ARM_ARCH_9A__): Add new armdef.
> >
> > --
> > kind regards,
> > Przemyslaw Wirkus
> > > -----Original Message-----
> > > From: Przemyslaw Wirkus
> > > Sent: 18 October 2021 10:37
> > > To: gcc-patches@gcc.gnu.org
> > > Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>; Ramana
> > > Radhakrishnan <Ramana.Radhakrishnan@arm.com>; Kyrylo Tkachov
> > > <Kyrylo.Tkachov@arm.com>; nickc@redhat.com
> > > Subject: [PATCH][GCC] arm: add armv9-a architecture to -march
> > >
> > > Hi,
> > >
> > > This patch is adding `armv9-a` to -march in Arm GCC.
> > >
> > > In this patch:
> > > + Add `armv9-a` to -march.
> > > + Update multilib with armv9-a and armv9-a+simd.
> > >
> > > After this patch three additional multilib directories are available:
> > >
> > > $ arm-none-eabi-gcc --print-multi-lib .; [...vanilla multi-lib
> > > dirs...] thumb/v9-a/nofp;@mthumb@march=armv9-a@mfloat-abi=soft
> > > thumb/v9-a+simd/softfp;@mthumb@march=armv9-a+simd@mfloat-
> > > abi=softfp
> > > thumb/v9-a+simd/hard;@mthumb@march=armv9-a+simd@mfloat-
> > > abi=hard
> > >
> > > New multi-lib directories under
> > > $GCC_INSTALL_DIE/lib/gcc/arm-none-eabi/12.0.0/thumb are created:
> > >
> > > thumb/
> > > +--- v9-a
> > > | |--- nofp
> > > |
> > > +--- v9-a+simd
> > > |--- hard
> > > |--- softfp
> > >
> > > Regtested on arm-none-eabi cross and no issues.
> > >
> > > OK for master?
Thanks.
commit 32ba7860ccaddd5219e6dae94a3d0653e124c9dd
> Ok.
> Thanks,
> Kyrill
>
>
> > >
> > > gcc/ChangeLog:
> > >
> > > * config/arm/arm-cpus.in (armv9): New define.
> > > (ARMv9a): New group.
> > > (armv9-a): New arch definition.
> > > * config/arm/arm-tables.opt: Regenerate.
> > > * config/arm/arm.h (BASE_ARCH_9A): New arch enum value.
> > > * config/arm/t-aprofile: Added armv9-a and armv9+simd.
> > > * config/arm/t-arm-elf: Added arm9-a, v9_fps and all_v9_archs
> > > to MULTILIB_MATCHES.
> > > * config/arm/t-multilib: Added v9_a_nosimd_variants and
> > > v9_a_simd_variants to MULTILIB_MATCHES.
> > > * doc/invoke.texi: Update docs.
> > >
> > > gcc/testsuite/ChangeLog:
> > >
> > > * gcc.target/arm/multilib.exp: Update test with armv9-a entries.
> > > * lib/target-supports.exp (v9a): Add new armflag.
> > > (__ARM_ARCH_9A__): Add new armdef.
> > >
> > > --
> > > kind regards,
> > > Przemyslaw Wirkus
Hi,
On Tue, Nov 9, 2021 at 12:36 PM Przemyslaw Wirkus via Gcc-patches <
gcc-patches@gcc.gnu.org> wrote:
> > > > -----Original Message-----
> > > > From: Przemyslaw Wirkus
> > > > Sent: 18 October 2021 10:37
> > > > To: gcc-patches@gcc.gnu.org
> > > > Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>; Ramana
> > > > Radhakrishnan <Ramana.Radhakrishnan@arm.com>; Kyrylo Tkachov
> > > > <Kyrylo.Tkachov@arm.com>; nickc@redhat.com
> > > > Subject: [PATCH][GCC] arm: add armv9-a architecture to -march
> > > >
> > > > Hi,
> > > >
> > > > This patch is adding `armv9-a` to -march in Arm GCC.
> > > >
> > > > In this patch:
> > > > + Add `armv9-a` to -march.
> > > > + Update multilib with armv9-a and armv9-a+simd.
> > > >
> > > > After this patch three additional multilib directories are available:
> > > >
> > > > $ arm-none-eabi-gcc --print-multi-lib .; [...vanilla multi-lib
> > > > dirs...] thumb/v9-a/nofp;@mthumb@march=armv9-a@mfloat-abi=soft
> > > > thumb/v9-a+simd/softfp;@mthumb@march=armv9-a+simd@mfloat-
> > > > abi=softfp
> > > > thumb/v9-a+simd/hard;@mthumb@march=armv9-a+simd@mfloat-
> > > > abi=hard
> > > >
>
This is causing a GCC build failure when using "old" binutils (I'm using
2.36.1),
because the new -march=armv9-a option is not supported. This breaks the
multilib support.
I don't remember how we handled similar cases in the past? Is that just
"expected", and
"current" GCC needs "current" binutils, or should we have a multilib list
dependent on
the actual binutils support? (I think this is not the case, and it sounds
like an undesirable
extra complication in an already overcrowded mutilib-Makefile)
Christophe
> > > New multi-lib directories under
> > > > $GCC_INSTALL_DIE/lib/gcc/arm-none-eabi/12.0.0/thumb are created:
> > > >
> > > > thumb/
> > > > +--- v9-a
> > > > | |--- nofp
> > > > |
> > > > +--- v9-a+simd
> > > > |--- hard
> > > > |--- softfp
> > > >
> > > > Regtested on arm-none-eabi cross and no issues.
> > > >
> > > > OK for master?
>
> Thanks.
>
> commit 32ba7860ccaddd5219e6dae94a3d0653e124c9dd
>
> > Ok.
> > Thanks,
> > Kyrill
> >
> >
> > > >
> > > > gcc/ChangeLog:
> > > >
> > > > * config/arm/arm-cpus.in (armv9): New define.
> > > > (ARMv9a): New group.
> > > > (armv9-a): New arch definition.
> > > > * config/arm/arm-tables.opt: Regenerate.
> > > > * config/arm/arm.h (BASE_ARCH_9A): New arch enum value.
> > > > * config/arm/t-aprofile: Added armv9-a and armv9+simd.
> > > > * config/arm/t-arm-elf: Added arm9-a, v9_fps and all_v9_archs
> > > > to MULTILIB_MATCHES.
> > > > * config/arm/t-multilib: Added v9_a_nosimd_variants and
> > > > v9_a_simd_variants to MULTILIB_MATCHES.
> > > > * doc/invoke.texi: Update docs.
> > > >
> > > > gcc/testsuite/ChangeLog:
> > > >
> > > > * gcc.target/arm/multilib.exp: Update test with armv9-a entries.
> > > > * lib/target-supports.exp (v9a): Add new armflag.
> > > > (__ARM_ARCH_9A__): Add new armdef.
> > > >
> > > > --
> > > > kind regards,
> > > > Przemyslaw Wirkus
>
>
You can't make an omelette without breaking eggs, as they say. New
architectures need new assemblers.
However, I wonder if there's anything in v9-a that significantly affects
the quality of the base multilib code needed for building the libraries.
It might be that we can deal with v9-a by just mapping it to the v8-a
equivalents. That would then avoid the need for an updated assembler,
and reduce the build time and install footprint.
R.
On 16/11/2021 08:03, Christophe Lyon via Gcc-patches wrote:
> Hi,
>
>
> On Tue, Nov 9, 2021 at 12:36 PM Przemyslaw Wirkus via Gcc-patches <
> gcc-patches@gcc.gnu.org> wrote:
>
>>>>> -----Original Message-----
>>>>> From: Przemyslaw Wirkus
>>>>> Sent: 18 October 2021 10:37
>>>>> To: gcc-patches@gcc.gnu.org
>>>>> Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>; Ramana
>>>>> Radhakrishnan <Ramana.Radhakrishnan@arm.com>; Kyrylo Tkachov
>>>>> <Kyrylo.Tkachov@arm.com>; nickc@redhat.com
>>>>> Subject: [PATCH][GCC] arm: add armv9-a architecture to -march
>>>>>
>>>>> Hi,
>>>>>
>>>>> This patch is adding `armv9-a` to -march in Arm GCC.
>>>>>
>>>>> In this patch:
>>>>> + Add `armv9-a` to -march.
>>>>> + Update multilib with armv9-a and armv9-a+simd.
>>>>>
>>>>> After this patch three additional multilib directories are available:
>>>>>
>>>>> $ arm-none-eabi-gcc --print-multi-lib .; [...vanilla multi-lib
>>>>> dirs...] thumb/v9-a/nofp;@mthumb@march=armv9-a@mfloat-abi=soft
>>>>> thumb/v9-a+simd/softfp;@mthumb@march=armv9-a+simd@mfloat-
>>>>> abi=softfp
>>>>> thumb/v9-a+simd/hard;@mthumb@march=armv9-a+simd@mfloat-
>>>>> abi=hard
>>>>>
>>
>
> This is causing a GCC build failure when using "old" binutils (I'm using
> 2.36.1),
> because the new -march=armv9-a option is not supported. This breaks the
> multilib support.
>
> I don't remember how we handled similar cases in the past? Is that just
> "expected", and
> "current" GCC needs "current" binutils, or should we have a multilib list
> dependent on
> the actual binutils support? (I think this is not the case, and it sounds
> like an undesirable
> extra complication in an already overcrowded mutilib-Makefile)
>
> Christophe
>
>>>> New multi-lib directories under
>>>>> $GCC_INSTALL_DIE/lib/gcc/arm-none-eabi/12.0.0/thumb are created:
>>>>>
>>>>> thumb/
>>>>> +--- v9-a
>>>>> | |--- nofp
>>>>> |
>>>>> +--- v9-a+simd
>>>>> |--- hard
>>>>> |--- softfp
>>>>>
>>>>> Regtested on arm-none-eabi cross and no issues.
>>>>>
>>>>> OK for master?
>>
>> Thanks.
>>
>> commit 32ba7860ccaddd5219e6dae94a3d0653e124c9dd
>>
>>> Ok.
>>> Thanks,
>>> Kyrill
>>>
>>>
>>>>>
>>>>> gcc/ChangeLog:
>>>>>
>>>>> * config/arm/arm-cpus.in (armv9): New define.
>>>>> (ARMv9a): New group.
>>>>> (armv9-a): New arch definition.
>>>>> * config/arm/arm-tables.opt: Regenerate.
>>>>> * config/arm/arm.h (BASE_ARCH_9A): New arch enum value.
>>>>> * config/arm/t-aprofile: Added armv9-a and armv9+simd.
>>>>> * config/arm/t-arm-elf: Added arm9-a, v9_fps and all_v9_archs
>>>>> to MULTILIB_MATCHES.
>>>>> * config/arm/t-multilib: Added v9_a_nosimd_variants and
>>>>> v9_a_simd_variants to MULTILIB_MATCHES.
>>>>> * doc/invoke.texi: Update docs.
>>>>>
>>>>> gcc/testsuite/ChangeLog:
>>>>>
>>>>> * gcc.target/arm/multilib.exp: Update test with armv9-a entries.
>>>>> * lib/target-supports.exp (v9a): Add new armflag.
>>>>> (__ARM_ARCH_9A__): Add new armdef.
>>>>>
>>>>> --
>>>>> kind regards,
>>>>> Przemyslaw Wirkus
>>
>>
Hi There,
I think for AArch32 mapping it back to armv8-a sounds sufficient. Unless we have string or math routines in newlib that make use of any ACLE guards that are beyond armv8-a …
Ramana
From: Richard Earnshaw <Richard.Earnshaw@foss.arm.com>
Date: Tuesday, 16 November 2021 at 11:48
To: Christophe Lyon <christophe.lyon.oss@gmail.com>, Przemyslaw Wirkus <Przemyslaw.Wirkus@arm.com>
Cc: Ramana Radhakrishnan <Ramana.Radhakrishnan@arm.com>, gcc-patches@gcc.gnu.org <gcc-patches@gcc.gnu.org>, Richard Earnshaw <Richard.Earnshaw@arm.com>
Subject: Re: [PATCH][GCC] arm: add armv9-a architecture to -march
You can't make an omelette without breaking eggs, as they say. New
architectures need new assemblers.
However, I wonder if there's anything in v9-a that significantly affects
the quality of the base multilib code needed for building the libraries.
It might be that we can deal with v9-a by just mapping it to the v8-a
equivalents. That would then avoid the need for an updated assembler,
and reduce the build time and install footprint.
R.
On 16/11/2021 08:03, Christophe Lyon via Gcc-patches wrote:
> Hi,
>
>
> On Tue, Nov 9, 2021 at 12:36 PM Przemyslaw Wirkus via Gcc-patches <
> gcc-patches@gcc.gnu.org> wrote:
>
>>>>> -----Original Message-----
>>>>> From: Przemyslaw Wirkus
>>>>> Sent: 18 October 2021 10:37
>>>>> To: gcc-patches@gcc.gnu.org
>>>>> Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>; Ramana
>>>>> Radhakrishnan <Ramana.Radhakrishnan@arm.com>; Kyrylo Tkachov
>>>>> <Kyrylo.Tkachov@arm.com>; nickc@redhat.com
>>>>> Subject: [PATCH][GCC] arm: add armv9-a architecture to -march
>>>>>
>>>>> Hi,
>>>>>
>>>>> This patch is adding `armv9-a` to -march in Arm GCC.
>>>>>
>>>>> In this patch:
>>>>> + Add `armv9-a` to -march.
>>>>> + Update multilib with armv9-a and armv9-a+simd.
>>>>>
>>>>> After this patch three additional multilib directories are available:
>>>>>
>>>>> $ arm-none-eabi-gcc --print-multi-lib .; [...vanilla multi-lib
>>>>> dirs...] thumb/v9-a/nofp;@mthumb@march=armv9-a@mfloat-abi=soft
>>>>> thumb/v9-a+simd/softfp;@mthumb@march=armv9-a+simd@mfloat-
>>>>> abi=softfp
>>>>> thumb/v9-a+simd/hard;@mthumb@march=armv9-a+simd@mfloat-
>>>>> abi=hard
>>>>>
>>
>
> This is causing a GCC build failure when using "old" binutils (I'm using
> 2.36.1),
> because the new -march=armv9-a option is not supported. This breaks the
> multilib support.
>
> I don't remember how we handled similar cases in the past? Is that just
> "expected", and
> "current" GCC needs "current" binutils, or should we have a multilib list
> dependent on
> the actual binutils support? (I think this is not the case, and it sounds
> like an undesirable
> extra complication in an already overcrowded mutilib-Makefile)
>
> Christophe
>
>>>> New multi-lib directories under
>>>>> $GCC_INSTALL_DIE/lib/gcc/arm-none-eabi/12.0.0/thumb are created:
>>>>>
>>>>> thumb/
>>>>> +--- v9-a
>>>>> | |--- nofp
>>>>> |
>>>>> +--- v9-a+simd
>>>>> |--- hard
>>>>> |--- softfp
>>>>>
>>>>> Regtested on arm-none-eabi cross and no issues.
>>>>>
>>>>> OK for master?
>>
>> Thanks.
>>
>> commit 32ba7860ccaddd5219e6dae94a3d0653e124c9dd
>>
>>> Ok.
>>> Thanks,
>>> Kyrill
>>>
>>>
>>>>>
>>>>> gcc/ChangeLog:
>>>>>
>>>>> * config/arm/arm-cpus.in (armv9): New define.
>>>>> (ARMv9a): New group.
>>>>> (armv9-a): New arch definition.
>>>>> * config/arm/arm-tables.opt: Regenerate.
>>>>> * config/arm/arm.h (BASE_ARCH_9A): New arch enum value.
>>>>> * config/arm/t-aprofile: Added armv9-a and armv9+simd.
>>>>> * config/arm/t-arm-elf: Added arm9-a, v9_fps and all_v9_archs
>>>>> to MULTILIB_MATCHES.
>>>>> * config/arm/t-multilib: Added v9_a_nosimd_variants and
>>>>> v9_a_simd_variants to MULTILIB_MATCHES.
>>>>> * doc/invoke.texi: Update docs.
>>>>>
>>>>> gcc/testsuite/ChangeLog:
>>>>>
>>>>> * gcc.target/arm/multilib.exp: Update test with armv9-a entries.
>>>>> * lib/target-supports.exp (v9a): Add new armflag.
>>>>> (__ARM_ARCH_9A__): Add new armdef.
>>>>>
>>>>> --
>>>>> kind regards,
>>>>> Przemyslaw Wirkus
>>
>>
Hi,
Indeed I wasn't asking for a ~partial revert, rather making sure the new
behaviour is intended: current GCC trunk
won't build with A-profile multilibs unless using trunk binutils. We
probably had the same situation when
v8-a was introduced, just maybe I wasn't running CI with multilibs enabled
at that time.
Anyway, as Richard & Ramana said, if there is no real need for v9-a
multilibs, dropping them would save
build time and disk size.
Thanks,
Christophe
On Tue, Nov 16, 2021 at 1:29 PM Ramana Radhakrishnan <
Ramana.Radhakrishnan@arm.com> wrote:
> Hi There,
>
>
>
> I think for AArch32 mapping it back to armv8-a sounds sufficient. Unless
> we have string or math routines in newlib that make use of any ACLE guards
> that are beyond armv8-a …
>
>
>
> Ramana
>
>
>
>
>
> *From: *Richard Earnshaw <Richard.Earnshaw@foss.arm.com>
> *Date: *Tuesday, 16 November 2021 at 11:48
> *To: *Christophe Lyon <christophe.lyon.oss@gmail.com>, Przemyslaw Wirkus <
> Przemyslaw.Wirkus@arm.com>
> *Cc: *Ramana Radhakrishnan <Ramana.Radhakrishnan@arm.com>,
> gcc-patches@gcc.gnu.org <gcc-patches@gcc.gnu.org>, Richard Earnshaw <
> Richard.Earnshaw@arm.com>
> *Subject: *Re: [PATCH][GCC] arm: add armv9-a architecture to -march
>
> You can't make an omelette without breaking eggs, as they say. New
> architectures need new assemblers.
>
> However, I wonder if there's anything in v9-a that significantly affects
> the quality of the base multilib code needed for building the libraries.
> It might be that we can deal with v9-a by just mapping it to the v8-a
> equivalents. That would then avoid the need for an updated assembler,
> and reduce the build time and install footprint.
>
> R.
>
>
> On 16/11/2021 08:03, Christophe Lyon via Gcc-patches wrote:
> > Hi,
> >
> >
> > On Tue, Nov 9, 2021 at 12:36 PM Przemyslaw Wirkus via Gcc-patches <
> > gcc-patches@gcc.gnu.org> wrote:
> >
> >>>>> -----Original Message-----
> >>>>> From: Przemyslaw Wirkus
> >>>>> Sent: 18 October 2021 10:37
> >>>>> To: gcc-patches@gcc.gnu.org
> >>>>> Cc: Richard Earnshaw <Richard.Earnshaw@arm.com>; Ramana
> >>>>> Radhakrishnan <Ramana.Radhakrishnan@arm.com>; Kyrylo Tkachov
> >>>>> <Kyrylo.Tkachov@arm.com>; nickc@redhat.com
> >>>>> Subject: [PATCH][GCC] arm: add armv9-a architecture to -march
> >>>>>
> >>>>> Hi,
> >>>>>
> >>>>> This patch is adding `armv9-a` to -march in Arm GCC.
> >>>>>
> >>>>> In this patch:
> >>>>> + Add `armv9-a` to -march.
> >>>>> + Update multilib with armv9-a and armv9-a+simd.
> >>>>>
> >>>>> After this patch three additional multilib directories are available:
> >>>>>
> >>>>> $ arm-none-eabi-gcc --print-multi-lib .; [...vanilla multi-lib
> >>>>> dirs...] thumb/v9-a/nofp;@mthumb@march=armv9-a@mfloat-abi=soft
> >>>>> thumb/v9-a+simd/softfp;@mthumb@march=armv9-a+simd@mfloat-
> >>>>> abi=softfp
> >>>>> thumb/v9-a+simd/hard;@mthumb@march=armv9-a+simd@mfloat-
> >>>>> abi=hard
> >>>>>
> >>
> >
> > This is causing a GCC build failure when using "old" binutils (I'm using
> > 2.36.1),
> > because the new -march=armv9-a option is not supported. This breaks the
> > multilib support.
> >
> > I don't remember how we handled similar cases in the past? Is that just
> > "expected", and
> > "current" GCC needs "current" binutils, or should we have a multilib list
> > dependent on
> > the actual binutils support? (I think this is not the case, and it sounds
> > like an undesirable
> > extra complication in an already overcrowded mutilib-Makefile)
> >
> > Christophe
> >
> >>>> New multi-lib directories under
> >>>>> $GCC_INSTALL_DIE/lib/gcc/arm-none-eabi/12.0.0/thumb are created:
> >>>>>
> >>>>> thumb/
> >>>>> +--- v9-a
> >>>>> | |--- nofp
> >>>>> |
> >>>>> +--- v9-a+simd
> >>>>> |--- hard
> >>>>> |--- softfp
> >>>>>
> >>>>> Regtested on arm-none-eabi cross and no issues.
> >>>>>
> >>>>> OK for master?
> >>
> >> Thanks.
> >>
> >> commit 32ba7860ccaddd5219e6dae94a3d0653e124c9dd
> >>
> >>> Ok.
> >>> Thanks,
> >>> Kyrill
> >>>
> >>>
> >>>>>
> >>>>> gcc/ChangeLog:
> >>>>>
> >>>>> * config/arm/arm-cpus.in (armv9): New define.
> >>>>> (ARMv9a): New group.
> >>>>> (armv9-a): New arch definition.
> >>>>> * config/arm/arm-tables.opt: Regenerate.
> >>>>> * config/arm/arm.h (BASE_ARCH_9A): New arch enum value.
> >>>>> * config/arm/t-aprofile: Added armv9-a and armv9+simd.
> >>>>> * config/arm/t-arm-elf: Added arm9-a, v9_fps and all_v9_archs
> >>>>> to MULTILIB_MATCHES.
> >>>>> * config/arm/t-multilib: Added v9_a_nosimd_variants and
> >>>>> v9_a_simd_variants to MULTILIB_MATCHES.
> >>>>> * doc/invoke.texi: Update docs.
> >>>>>
> >>>>> gcc/testsuite/ChangeLog:
> >>>>>
> >>>>> * gcc.target/arm/multilib.exp: Update test with armv9-a entries.
> >>>>> * lib/target-supports.exp (v9a): Add new armflag.
> >>>>> (__ARM_ARCH_9A__): Add new armdef.
> >>>>>
> >>>>> --
> >>>>> kind regards,
> >>>>> Przemyslaw Wirkus
> >>
> >>
>
@@ -132,6 +132,9 @@ define feature cmse
# Architecture rel 8.1-M.
define feature armv8_1m_main
+# Architecture rel 9.0.
+define feature armv9
+
# Floating point and Neon extensions.
# VFPv1 is not supported in GCC.
@@ -293,6 +296,7 @@ define fgroup ARMv8m_base ARMv6m armv8 cmse tdiv
define fgroup ARMv8m_main ARMv7m armv8 cmse
define fgroup ARMv8r ARMv8a
define fgroup ARMv8_1m_main ARMv8m_main armv8_1m_main
+define fgroup ARMv9a ARMv8_5a armv9
# Useful combinations.
define fgroup VFPv2 vfpv2
@@ -751,6 +755,21 @@ begin arch armv8.1-m.main
option cdecp7 add cdecp7
end arch armv8.1-m.main
+begin arch armv9-a
+ tune for cortex-a53
+ tune flags CO_PROC
+ base 9A
+ profile A
+ isa ARMv9a
+ option simd add FP_ARMv8 DOTPROD
+ option fp16 add fp16 fp16fml FP_ARMv8 DOTPROD
+ option crypto add FP_ARMv8 CRYPTO DOTPROD
+ option nocrypto remove ALL_CRYPTO
+ option nofp remove ALL_FP
+ option i8mm add i8mm FP_ARMv8 DOTPROD
+ option bf16 add bf16 FP_ARMv8 DOTPROD
+end arch armv9-a
+
begin arch iwmmxt
tune for iwmmxt
tune flags LDSCHED STRONG XSCALE
@@ -383,10 +383,13 @@ EnumValue
Enum(arm_arch) String(armv8.1-m.main) Value(30)
EnumValue
-Enum(arm_arch) String(iwmmxt) Value(31)
+Enum(arm_arch) String(armv9-a) Value(31)
EnumValue
-Enum(arm_arch) String(iwmmxt2) Value(32)
+Enum(arm_arch) String(iwmmxt) Value(32)
+
+EnumValue
+Enum(arm_arch) String(iwmmxt2) Value(33)
Enum
Name(arm_fpu) Type(enum fpu_type)
@@ -452,7 +452,8 @@ enum base_architecture
BASE_ARCH_8A = 8,
BASE_ARCH_8M_BASE = 8,
BASE_ARCH_8M_MAIN = 8,
- BASE_ARCH_8R = 8
+ BASE_ARCH_8R = 8,
+ BASE_ARCH_9A = 9
};
/* The major revision number of the ARM Architecture implemented by the target. */
@@ -26,8 +26,8 @@
# Arch and FPU variants to build libraries with
-MULTI_ARCH_OPTS_A = march=armv7-a/march=armv7-a+fp/march=armv7-a+simd/march=armv7ve+simd/march=armv8-a/march=armv8-a+simd
-MULTI_ARCH_DIRS_A = v7-a v7-a+fp v7-a+simd v7ve+simd v8-a v8-a+simd
+MULTI_ARCH_OPTS_A = march=armv7-a/march=armv7-a+fp/march=armv7-a+simd/march=armv7ve+simd/march=armv8-a/march=armv8-a+simd/march=armv9-a/march=armv9-a+simd
+MULTI_ARCH_DIRS_A = v7-a v7-a+fp v7-a+simd v7ve+simd v8-a v8-a+simd v9-a v9-a+simd
# ARMv7-A - build nofp, fp-d16 and SIMD variants
@@ -46,6 +46,11 @@ MULTILIB_REQUIRED += mthumb/march=armv8-a/mfloat-abi=soft
MULTILIB_REQUIRED += mthumb/march=armv8-a+simd/mfloat-abi=hard
MULTILIB_REQUIRED += mthumb/march=armv8-a+simd/mfloat-abi=softfp
+# Armv9-A - build nofp and SIMD variants.
+MULTILIB_REQUIRED += mthumb/march=armv9-a/mfloat-abi=soft
+MULTILIB_REQUIRED += mthumb/march=armv9-a+simd/mfloat-abi=hard
+MULTILIB_REQUIRED += mthumb/march=armv9-a+simd/mfloat-abi=softfp
+
# Matches
# Arch Matches
@@ -129,17 +134,29 @@ MULTILIB_MATCHES += march?armv8-a=march?armv8.6-a
MULTILIB_MATCHES += $(foreach ARCH, $(v8_6_a_simd_variants), \
march?armv8-a+simd=march?armv8.6-a$(ARCH))
+# Armv9 without SIMD: map down to base architecture
+MULTILIB_MATCHES += $(foreach ARCH, $(v9_a_nosimd_variants), \
+ march?armv9-a=march?armv9-a$(ARCH))
+
+# Armv9 with SIMD: map down to base arch + simd
+MULTILIB_MATCHES += march?armv9-a+simd=march?armv9-a+crc+simd \
+ $(foreach ARCH, $(filter-out +simd, $(v9_a_simd_variants)), \
+ march?armv9-a+simd=march?armv9-a$(ARCH) \
+ march?armv9-a+simd=march?armv9-a+crc$(ARCH))
+
# Use Thumb libraries for everything.
MULTILIB_REUSE += mthumb/march.armv7-a/mfloat-abi.soft=marm/march.armv7-a/mfloat-abi.soft
MULTILIB_REUSE += mthumb/march.armv8-a/mfloat-abi.soft=marm/march.armv8-a/mfloat-abi.soft
+MULTILIB_REUSE += mthumb/march.armv9-a/mfloat-abi.soft=marm/march.armv9-a/mfloat-abi.soft
+
MULTILIB_REUSE += $(foreach ABI, hard softfp, \
- $(foreach ARCH, armv7-a+fp armv7-a+simd armv7ve+simd armv8-a+simd, \
+ $(foreach ARCH, armv7-a+fp armv7-a+simd armv7ve+simd armv8-a+simd armv9-a+simd, \
mthumb/march.$(ARCH)/mfloat-abi.$(ABI)=marm/march.$(ARCH)/mfloat-abi.$(ABI)))
# Softfp but no FP, use the soft-float libraries.
MULTILIB_REUSE += $(foreach MODE, arm thumb, \
- $(foreach ARCH, armv7-a armv8-a, \
+ $(foreach ARCH, armv7-a armv8-a armv9-a, \
mthumb/march.$(ARCH)/mfloat-abi.soft=m$(MODE)/march.$(ARCH)/mfloat-abi.softfp))
@@ -38,6 +38,8 @@ v7ve_fps := vfpv3-d16 vfpv3 vfpv3-d16-fp16 vfpv3-fp16 vfpv4 neon \
# it seems to work ok.
v8_fps := simd fp16 crypto fp16+crypto dotprod fp16fml
+v9_fps := simd fp16 crypto fp16+crypto dotprod fp16fml
+
# We don't do anything special with these. Pre-v4t probably doesn't work.
all_early_nofp := armv4 armv4t armv5t
@@ -49,6 +51,8 @@ all_v7_a_r := armv7-a armv7ve armv7-r
all_v8_archs := armv8-a armv8-a+crc armv8.1-a armv8.2-a armv8.3-a armv8.4-a \
armv8.5-a armv8.6-a
+all_v9_archs := armv9-a
+
# No floating point variants, require thumb1 softfp
all_nofp_t := armv6-m armv6s-m armv8-m.base
@@ -110,6 +114,11 @@ MULTILIB_MATCHES += $(foreach ARCH, $(all_v8_archs), \
$(foreach FPARCH, $(v8_fps), \
march?armv7+fp=march?$(ARCH)+$(FPARCH)))
+MULTILIB_MATCHES += $(foreach ARCH, $(all_v9_archs), \
+ march?armv7+fp=march?$(ARCH) \
+ $(foreach FPARCH, $(v9_fps), \
+ march?armv7+fp=march?$(ARCH)+$(FPARCH)))
+
MULTILIB_MATCHES += $(foreach ARCH, armv7e-m armv8-m.mainline, \
march?armv7+fp=march?$(ARCH)+fp.dp)
@@ -78,6 +78,8 @@ v8_4_a_simd_variants := $(call all_feat_combs, simd fp16 crypto i8mm bf16)
v8_5_a_simd_variants := $(call all_feat_combs, simd fp16 crypto i8mm bf16)
v8_6_a_simd_variants := $(call all_feat_combs, simd fp16 crypto i8mm bf16)
v8_r_nosimd_variants := +crc
+v9_a_nosimd_variants := +crc
+v9_a_simd_variants := $(call all_feat_combs, simd fp16 crypto i8mm bf16)
ifneq (,$(HAS_APROFILE))
include $(srcdir)/config/arm/t-aprofile
@@ -202,6 +204,16 @@ MULTILIB_MATCHES += march?armv7=march?armv8.6-a
MULTILIB_MATCHES += $(foreach ARCH, $(v8_6_a_simd_variants), \
march?armv7+fp=march?armv8.6-a$(ARCH))
+# Armv9
+MULTILIB_MATCHES += march?armv7=march?armv9-a
+MULTILIB_MATCHES += $(foreach ARCH, $(v9_a_nosimd_variants), \
+ march?armv7=march?armv9-a$(ARCH))
+
+# Armv9 with SIMD
+MULTILIB_MATCHES += march?armv7+fp=march?armv9-a+crc+simd \
+ $(foreach ARCH, $(v9_a_simd_variants), \
+ march?armv7+fp=march?armv9-a$(ARCH) \
+ march?armv7+fp=march?armv9-a+crc$(ARCH))
endif # Not APROFILE.
# Use Thumb libraries for everything.
@@ -19994,6 +19994,7 @@ Permissible names are:
@samp{armv7-m}, @samp{armv7e-m},
@samp{armv8-m.base}, @samp{armv8-m.main},
@samp{armv8.1-m.main},
+@samp{armv9-a},
@samp{iwmmxt} and @samp{iwmmxt2}.
Additionally, the following architectures, which lack support for the
@@ -135,6 +135,14 @@ if {[multilib_config "aprofile"] } {
{-march=armv8.6-a+simd+fp16 -mfloat-abi=softfp} "thumb/v8-a+simd/softfp"
{-march=armv8.6-a+simd+fp16+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp"
{-march=armv8.6-a+simd+nofp+fp16 -mfloat-abi=softfp} "thumb/v8-a+simd/softfp"
+ {-march=armv9-a+crypto -mfloat-abi=soft} "thumb/v9-a/nofp"
+ {-march=armv9-a+simd+crypto -mfloat-abi=softfp} "thumb/v9-a+simd/softfp"
+ {-march=armv9-a+simd+crypto+nofp -mfloat-abi=softfp} "thumb/v9-a/nofp"
+ {-march=armv9-a+simd+nofp+crypto -mfloat-abi=softfp} "thumb/v9-a+simd/softfp"
+ {-march=armv9-a+fp16 -mfloat-abi=soft} "thumb/v9-a/nofp"
+ {-march=armv9-a+simd+fp16 -mfloat-abi=softfp} "thumb/v9-a+simd/softfp"
+ {-march=armv9-a+simd+fp16+nofp -mfloat-abi=softfp} "thumb/v9-a/nofp"
+ {-march=armv9-a+simd+nofp+fp16 -mfloat-abi=softfp} "thumb/v9-a+simd/softfp"
{-mcpu=cortex-a53+crypto -mfloat-abi=hard} "thumb/v8-a+simd/hard"
{-mcpu=cortex-a53+nofp -mfloat-abi=softfp} "thumb/v8-a/nofp"
{-march=armv8-a+crc -mfloat-abi=hard -mfpu=vfp} "thumb/v8-a+simd/hard"
@@ -4848,7 +4848,8 @@ foreach { armfunc armflag armdefs } {
v8m_base "-march=armv8-m.base -mthumb -mfloat-abi=soft"
__ARM_ARCH_8M_BASE__
v8m_main "-march=armv8-m.main -mthumb" __ARM_ARCH_8M_MAIN__
- v8_1m_main "-march=armv8.1-m.main -mthumb" __ARM_ARCH_8M_MAIN__ } {
+ v8_1m_main "-march=armv8.1-m.main -mthumb" __ARM_ARCH_8M_MAIN__
+ v9a "-march=armv9-a" __ARM_ARCH_9A__ } {
eval [string map [list FUNC $armfunc FLAG $armflag DEFS $armdefs ] {
proc check_effective_target_arm_arch_FUNC_ok { } {
return [check_no_compiler_messages arm_arch_FUNC_ok assembly {