On Fri, 8 Aug 2025 at 16:51, Richard Earnshaw <richard.earns...@arm.com> wrote:
>
> On 26/05/2025 17:08, Christophe Lyon wrote:
> > This effective target implicitly expects -march=armv8-a, otherwise
> > with a toolchain configured for instance with
> > --with-cpu=cortex-m0 --with-float=soft,
> > it fails even when trying
> > -mfpu=crypto-neon-fp-armv8 -mfloat-abi=softfp:
> > arm_neon.h:45:2: error: #error "NEON intrinsics not available with the 
> > soft-float ABI.  Please use -mfloat-abi=softfp or -mfloat-abi=hard"
> >
> > With this patch, the effective target succeeds using
> > -mfpu=crypto-neon-fp-armv8 -mfloat-abi=softfp -mcpu=unset -march=armv8-a
> > thus enabling a few more tests.
> >
> > For instance with a toolchain defaulting to cortex-m0, we now enable:
> > gcc.target/arm/aes-fuse-1.c
> > gcc.target/arm/aes-fuse-2.c
> > gcc.target/arm/aes_xor_combine.c
> > gcc.target/arm/attr-neon3.c
> > gcc.target/arm/crypto-*
> > gcc.target/arm/simd: several *p64* tests
> >
> > Out of these, a few are failing, but this should be addressed
> > separately:
> > FAIL: gcc.target/arm/aes-fuse-1.c scan-assembler-times crypto_aese_fused 6
> > FAIL: gcc.target/arm/aes-fuse-2.c scan-assembler-times crypto_aesd_fused 6
> >
> > With a toolchain defaulting to cortex-m55, we have these additional 
> > failures:
> > FAIL: gcc.target/arm/attr-neon3.c (test for excess errors)
> > FAIL: gcc.target/arm/crypto-vsha1cq_u32.c scan-assembler-times 
> > vdup.32\\tq[0-9]+, r[0-9]+ 4
> > FAIL: gcc.target/arm/crypto-vsha1h_u32.c scan-assembler-times 
> > vdup.32\\tq[0-9]+, r[0-9]+ 4
> > FAIL: gcc.target/arm/crypto-vsha1mq_u32.c scan-assembler-times 
> > vdup.32\\tq[0-9]+, r[0-9]+ 4
> > FAIL: gcc.target/arm/crypto-vsha1pq_u32.c scan-assembler-times 
> > vdup.32\\tq[0-9]+, r[0-9]+ 4
> >
> > gcc/testsuite/ChangeLog:
> >
> >       * lib/target-supports.exp
> >       (check_effective_target_arm_crypto_ok_nocache): Add "-mcpu=unset
> >       -march=armv8-a".
> > ---
> >   gcc/testsuite/lib/target-supports.exp | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/gcc/testsuite/lib/target-supports.exp 
> > b/gcc/testsuite/lib/target-supports.exp
> > index 7ace678518e..a88f9be8851 100644
> > --- a/gcc/testsuite/lib/target-supports.exp
> > +++ b/gcc/testsuite/lib/target-supports.exp
> > @@ -5346,8 +5346,8 @@ proc check_effective_target_arm_crypto_ok_nocache { } 
> > {
> >               {
> >                 return vaeseq_u8 (a, b);
> >               }
> > -         } "$flags"] } {
> > -             set et_arm_crypto_flags $flags
> > +         } "$flags -mcpu=unset -march=armv8-a"] } {
> > +             set et_arm_crypto_flags "$flags -mcpu=unset -march=armv8-a"
> >               return 1
> >           }
> >       }
>
> We should be working towards eliminating -mfpu(!=auto) from the
> testsuite, except where it is specifically testing that -mfpu is being
> mapped to the new behaviour as intended (which isn't the case here).
>
> So I think this test should be using an iterator set of something like
>
> foreach flags {""
>                 "-mfloat-abi=softfp"
>                 "-mfpu=auto"
>                 "-mfpu=auto -mfloat-abi=softfp"
>                 "-mcpu=unset -march=armv8-a+crypto"
>                 "-mcpu=unset -march=armv8-a+crypto -mfloat-abi=softfp"
>                 "-mcpu=unset -march=armv8-a+crypto -mfpu=auto"
>                 "-mcpu=unset -march=armv8-a+crypto -mfpu=auto
> -mfloat-abi=softfp"} {
>
OK I'll update the patch accordingly.

Doesn't your comment apply to arm_v8_neon_ok_nocache as well?

Thanks,

Christophe

Reply via email to