This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH][GCC][ARM][AArch64] Testsuite framework changes and execution tests [Patch (8/8)]


Hi James,

> > b3e4a2d7f5b0 100644
> > --- a/gcc/doc/sourcebuild.texi
> > +++ b/gcc/doc/sourcebuild.texi
> > @@ -1684,6 +1684,17 @@ ARM target supports executing instructions from
> > ARMv8.2 with the FP16  extension.  Some multilibs may be incompatible
> with these options.
> >  Implies arm_v8_2a_fp16_neon_ok and arm_v8_2a_fp16_scalar_hw.
> >
> > +@item arm_v8_2a_dotprod_neon_ok
> > +@anchor{arm_v8_2a_dotprod_neon_ok}
> > +ARM target supports options to generate instructions from ARMv8.2
> > +with
> 
> Armv8.2-A?

Nothing else in this documentation refers to the architectures as -a, the only usages I see
Are ARMv8.2 and ARMv8.1. I'm happy to change it but wanted to point out this is not how the
Rest of the documentation is written.

> 
> > +the Dot Product extension. Some multilibs may be incompatible with
> > +these options.
> > +
> > +@item arm_v8_2a_dotprod_neon_hw
> > +ARM target supports executing instructions from ARMv8.2 with the Dot
> 
> Likewise.
> 
> > +Product extension. Some multilibs may be incompatible with these
> options.
> > +Implies arm_v8_2a_dotprod_neon_ok.
> > +
> >  @item arm_prefer_ldrd_strd
> >  ARM target prefers @code{LDRD} and @code{STRD} instructions over
> > @code{LDM} and @code{STM} instructions.
> > @@ -2290,6 +2301,11 @@ supported by the target; see the
> > @ref{arm_v8_2a_fp16_neon_ok,,arm_v8_2a_fp16_neon_ok} effective
> target
> > keyword.
> >
> > +@item arm_v8_2a_dotprod_neon
> > +Add options for ARMv8.2 with Adv.SIMD Dot Product support, if this is
> > +supported by the target; see the @ref{arm_v8_2a_dotprod_neon_ok}
> > +effective target keyword.
> > +
> 
> Likewise.
> 
> >  @item bind_pic_locally
> >  Add the target-specific flags needed to enable functions to bind
> > locally when using pic/PIC passes in the testsuite.
> 
> > diff --git a/gcc/testsuite/lib/target-supports.exp
> > b/gcc/testsuite/lib/target-supports.exp
> > index
> >
> 57f646ce2df5bcd5619870403242e73f6e91ff77..2877f08393ac0de1ff3b3258a56
> d
> > ff1ab1852413 100644
> > --- a/gcc/testsuite/lib/target-supports.exp
> > +++ b/gcc/testsuite/lib/target-supports.exp
> > @@ -4311,6 +4311,48 @@ proc
> check_effective_target_arm_v8_2a_fp16_neon_ok { } {
> >
> 	check_effective_target_arm_v8_2a_fp16_neon_ok_nocache]
> >  }
> >
> >  # Return 1 if the target supports executing ARMv8 NEON instructions,
> > 0  # otherwise.
> >
> > @@ -4448,6 +4490,42 @@ proc
> check_effective_target_arm_v8_2a_fp16_neon_hw { } {
> >      } [add_options_for_arm_v8_2a_fp16_neon ""]]  }
> >
> > +# Return 1 if the target supports executing AdvSIMD instructions from
> > +ARMv8.2 # with the Dot Product extension, 0 otherwise.  The test is
> > +valid for ARM and for # AArch64.
> > +
> > +proc check_effective_target_arm_v8_2a_dotprod_neon_hw { } {
> > +    if { ![check_effective_target_arm_v8_2a_dotprod_neon_ok] } {
> > +        return 0;
> > +    }
> > +    return [check_runtime arm_v8_2a_dotprod_neon_hw_available {
> > +        #include "arm_neon.h"
> > +        int
> > +        main (void)
> > +        {
> > +
> > +	  uint32x2_t results = {0,0};
> > +	  uint8x8_t a = {1,1,1,1,2,2,2,2};
> > +	  uint8x8_t b = {2,2,2,2,3,3,3,3};
> > +
> > +          #ifdef __ARM_ARCH_ISA_A64
> > +          asm ("udot %0.2s, %1.8b, %2.8b"
> > +               : "=w"(results)
> > +               : "w"(a), "w"(b)
> > +               : /* No clobbers.  */);
> > +
> > +	  #elif __ARM_ARCH >= 8
> 
> I don't think this does anything, should it just be else?
> 
> > +          asm ("vudot.u8 %P0, %P1, %P2"
> > +               : "=w"(results)
> > +               : "w"(a), "w"(b)
> > +               : /* No clobbers.  */);
> > +          #endif
> > +
> > +          return (results[0] == 8 && results[1] == 24) ? 1 : 0;
> > +        }
> > +    } [add_options_for_arm_v8_2a_dotprod_neon ""]] }
> > +


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]