This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH][GCC][ARM][AArch64] Testsuite framework changes and execution tests [Patch (8/8)]
- From: Tamar Christina <Tamar dot Christina at arm dot com>
- To: James Greenhalgh <James dot Greenhalgh at arm dot com>
- Cc: Christophe Lyon <christophe dot lyon at linaro dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, nd <nd at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, Kyrylo Tkachov <Kyrylo dot Tkachov at arm dot com>
- Date: Thu, 26 Oct 2017 07:10:28 +0000
- Subject: RE: [PATCH][GCC][ARM][AArch64] Testsuite framework changes and execution tests [Patch (8/8)]
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Tamar dot Christina at arm dot com;
- Nodisclaimer: True
- References: <20170901132425.GA32479@arm.com> <CAKdteOaqFa=E4uPLosFWJOLaZec5uo=NWHB9Cz8FLcst-0_uJA@mail.gmail.com> <DB6PR0802MB2309D83DBD83726D7C7E1BE8FF910@DB6PR0802MB2309.eurprd08.prod.outlook.com> <DB6PR0802MB230900BB1D613C20F6271CD5FF710@DB6PR0802MB2309.eurprd08.prod.outlook.com> <20171024152126.GB36236@arm.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
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 ""]] }
> > +