Re: [PATCH][Arm][2/4] Custom Datapath Extension intrinsics: instructions using FPU/MVE S/D registers
Hi kyrylo, > > From: Kyrylo Tkachov > Sent: Tuesday, April 7, 2020 3:07 PM > To: Dennis Zhang; gcc-patches@gcc.gnu.org > Cc: nd; Richard Earnshaw; Ramana Radhakrishnan > Subject: RE: [PATCH][Arm][2/4] Custom Datapath Extension intrinsics: > instructions using FPU/MVE S/D registers > > Hi Dennis, > > > -Original Message- > > From: Dennis Zhang > > Sent: 07 April 2020 13:31 > > To: gcc-patches@gcc.gnu.org > > Cc: nd ; Richard Earnshaw ; > > Ramana Radhakrishnan ; Kyrylo > > Tkachov > > Subject: Re: [PATCH][Arm][2/4] Custom Datapath Extension intrinsics: > > instructions using FPU/MVE S/D registers > > > > Hi all, > > > > This patch is updated to support DImode for vfp target as required by CDE. > > Changelog is updated as following. > > > > Is this ready for commit please? > > This is ok. > Has the first patch been updated and committed yet? > Thanks, > Kyrill > This patch has been committed as 07b9bfd02b88cad2f6b3f50ad610dd75cb989ed3. Many thanks Dennis > > > > Cheers > > Dennis > > > > gcc/ChangeLog: > > > > 2020-04-07 Dennis Zhang > > Matthew Malcomson > > > > * config/arm/arm-builtins.c (CX_IMM_QUALIFIERS): New macro. > > (CX_UNARY_QUALIFIERS, CX_BINARY_QUALIFIERS): Likewise. > > (CX_TERNARY_QUALIFIERS): Likewise. > > (ARM_BUILTIN_CDE_PATTERN_START): Likewise. > > (ARM_BUILTIN_CDE_PATTERN_END): Likewise. > > (arm_init_acle_builtins): Initialize CDE builtins. > > (arm_expand_acle_builtin): Check CDE constant operands. > > * config/arm/arm.h (ARM_CDE_CONST_COPROC): New macro to set the > > range > > of CDE constant operand. > > * config/arm/arm.c (arm_hard_regno_mode_ok): Support DImode for > > TARGET_VFP_BASE. > > (ARM_VCDE_CONST_1, ARM_VCDE_CONST_2, ARM_VCDE_CONST_3): > > Likewise. > > * config/arm/arm_cde.h (__arm_vcx1_u32): New macro of ACLE interface. > > (__arm_vcx1a_u32, __arm_vcx2_u32, __arm_vcx2a_u32): Likewise. > > (__arm_vcx3_u32, __arm_vcx3a_u32, __arm_vcx1d_u64): Likewise. > > (__arm_vcx1da_u64, __arm_vcx2d_u64, __arm_vcx2da_u64): Likewise. > > (__arm_vcx3d_u64, __arm_vcx3da_u64): Likewise. > > * config/arm/arm_cde_builtins.def: New file. > > * config/arm/iterators.md (V_reg): New attribute of SI. > > * config/arm/predicates.md (const_int_coproc_operand): New. > > (const_int_vcde1_operand, const_int_vcde2_operand): New. > > (const_int_vcde3_operand): New. > > * config/arm/unspecs.md (UNSPEC_VCDE, UNSPEC_VCDEA): New. > > * config/arm/vfp.md (arm_vcx1): New entry. > > (arm_vcx1a, arm_vcx2, arm_vcx2a): Likewise. > > (arm_vcx3, arm_vcx3a): Likewise. > > > > gcc/testsuite/ChangeLog: > > > > 2020-04-07 Dennis Zhang > > > > * gcc.target/arm/acle/cde_v_1.c: New test. > > * gcc.target/arm/acle/cde_v_1_err.c: New test. > > * gcc.target/arm/acle/cde_v_1_mve.c: New test. > > > > > Hi all, > > > > > > This patch is updated as attached. > > > It's rebased to the top. Is it ready for commit please? > > > > > > Cheers > > > Dennis > > > > > > > Hi all, > > > > > > > > This patch is part of a series that adds support for the ARMv8.m Custom > > Datapath Extension (CDE). > > > > It enables the ACLE intrinsics calling VCX1, VCX2, and VCX3 > > instructions who work with FPU/MVE 32-bit/64-bit registers. > > > > > > > > This patch depends on the CDE feature patch: > > https://gcc.gnu.org/pipermail/gcc-patches/2020-March/541921.html > > > > It also depends on the MVE framework patch: > > https://gcc.gnu.org/pipermail/gcc-patches/2020-February/540415.html > > > > ISA has been announced at > > https://developer.arm.com/architectures/instruction-sets/custom- > > instructions > > > > > > > > Regtested and bootstrapped for arm-none-linux-gnueabi-armv8-m.main. > > > > > > > > Is it OK for commit please? > > > > > > > > Cheers > > > > Dennis
RE: [PATCH][Arm][2/4] Custom Datapath Extension intrinsics: instructions using FPU/MVE S/D registers
Hi Dennis, > -Original Message- > From: Dennis Zhang > Sent: 07 April 2020 13:31 > To: gcc-patches@gcc.gnu.org > Cc: nd ; Richard Earnshaw ; > Ramana Radhakrishnan ; Kyrylo > Tkachov > Subject: Re: [PATCH][Arm][2/4] Custom Datapath Extension intrinsics: > instructions using FPU/MVE S/D registers > > Hi all, > > This patch is updated to support DImode for vfp target as required by CDE. > Changelog is updated as following. > > Is this ready for commit please? This is ok. Has the first patch been updated and committed yet? Thanks, Kyrill > > Cheers > Dennis > > gcc/ChangeLog: > > 2020-04-07 Dennis Zhang > Matthew Malcomson > > * config/arm/arm-builtins.c (CX_IMM_QUALIFIERS): New macro. > (CX_UNARY_QUALIFIERS, CX_BINARY_QUALIFIERS): Likewise. > (CX_TERNARY_QUALIFIERS): Likewise. > (ARM_BUILTIN_CDE_PATTERN_START): Likewise. > (ARM_BUILTIN_CDE_PATTERN_END): Likewise. > (arm_init_acle_builtins): Initialize CDE builtins. > (arm_expand_acle_builtin): Check CDE constant operands. > * config/arm/arm.h (ARM_CDE_CONST_COPROC): New macro to set the > range > of CDE constant operand. > * config/arm/arm.c (arm_hard_regno_mode_ok): Support DImode for > TARGET_VFP_BASE. > (ARM_VCDE_CONST_1, ARM_VCDE_CONST_2, ARM_VCDE_CONST_3): > Likewise. > * config/arm/arm_cde.h (__arm_vcx1_u32): New macro of ACLE interface. > (__arm_vcx1a_u32, __arm_vcx2_u32, __arm_vcx2a_u32): Likewise. > (__arm_vcx3_u32, __arm_vcx3a_u32, __arm_vcx1d_u64): Likewise. > (__arm_vcx1da_u64, __arm_vcx2d_u64, __arm_vcx2da_u64): Likewise. > (__arm_vcx3d_u64, __arm_vcx3da_u64): Likewise. > * config/arm/arm_cde_builtins.def: New file. > * config/arm/iterators.md (V_reg): New attribute of SI. > * config/arm/predicates.md (const_int_coproc_operand): New. > (const_int_vcde1_operand, const_int_vcde2_operand): New. > (const_int_vcde3_operand): New. > * config/arm/unspecs.md (UNSPEC_VCDE, UNSPEC_VCDEA): New. > * config/arm/vfp.md (arm_vcx1): New entry. > (arm_vcx1a, arm_vcx2, arm_vcx2a): Likewise. > (arm_vcx3, arm_vcx3a): Likewise. > > gcc/testsuite/ChangeLog: > > 2020-04-07 Dennis Zhang > > * gcc.target/arm/acle/cde_v_1.c: New test. > * gcc.target/arm/acle/cde_v_1_err.c: New test. > * gcc.target/arm/acle/cde_v_1_mve.c: New test. > > > Hi all, > > > > This patch is updated as attached. > > It's rebased to the top. Is it ready for commit please? > > > > Cheers > > Dennis > > > > > Hi all, > > > > > > This patch is part of a series that adds support for the ARMv8.m Custom > Datapath Extension (CDE). > > > It enables the ACLE intrinsics calling VCX1, VCX2, and VCX3 > instructions who work with FPU/MVE 32-bit/64-bit registers. > > > > > > This patch depends on the CDE feature patch: > https://gcc.gnu.org/pipermail/gcc-patches/2020-March/541921.html > > > It also depends on the MVE framework patch: > https://gcc.gnu.org/pipermail/gcc-patches/2020-February/540415.html > > > ISA has been announced at > https://developer.arm.com/architectures/instruction-sets/custom- > instructions > > > > > > Regtested and bootstrapped for arm-none-linux-gnueabi-armv8-m.main. > > > > > > Is it OK for commit please? > > > > > > Cheers > > > Dennis > > >
Re: [PATCH][Arm][2/4] Custom Datapath Extension intrinsics: instructions using FPU/MVE S/D registers
Hi all, This patch is updated to support DImode for vfp target as required by CDE. Changelog is updated as following. Is this ready for commit please? Cheers Dennis gcc/ChangeLog: 2020-04-07 Dennis Zhang Matthew Malcomson * config/arm/arm-builtins.c (CX_IMM_QUALIFIERS): New macro. (CX_UNARY_QUALIFIERS, CX_BINARY_QUALIFIERS): Likewise. (CX_TERNARY_QUALIFIERS): Likewise. (ARM_BUILTIN_CDE_PATTERN_START): Likewise. (ARM_BUILTIN_CDE_PATTERN_END): Likewise. (arm_init_acle_builtins): Initialize CDE builtins. (arm_expand_acle_builtin): Check CDE constant operands. * config/arm/arm.h (ARM_CDE_CONST_COPROC): New macro to set the range of CDE constant operand. * config/arm/arm.c (arm_hard_regno_mode_ok): Support DImode for TARGET_VFP_BASE. (ARM_VCDE_CONST_1, ARM_VCDE_CONST_2, ARM_VCDE_CONST_3): Likewise. * config/arm/arm_cde.h (__arm_vcx1_u32): New macro of ACLE interface. (__arm_vcx1a_u32, __arm_vcx2_u32, __arm_vcx2a_u32): Likewise. (__arm_vcx3_u32, __arm_vcx3a_u32, __arm_vcx1d_u64): Likewise. (__arm_vcx1da_u64, __arm_vcx2d_u64, __arm_vcx2da_u64): Likewise. (__arm_vcx3d_u64, __arm_vcx3da_u64): Likewise. * config/arm/arm_cde_builtins.def: New file. * config/arm/iterators.md (V_reg): New attribute of SI. * config/arm/predicates.md (const_int_coproc_operand): New. (const_int_vcde1_operand, const_int_vcde2_operand): New. (const_int_vcde3_operand): New. * config/arm/unspecs.md (UNSPEC_VCDE, UNSPEC_VCDEA): New. * config/arm/vfp.md (arm_vcx1): New entry. (arm_vcx1a, arm_vcx2, arm_vcx2a): Likewise. (arm_vcx3, arm_vcx3a): Likewise. gcc/testsuite/ChangeLog: 2020-04-07 Dennis Zhang * gcc.target/arm/acle/cde_v_1.c: New test. * gcc.target/arm/acle/cde_v_1_err.c: New test. * gcc.target/arm/acle/cde_v_1_mve.c: New test. > Hi all, > > This patch is updated as attached. > It's rebased to the top. Is it ready for commit please? > > Cheers > Dennis > > > Hi all, > > > > This patch is part of a series that adds support for the ARMv8.m Custom > > Datapath Extension (CDE). > > It enables the ACLE intrinsics calling VCX1, VCX2, and VCX3 > > instructions who work with FPU/MVE 32-bit/64-bit registers. > > > > This patch depends on the CDE feature patch: > > https://gcc.gnu.org/pipermail/gcc-patches/2020-March/541921.html > > It also depends on the MVE framework patch: > > https://gcc.gnu.org/pipermail/gcc-patches/2020-February/540415.html > > ISA has been announced at > > https://developer.arm.com/architectures/instruction-sets/custom-instructions > > > > Regtested and bootstrapped for arm-none-linux-gnueabi-armv8-m.main. > > > > Is it OK for commit please? > > > > Cheers > > Dennis > > arm-m-cde-vcxsidi-final-20200407-rb12663.patch Description: arm-m-cde-vcxsidi-final-20200407-rb12663.patch
Re: [PATCH][Arm][2/4] Custom Datapath Extension intrinsics: instructions using FPU/MVE S/D registers
Hi all, This patch is updated as attached. It's rebased to the top. Is it ready for commit please? Cheers Dennis > Hi all, > > This patch is part of a series that adds support for the ARMv8.m Custom > Datapath Extension (CDE). > It enables the ACLE intrinsics calling VCX1, VCX2, and VCX3 > instructions who work with FPU/MVE 32-bit/64-bit registers. > > This patch depends on the CDE feature patch: > https://gcc.gnu.org/pipermail/gcc-patches/2020-March/541921.html > It also depends on the MVE framework patch: > https://gcc.gnu.org/pipermail/gcc-patches/2020-February/540415.html > ISA has been announced at > https://developer.arm.com/architectures/instruction-sets/custom-instructions > > Regtested and bootstrapped for arm-none-linux-gnueabi-armv8-m.main. > > Is it OK for commit please? > > Cheers > Dennis > > gcc/ChangeLog: > > 2020-03-12 Dennis Zhang > Matthew Malcomson > > * config/arm/arm-builtins.c (CX_IMM_QUALIFIERS): New macro. > (CX_UNARY_QUALIFIERS, CX_BINARY_QUALIFIERS): Likewise. > (CX_TERNARY_QUALIFIERS): Likewise. > (ARM_BUILTIN_CDE_PATTERN_START): Likewise. > (ARM_BUILTIN_CDE_PATTERN_END): Likewise. > (arm_init_acle_builtins): Initialize CDE builtins. > (arm_expand_acle_builtin): Check CDE constant operands. > * config/arm/arm.h (ARM_CDE_CONST_COPROC): New macro to set the range > of CDE constant operand. > (ARM_VCDE_CONST_1, ARM_VCDE_CONST_2, ARM_VCDE_CONST_3): Likewise. > * config/arm/arm_cde.h (__arm_vcx1_u32): New macro of ACLE interface. > (__arm_vcx1a_u32, __arm_vcx2_u32, __arm_vcx2a_u32): Likewise. > (__arm_vcx3_u32, __arm_vcx3a_u32, __arm_vcx1d_u64): Likewise. > (__arm_vcx1da_u64, __arm_vcx2d_u64, __arm_vcx2da_u64): Likewise. > (__arm_vcx3d_u64, __arm_vcx3da_u64): Likewise. > * config/arm/arm_cde_builtins.def: New file. > * config/arm/iterators.md (V_reg): New attribute of SI. > * config/arm/predicates.md (const_int_coproc_operand): New. > (const_int_vcde1_operand, const_int_vcde2_operand): New. > (const_int_vcde3_operand): New. > * config/arm/unspecs.md (UNSPEC_VCDE, UNSPEC_VCDEA): New. > * config/arm/vfp.md (arm_vcx1): New entry. > (arm_vcx1a, arm_vcx2, arm_vcx2a): Likewise. > (arm_vcx3, arm_vcx3a): Likewise. > > gcc/testsuite/ChangeLog: > > 2020-03-12 Dennis Zhang > > * gcc.target/arm/acle/cde_v_1.c: New test. > * gcc.target/arm/acle/cde_v_1_err.c: New test. > * gcc.target/arm/acle/cde_v_1_mve.c: New test. > arm-m-cde-vcxsidi-final-20200319.patch Description: arm-m-cde-vcxsidi-final-20200319.patch
[PATCH][Arm][2/4] Custom Datapath Extension intrinsics: instructions using FPU/MVE S/D registers
Hi all, This patch is part of a series that adds support for the ARMv8.m Custom Datapath Extension (CDE). It enables the ACLE intrinsics calling VCX1, VCX2, and VCX3 instructions who work with FPU/MVE 32-bit/64-bit registers. This patch depends on the CDE feature patch: https://gcc.gnu.org/pipermail/gcc-patches/2020-March/541921.html It also depends on the MVE framework patch: https://gcc.gnu.org/pipermail/gcc-patches/2020-February/540415.html ISA has been announced at https://developer.arm.com/architectures/instruction-sets/custom-instructions Regtested and bootstrapped for arm-none-linux-gnueabi-armv8-m.main. Is it OK for commit please? Cheers Dennis gcc/ChangeLog: 2020-03-12 Dennis Zhang Matthew Malcomson * config/arm/arm-builtins.c (CX_IMM_QUALIFIERS): New macro. (CX_UNARY_QUALIFIERS, CX_BINARY_QUALIFIERS): Likewise. (CX_TERNARY_QUALIFIERS): Likewise. (ARM_BUILTIN_CDE_PATTERN_START): Likewise. (ARM_BUILTIN_CDE_PATTERN_END): Likewise. (arm_init_acle_builtins): Initialize CDE builtins. (arm_expand_acle_builtin): Check CDE constant operands. * config/arm/arm.h (ARM_CDE_CONST_COPROC): New macro to set the range of CDE constant operand. (ARM_VCDE_CONST_1, ARM_VCDE_CONST_2, ARM_VCDE_CONST_3): Likewise. * config/arm/arm_cde.h (__arm_vcx1_u32): New macro of ACLE interface. (__arm_vcx1a_u32, __arm_vcx2_u32, __arm_vcx2a_u32): Likewise. (__arm_vcx3_u32, __arm_vcx3a_u32, __arm_vcx1d_u64): Likewise. (__arm_vcx1da_u64, __arm_vcx2d_u64, __arm_vcx2da_u64): Likewise. (__arm_vcx3d_u64, __arm_vcx3da_u64): Likewise. * config/arm/arm_cde_builtins.def: New file. * config/arm/iterators.md (V_reg): New attribute of SI. * config/arm/predicates.md (const_int_coproc_operand): New. (const_int_vcde1_operand, const_int_vcde2_operand): New. (const_int_vcde3_operand): New. * config/arm/unspecs.md (UNSPEC_VCDE, UNSPEC_VCDEA): New. * config/arm/vfp.md (arm_vcx1): New entry. (arm_vcx1a, arm_vcx2, arm_vcx2a): Likewise. (arm_vcx3, arm_vcx3a): Likewise. gcc/testsuite/ChangeLog: 2020-03-12 Dennis Zhang * gcc.target/arm/acle/cde_v_1.c: New test. * gcc.target/arm/acle/cde_v_1_err.c: New test. * gcc.target/arm/acle/cde_v_1_mve.c: New test.diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c index 4d31405cf6e09e3a61faa3e8142940bbdb23c60a..89142a276b071b069cddabb5170ad0d4ca213d20 100644 --- a/gcc/config/arm/arm-builtins.c +++ b/gcc/config/arm/arm-builtins.c @@ -305,6 +305,35 @@ arm_mrrc_qualifiers[SIMD_MAX_BUILTIN_ARGS] #define MRRC_QUALIFIERS \ (arm_mrrc_qualifiers) +/* T (immediate, unsigned immediate). */ +static enum arm_type_qualifiers +arm_cx_imm_qualifiers[SIMD_MAX_BUILTIN_ARGS] + = { qualifier_none, qualifier_immediate, qualifier_unsigned_immediate }; +#define CX_IMM_QUALIFIERS (arm_cx_imm_qualifiers) + +/* T (immediate, T, unsigned immediate). */ +static enum arm_type_qualifiers +arm_cx_unary_qualifiers[SIMD_MAX_BUILTIN_ARGS] + = { qualifier_none, qualifier_immediate, qualifier_none, + qualifier_unsigned_immediate }; +#define CX_UNARY_QUALIFIERS (arm_cx_unary_qualifiers) + +/* T (immediate, T, T, unsigned immediate). */ +static enum arm_type_qualifiers +arm_cx_binary_qualifiers[SIMD_MAX_BUILTIN_ARGS] + = { qualifier_none, qualifier_immediate, + qualifier_none, qualifier_none, + qualifier_unsigned_immediate }; +#define CX_BINARY_QUALIFIERS (arm_cx_binary_qualifiers) + +/* T (immediate, T, T, T, unsigned immediate). */ +static enum arm_type_qualifiers +arm_cx_ternary_qualifiers[SIMD_MAX_BUILTIN_ARGS] + = { qualifier_none, qualifier_immediate, + qualifier_none, qualifier_none, qualifier_none, + qualifier_unsigned_immediate }; +#define CX_TERNARY_QUALIFIERS (arm_cx_ternary_qualifiers) + /* The first argument (return type) of a store should be void type, which we represent with qualifier_void. Their first operand will be a DImode pointer to the location to store to, so we must use @@ -438,7 +467,23 @@ static arm_builtin_datum acle_builtin_data[] = }; #undef VAR1 +/* IMM_MAX sets the maximum valid value of the CDE immediate operand. + ECF_FLAG sets the flag used for set_call_expr_flags. */ +#define VAR1(T, N, A, IMM_MAX, ECF_FLAG) \ + {{#N #A, UP (A), CODE_FOR_arm_##N##A, 0, T##_QUALIFIERS}, IMM_MAX, ECF_FLAG}, + +typedef struct { + arm_builtin_datum base; + unsigned int imm_max; + int ecf_flag; +} arm_builtin_cde_datum; + +static arm_builtin_cde_datum cde_builtin_data[] = +{ +#include "arm_cde_builtins.def" +}; +#undef VAR1 #define VAR1(T, N, X) \ ARM_BUILTIN_NEON_##N##X, @@ -732,6 +777,14 @@ enum arm_builtins #include "arm_acle_builtins.def" +#undef VAR1 +#define VAR1(T, N, X, ... ) \ + ARM_BUILTIN_##N##X, + + ARM_BUILTIN_CDE_BASE, + +#include "arm_cde_builtins.def" + ARM_BUILTIN_MAX }; @@ -7