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: [AArch64][PATCH 2/7] Add sqrdmah, sqrdmsh instructions.


On Fri, Oct 23, 2015 at 01:19:20PM +0100, Matthew Wahab wrote:
> The ARMv8.1 architecture extension adds two Adv.SIMD instructions,
> sqrdmlah and sqrdmlsh. This patch adds the instructions to the
> aarch64-simd patterns, making them conditional on the TARGET_SIMD_RDMA
> feature macro introduced in the previous patch.
> 
> The instructions patterns are defined using unspec expressions, so that
> they are only generated through builtins added by this patch series. To
> simplify the definition, iterators SQRDMLAH and rdma_as are added, to
> iterate over the add (sqrdmlah) and subtract (sqrdmlsh) forms of the
> instructions.
> 
> Tested the series for aarch64-none-linux-gnu with native bootstrap and
> make check on an ARMv8 architecture. Also tested aarch64-none-elf with
> cross-compiled check-gcc on an ARMv8.1 emulator.
> 
> Ok for trunk?
> Matthew

OK with the name of the iterator fixed to something more clear as to what
you are iterating over.

> gcc/
> 2015-10-23  Matthew Wahab  <matthew.wahab@arm.com>
> 
> 	* config/aarch64/aarch64-simd.md
> 	(aarch64_sqmovun<mode>): Fix some white-space.
> 	(aarch64_<sur>qmovun<mode>): Likewise.
> 	(aarch64_sqrdml<SQRDMLAH:rdma_as>h<mode>): New.
> 	(aarch64_sqrdml<SQRDMLAH:rdma_as>h_lane<mode>): New.
> 	(aarch64_sqrdml<SQRDMLAH:rdma_as>h_laneq<mode>): New.
> 	* config/aarch64/iterators.md (UNSPEC_SQRDMLAH): New.
> 	(UNSPEC_SQRDMLSH): New.
> 	(SQRDMLAH): New.
> 	(rdma_as): New.
> 

> diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md
> index 964f8f1..409ba7b 100644
> --- a/gcc/config/aarch64/iterators.md
> +++ b/gcc/config/aarch64/iterators.md
> @@ -303,6 +303,8 @@
>      UNSPEC_PMULL2       ; Used in aarch64-simd.md.
>      UNSPEC_REV_REGLIST  ; Used in aarch64-simd.md.
>      UNSPEC_VEC_SHR      ; Used in aarch64-simd.md.
> +    UNSPEC_SQRDMLAH     ; Used in aarch64-simd.md.
> +    UNSPEC_SQRDMLSH     ; Used in aarch64-simd.md.
>  ])
>  
>  ;; -------------------------------------------------------------------
> @@ -932,6 +934,8 @@
>                                 UNSPEC_SQSHRN UNSPEC_UQSHRN
>                                 UNSPEC_SQRSHRN UNSPEC_UQRSHRN])
>  
> +(define_int_iterator SQRDMLAH [UNSPEC_SQRDMLAH UNSPEC_SQRDMLSH])
> +

This name does not make it clear that you will iterate over an "A" and an
"S" form. I'd like to see a clearer naming choice, RDMAS? SQRDMLHADDSUB? etc.

Thanks,
James


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