Re: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension (CDE): enable the feature
Hi Kyrylo, > > From: Kyrylo Tkachov > Sent: Wednesday, April 8, 2020 1:34 PM > To: Dennis Zhang; gcc-patches@gcc.gnu.org > Cc: nd; Richard Earnshaw; Ramana Radhakrishnan > Subject: RE: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension > (CDE): enable the feature > > > -Original Message- > > From: Dennis Zhang > > Sent: 08 April 2020 12:34 > > To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org > > Cc: nd ; Richard Earnshaw ; > > Ramana Radhakrishnan > > Subject: Re: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension > > (CDE): enable the feature > > > > Hi Kyrylo > > > > > Hi Dennis, > > > > > > > -Original Message- > > > > From: Dennis Zhang > > > > Sent: 19 March 2020 14:03 > > > > To: Kyrylo Tkachov ; gcc- > > patc...@gcc.gnu.org > > > > Cc: nd ; Richard Earnshaw > > ; > > > > Ramana Radhakrishnan > > > > Subject: Re: [PATCH][Arm][1/3] Support for Arm Custom Datapath > > Extension > > > > (CDE): enable the feature > > > > > > > > Hi Kyrylo, > > > > > > > > >____________ > > > > >From: Kyrylo Tkachov > > > > >Sent: Wednesday, March 18, 2020 9:04 AM > > > > >To: Dennis Zhang; gcc-patches@gcc.gnu.org > > > > >Cc: nd; Richard Earnshaw; Ramana Radhakrishnan > > > > >Subject: RE: [PATCH][Arm][1/3] Support for Arm Custom Datapath > > > > >Extension (CDE): enable the feature > > > > > > > > > >Hi Dennis, > > > > > > > > > >> -Original Message- > > > > >> From: Dennis Zhang > > > > >> Sent: 12 March 2020 12:06 > > > > >> To: gcc-patches@gcc.gnu.org > > > > >> Cc: nd ; Richard Earnshaw > > ; > > > > >> Ramana Radhakrishnan ; Kyrylo > > > > Tkachov > > > > >> > > > > >> Subject: [PATCH][Arm][1/3] Support for Arm Custom Datapath > > Extension > > > > >> (CDE): enable the feature > > > > >> > > > > >> Hi all, > > > > >> > > > > >> This patch is part of a series that adds support for the ARMv8.m > > > > >> Custom Datapath Extension. > > > > >> This patch defines the options cdecp0-cdecp7 for CLI to enable the > > > > >> CDE on corresponding coprocessor 0-7. > > > > >> It also adds new check-effective for CDE feature. > > > > >> > > > > >> ISA has been announced at > > > > >> https://developer.arm.com/architectures/instruction-sets/custom- > > > > >> instructions > > > > >> > > > > >> Regtested and bootstrapped. > > > > >> > > > > >> Is it OK to commit please? > > > > > > > > > >Can you please rebase this patch on top of the recent MVE commits? > > > > >It currently doesn't apply cleanly to trunk. > > > > >Thanks, > > > > >Kyrill > > > > > > > > The rebase patches is as attached. > > > > Is it OK to commit? > > > > > > Ok, with a few fixes... > > > > > > diff --git a/gcc/testsuite/gcc.target/arm/pragma_cde.c > > b/gcc/testsuite/gcc.target/arm/pragma_cde.c > > > new file mode 100644 > > > index 000..97643a08405 > > > --- /dev/null > > > +++ b/gcc/testsuite/gcc.target/arm/pragma_cde.c > > > @@ -0,0 +1,98 @@ > > > +/* Test for CDE #prama target macros. */ > > > +/* { dg-do compile } */ > > > > > > Typo in "pragma" in the comment. > > > > > > > > > +# A series of routines are created to 1) check if a given architecture is > > > +# effective (check_effective_target_*_ok) and then 2) give the > > corresponding > > > +# flags that enable the architecture (add_options_for_*). > > > +# The series includes: > > > +# arm_v8m_main_cde: Armv8-m CDE (Custom Datapath Extension). > > > +# arm_v8m_main_cde_fp: Armv8-m CDE with FP registers. > > > +# arm_v8_1m_main_cde_mve: Armv8.1-m CDE with MVE. > > > +# Usage: > > > +# /* { dg-require-effective-target arm_v8m_main_cde_ok } */ > > > +# /* { dg-add-options arm_v8m_main_cde } */ > > > +# The tests are valid for Arm. >
RE: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension (CDE): enable the feature
> -Original Message- > From: Dennis Zhang > Sent: 08 April 2020 12:34 > To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org > Cc: nd ; Richard Earnshaw ; > Ramana Radhakrishnan > Subject: Re: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension > (CDE): enable the feature > > Hi Kyrylo > > > Hi Dennis, > > > > > -Original Message- > > > From: Dennis Zhang > > > Sent: 19 March 2020 14:03 > > > To: Kyrylo Tkachov ; gcc- > patc...@gcc.gnu.org > > > Cc: nd ; Richard Earnshaw > ; > > > Ramana Radhakrishnan > > > Subject: Re: [PATCH][Arm][1/3] Support for Arm Custom Datapath > Extension > > > (CDE): enable the feature > > > > > > Hi Kyrylo, > > > > > > > > > > >From: Kyrylo Tkachov > > > >Sent: Wednesday, March 18, 2020 9:04 AM > > > >To: Dennis Zhang; gcc-patches@gcc.gnu.org > > > >Cc: nd; Richard Earnshaw; Ramana Radhakrishnan > > > >Subject: RE: [PATCH][Arm][1/3] Support for Arm Custom Datapath > > > >Extension (CDE): enable the feature > > > > > > > >Hi Dennis, > > > > > > > >> -Original Message- > > > >> From: Dennis Zhang > > > >> Sent: 12 March 2020 12:06 > > > >> To: gcc-patches@gcc.gnu.org > > > >> Cc: nd ; Richard Earnshaw > ; > > > >> Ramana Radhakrishnan ; Kyrylo > > > Tkachov > > > >> > > > >> Subject: [PATCH][Arm][1/3] Support for Arm Custom Datapath > Extension > > > >> (CDE): enable the feature > > > >> > > > >> Hi all, > > > >> > > > >> This patch is part of a series that adds support for the ARMv8.m > > > >> Custom Datapath Extension. > > > >> This patch defines the options cdecp0-cdecp7 for CLI to enable the > > > >> CDE on corresponding coprocessor 0-7. > > > >> It also adds new check-effective for CDE feature. > > > >> > > > >> ISA has been announced at > > > >> https://developer.arm.com/architectures/instruction-sets/custom- > > > >> instructions > > > >> > > > >> Regtested and bootstrapped. > > > >> > > > >> Is it OK to commit please? > > > > > > > >Can you please rebase this patch on top of the recent MVE commits? > > > >It currently doesn't apply cleanly to trunk. > > > >Thanks, > > > >Kyrill > > > > > > The rebase patches is as attached. > > > Is it OK to commit? > > > > Ok, with a few fixes... > > > > diff --git a/gcc/testsuite/gcc.target/arm/pragma_cde.c > b/gcc/testsuite/gcc.target/arm/pragma_cde.c > > new file mode 100644 > > index 000..97643a08405 > > --- /dev/null > > +++ b/gcc/testsuite/gcc.target/arm/pragma_cde.c > > @@ -0,0 +1,98 @@ > > +/* Test for CDE #prama target macros. */ > > +/* { dg-do compile } */ > > > > Typo in "pragma" in the comment. > > > > > > +# A series of routines are created to 1) check if a given architecture is > > +# effective (check_effective_target_*_ok) and then 2) give the > corresponding > > +# flags that enable the architecture (add_options_for_*). > > +# The series includes: > > +# arm_v8m_main_cde: Armv8-m CDE (Custom Datapath Extension). > > +# arm_v8m_main_cde_fp: Armv8-m CDE with FP registers. > > +# arm_v8_1m_main_cde_mve: Armv8.1-m CDE with MVE. > > +# Usage: > > +# /* { dg-require-effective-target arm_v8m_main_cde_ok } */ > > +# /* { dg-add-options arm_v8m_main_cde } */ > > +# The tests are valid for Arm. > > + > > +foreach { armfunc armflag armdef } { > > > > New effective target checks need to be documented in doc/invoke.texi > > > > Thanks a lot for the review. > The document has been updated and the changelog, too. > Is it ready to commit please? Ok. Thanks, Kyrill > > Cheers > Dennis > > gcc/ChangeLog: > > 2020-04-08 Dennis Zhang > > * config.gcc: Add arm_cde.h. > * config/arm/arm-c.c (arm_cpu_builtins): Define or undefine > __ARM_FEATURE_CDE and __ARM_FEATURE_CDE_COPROC. > * config/arm/arm-cpus.in (cdecp0, cdecp1, ..., cdecp7): New options. > * config/arm/arm.c (arm_option_reconfigure_globals): Configure > arm_arch_cde and arm_arch_cde_coproc to store the feature bits. > * config/arm/arm.h (TARGET_CDE): New macro. > * config/arm/arm_cde.h: New file. > * doc/invoke.texi: Document CDE options +cdecp[0-7]. > * doc/sourcebuild.texi (arm_v8m_main_cde_ok): Document new target > supports option. > (arm_v8m_main_cde_fp, arm_v8_1m_main_cde_mve): Likewise. > > gcc/testsuite/ChangeLog: > > 2020-04-08 Dennis Zhang > > * gcc.target/arm/pragma_cde.c: New test. > * lib/target-supports.exp (arm_v8m_main_cde_ok): New target support > option. > (arm_v8m_main_cde_fp, arm_v8_1m_main_cde_mve): Likewise.
Re: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension (CDE): enable the feature
Hi Kyrylo > Hi Dennis, > > > -Original Message- > > From: Dennis Zhang > > Sent: 19 March 2020 14:03 > > To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org > > Cc: nd ; Richard Earnshaw ; > > Ramana Radhakrishnan > > Subject: Re: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension > > (CDE): enable the feature > > > > Hi Kyrylo, > > > > > > > >From: Kyrylo Tkachov > > >Sent: Wednesday, March 18, 2020 9:04 AM > > >To: Dennis Zhang; gcc-patches@gcc.gnu.org > > >Cc: nd; Richard Earnshaw; Ramana Radhakrishnan > > >Subject: RE: [PATCH][Arm][1/3] Support for Arm Custom Datapath > > >Extension (CDE): enable the feature > > > > > >Hi Dennis, > > > > > >> -Original Message- > > >> From: Dennis Zhang > > >> Sent: 12 March 2020 12:06 > > >> To: gcc-patches@gcc.gnu.org > > >> Cc: nd ; Richard Earnshaw ; > > >> Ramana Radhakrishnan ; Kyrylo > > Tkachov > > >> > > >> Subject: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension > > >> (CDE): enable the feature > > >> > > >> Hi all, > > >> > > >> This patch is part of a series that adds support for the ARMv8.m > > >> Custom Datapath Extension. > > >> This patch defines the options cdecp0-cdecp7 for CLI to enable the > > >> CDE on corresponding coprocessor 0-7. > > >> It also adds new check-effective for CDE feature. > > >> > > >> ISA has been announced at > > >> https://developer.arm.com/architectures/instruction-sets/custom- > > >> instructions > > >> > > >> Regtested and bootstrapped. > > >> > > >> Is it OK to commit please? > > > > > >Can you please rebase this patch on top of the recent MVE commits? > > >It currently doesn't apply cleanly to trunk. > > >Thanks, > > >Kyrill > > > > The rebase patches is as attached. > > Is it OK to commit? > > Ok, with a few fixes... > > diff --git a/gcc/testsuite/gcc.target/arm/pragma_cde.c > b/gcc/testsuite/gcc.target/arm/pragma_cde.c > new file mode 100644 > index 000..97643a08405 > --- /dev/null > +++ b/gcc/testsuite/gcc.target/arm/pragma_cde.c > @@ -0,0 +1,98 @@ > +/* Test for CDE #prama target macros. */ > +/* { dg-do compile } */ > > Typo in "pragma" in the comment. > > > +# A series of routines are created to 1) check if a given architecture is > +# effective (check_effective_target_*_ok) and then 2) give the corresponding > +# flags that enable the architecture (add_options_for_*). > +# The series includes: > +# arm_v8m_main_cde: Armv8-m CDE (Custom Datapath Extension). > +# arm_v8m_main_cde_fp: Armv8-m CDE with FP registers. > +# arm_v8_1m_main_cde_mve: Armv8.1-m CDE with MVE. > +# Usage: > +# /* { dg-require-effective-target arm_v8m_main_cde_ok } */ > +# /* { dg-add-options arm_v8m_main_cde } */ > +# The tests are valid for Arm. > + > +foreach { armfunc armflag armdef } { > > New effective target checks need to be documented in doc/invoke.texi > Thanks a lot for the review. The document has been updated and the changelog, too. Is it ready to commit please? Cheers Dennis gcc/ChangeLog: 2020-04-08 Dennis Zhang * config.gcc: Add arm_cde.h. * config/arm/arm-c.c (arm_cpu_builtins): Define or undefine __ARM_FEATURE_CDE and __ARM_FEATURE_CDE_COPROC. * config/arm/arm-cpus.in (cdecp0, cdecp1, ..., cdecp7): New options. * config/arm/arm.c (arm_option_reconfigure_globals): Configure arm_arch_cde and arm_arch_cde_coproc to store the feature bits. * config/arm/arm.h (TARGET_CDE): New macro. * config/arm/arm_cde.h: New file. * doc/invoke.texi: Document CDE options +cdecp[0-7]. * doc/sourcebuild.texi (arm_v8m_main_cde_ok): Document new target supports option. (arm_v8m_main_cde_fp, arm_v8_1m_main_cde_mve): Likewise. gcc/testsuite/ChangeLog: 2020-04-08 Dennis Zhang * gcc.target/arm/pragma_cde.c: New test. * lib/target-supports.exp (arm_v8m_main_cde_ok): New target support option. (arm_v8m_main_cde_fp, arm_v8_1m_main_cde_mve): Likewise. arm-m-cde-cli-20200408.patch Description: arm-m-cde-cli-20200408.patch
RE: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension (CDE): enable the feature
Hi Dennis, > -Original Message- > From: Dennis Zhang > Sent: 19 March 2020 14:03 > To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org > Cc: nd ; Richard Earnshaw ; > Ramana Radhakrishnan > Subject: Re: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension > (CDE): enable the feature > > Hi Kyrylo, > > > > >From: Kyrylo Tkachov > >Sent: Wednesday, March 18, 2020 9:04 AM > >To: Dennis Zhang; gcc-patches@gcc.gnu.org > >Cc: nd; Richard Earnshaw; Ramana Radhakrishnan > >Subject: RE: [PATCH][Arm][1/3] Support for Arm Custom Datapath > >Extension (CDE): enable the feature > > > >Hi Dennis, > > > >> -Original Message- > >> From: Dennis Zhang > >> Sent: 12 March 2020 12:06 > >> To: gcc-patches@gcc.gnu.org > >> Cc: nd ; Richard Earnshaw ; > >> Ramana Radhakrishnan ; Kyrylo > Tkachov > >> > >> Subject: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension > >> (CDE): enable the feature > >> > >> Hi all, > >> > >> This patch is part of a series that adds support for the ARMv8.m > >> Custom Datapath Extension. > >> This patch defines the options cdecp0-cdecp7 for CLI to enable the > >> CDE on corresponding coprocessor 0-7. > >> It also adds new check-effective for CDE feature. > >> > >> ISA has been announced at > >> https://developer.arm.com/architectures/instruction-sets/custom- > >> instructions > >> > >> Regtested and bootstrapped. > >> > >> Is it OK to commit please? > > > >Can you please rebase this patch on top of the recent MVE commits? > >It currently doesn't apply cleanly to trunk. > >Thanks, > >Kyrill > > The rebase patches is as attached. > Is it OK to commit? Ok, with a few fixes... diff --git a/gcc/testsuite/gcc.target/arm/pragma_cde.c b/gcc/testsuite/gcc.target/arm/pragma_cde.c new file mode 100644 index 000..97643a08405 --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pragma_cde.c @@ -0,0 +1,98 @@ +/* Test for CDE #prama target macros. */ +/* { dg-do compile } */ Typo in "pragma" in the comment. +# A series of routines are created to 1) check if a given architecture is +# effective (check_effective_target_*_ok) and then 2) give the corresponding +# flags that enable the architecture (add_options_for_*). +# The series includes: +# arm_v8m_main_cde: Armv8-m CDE (Custom Datapath Extension). +# arm_v8m_main_cde_fp: Armv8-m CDE with FP registers. +# arm_v8_1m_main_cde_mve: Armv8.1-m CDE with MVE. +# Usage: +# /* { dg-require-effective-target arm_v8m_main_cde_ok } */ +# /* { dg-add-options arm_v8m_main_cde } */ +# The tests are valid for Arm. + +foreach { armfunc armflag armdef } { New effective target checks need to be documented in doc/invoke.texi Ok with those changes. Kyrill > > Thanks > Dennis
Re: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension (CDE): enable the feature
Hi Kyrylo, > >From: Kyrylo Tkachov >Sent: Wednesday, March 18, 2020 9:04 AM >To: Dennis Zhang; gcc-patches@gcc.gnu.org >Cc: nd; Richard Earnshaw; Ramana Radhakrishnan >Subject: RE: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension >(CDE): enable the feature > >Hi Dennis, > >> -Original Message- >> From: Dennis Zhang >> Sent: 12 March 2020 12:06 >> To: gcc-patches@gcc.gnu.org >> Cc: nd ; Richard Earnshaw ; >> Ramana Radhakrishnan ; Kyrylo Tkachov >> >> Subject: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension >> (CDE): enable the feature >> >> Hi all, >> >> This patch is part of a series that adds support for the ARMv8.m >> Custom Datapath Extension. >> This patch defines the options cdecp0-cdecp7 for CLI to enable the CDE >> on corresponding coprocessor 0-7. >> It also adds new check-effective for CDE feature. >> >> ISA has been announced at >> https://developer.arm.com/architectures/instruction-sets/custom- >> instructions >> >> Regtested and bootstrapped. >> >> Is it OK to commit please? > >Can you please rebase this patch on top of the recent MVE commits? >It currently doesn't apply cleanly to trunk. >Thanks, >Kyrill The rebase patches is as attached. Is it OK to commit? Thanks Dennis arm-m-cde-cli-20200318.patch Description: arm-m-cde-cli-20200318.patch
RE: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension (CDE): enable the feature
Hi Dennis, > -Original Message- > From: Dennis Zhang > Sent: 12 March 2020 12:06 > To: gcc-patches@gcc.gnu.org > Cc: nd ; Richard Earnshaw ; > Ramana Radhakrishnan ; Kyrylo Tkachov > > Subject: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension > (CDE): enable the feature > > Hi all, > > This patch is part of a series that adds support for the ARMv8.m > Custom Datapath Extension. > This patch defines the options cdecp0-cdecp7 for CLI to enable the CDE > on corresponding coprocessor 0-7. > It also adds new check-effective for CDE feature. > > ISA has been announced at > https://developer.arm.com/architectures/instruction-sets/custom- > instructions > > Regtested and bootstrapped. > > Is it OK to commit please? Can you please rebase this patch on top of the recent MVE commits? It currently doesn't apply cleanly to trunk. Thanks, Kyrill > > Cheers > Dennis > > gcc/ChangeLog: > > 2020-03-11 Dennis Zhang > > * config.gcc: Add arm_cde.h. > * config/arm/arm-c.c (arm_cpu_builtins): Define or undefine > __ARM_FEATURE_CDE and __ARM_FEATURE_CDE_COPROC. > * config/arm/arm-cpus.in (cdecp0, cdecp1, ..., cdecp7): New options. > * config/arm/arm.c (arm_option_reconfigure_globals): Configure > arm_arch_cde and arm_arch_cde_coproc to store the feature bits. > * config/arm/arm.h (TARGET_CDE): New macro. > * config/arm/arm_cde.h: New file. > * doc/invoke.texi: Document cdecp[0-7] options. > > gcc/testsuite/ChangeLog: > > 2020-03-11 Dennis Zhang > > * gcc.target/arm/pragma_cde.c: New test. > * lib/target-supports.exp (arm_v8m_main_cde): New check effective. > (arm_v8m_main_cde_fp, arm_v8_1m_main_cde_mve): Likewise.
[PATCH][Arm][1/3] Support for Arm Custom Datapath Extension (CDE): enable the feature
Hi all, This patch is part of a series that adds support for the ARMv8.m Custom Datapath Extension. This patch defines the options cdecp0-cdecp7 for CLI to enable the CDE on corresponding coprocessor 0-7. It also adds new check-effective for CDE feature. ISA has been announced at https://developer.arm.com/architectures/instruction-sets/custom-instructions Regtested and bootstrapped. Is it OK to commit please? Cheers Dennis gcc/ChangeLog: 2020-03-11 Dennis Zhang * config.gcc: Add arm_cde.h. * config/arm/arm-c.c (arm_cpu_builtins): Define or undefine __ARM_FEATURE_CDE and __ARM_FEATURE_CDE_COPROC. * config/arm/arm-cpus.in (cdecp0, cdecp1, ..., cdecp7): New options. * config/arm/arm.c (arm_option_reconfigure_globals): Configure arm_arch_cde and arm_arch_cde_coproc to store the feature bits. * config/arm/arm.h (TARGET_CDE): New macro. * config/arm/arm_cde.h: New file. * doc/invoke.texi: Document cdecp[0-7] options. gcc/testsuite/ChangeLog: 2020-03-11 Dennis Zhang * gcc.target/arm/pragma_cde.c: New test. * lib/target-supports.exp (arm_v8m_main_cde): New check effective. (arm_v8m_main_cde_fp, arm_v8_1m_main_cde_mve): Likewise.diff --git a/gcc/config.gcc b/gcc/config.gcc index 2df4b36d190..43967b7d1ff 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -346,7 +346,7 @@ arc*-*-*) arm*-*-*) cpu_type=arm extra_objs="arm-builtins.o aarch-common.o" - extra_headers="mmintrin.h arm_neon.h arm_acle.h arm_fp16.h arm_cmse.h arm_bf16.h" + extra_headers="mmintrin.h arm_neon.h arm_acle.h arm_fp16.h arm_cmse.h arm_bf16.h arm_cde.h" target_type_format_char='%' c_target_objs="arm-c.o" cxx_target_objs="arm-c.o" diff --git a/gcc/config/arm/arm-c.c b/gcc/config/arm/arm-c.c index 38edaff17a2..77753015b34 100644 --- a/gcc/config/arm/arm-c.c +++ b/gcc/config/arm/arm-c.c @@ -227,6 +227,12 @@ arm_cpu_builtins (struct cpp_reader* pfile) builtin_define_with_int_value ("__ARM_FEATURE_COPROC", coproc_level); } + def_or_undef_macro (pfile, "__ARM_FEATURE_CDE", TARGET_CDE); + cpp_undef (pfile, "__ARM_FEATURE_CDE_COPROC"); + if (TARGET_CDE) +builtin_define_with_int_value ("__ARM_FEATURE_CDE_COPROC", + arm_arch_cde_coproc); + def_or_undef_macro (pfile, "__ARM_FEATURE_MATMUL_INT8", TARGET_I8MM); def_or_undef_macro (pfile, "__ARM_FEATURE_BF16_SCALAR_ARITHMETIC", TARGET_BF16_FP); diff --git a/gcc/config/arm/arm-cpus.in b/gcc/config/arm/arm-cpus.in index 96f584da325..5a7498e18db 100644 --- a/gcc/config/arm/arm-cpus.in +++ b/gcc/config/arm/arm-cpus.in @@ -207,6 +207,16 @@ define feature i8mm # Brain half-precision floating-point extension. Optional from v8.2-A. define feature bf16 +# Arm Custom Datapath Extension (CDE). +define feature cdecp0 +define feature cdecp1 +define feature cdecp2 +define feature cdecp3 +define feature cdecp4 +define feature cdecp5 +define feature cdecp6 +define feature cdecp7 + # Feature groups. Conventionally all (or mostly) upper case. # ALL_FPU lists all the feature bits associated with the floating-point # unit; these will all be removed if the floating-point unit is disabled @@ -670,6 +680,14 @@ begin arch armv8-m.main option fp.dp add FPv5 FP_DBL option nofp remove ALL_FP option nodsp remove armv7em + option cdecp0 add cdecp0 + option cdecp1 add cdecp1 + option cdecp2 add cdecp2 + option cdecp3 add cdecp3 + option cdecp4 add cdecp4 + option cdecp5 add cdecp5 + option cdecp6 add cdecp6 + option cdecp7 add cdecp7 end arch armv8-m.main begin arch armv8-r @@ -701,6 +719,14 @@ begin arch armv8.1-m.main option nofp remove ALL_FP option mve add mve armv7em option mve.fp add mve FPv5 fp16 mve_float armv7em + option cdecp0 add cdecp0 + option cdecp1 add cdecp1 + option cdecp2 add cdecp2 + option cdecp3 add cdecp3 + option cdecp4 add cdecp4 + option cdecp5 add cdecp5 + option cdecp6 add cdecp6 + option cdecp7 add cdecp7 end arch armv8.1-m.main begin arch iwmmxt diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 9cc7bc0e562..9f1e1ec5c88 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -1021,6 +1021,13 @@ int arm_arch_i8mm = 0; /* Nonzero if chip supports the BFloat16 instructions. */ int arm_arch_bf16 = 0; +/* Nonzero if chip supports the Custom Datapath Extension. */ +int arm_arch_cde = 0; +int arm_arch_cde_coproc = 0; +const int arm_arch_cde_coproc_bits[] = { + 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80 +}; + /* The condition codes of the ARM, and the inverse function. */ static const char * const arm_condition_codes[] = { @@ -3740,6 +3747,21 @@ arm_option_reconfigure_globals (void) arm_fp16_format = ARM_FP16_FORMAT_IEEE; } + arm_arch_cde = 0; + arm_arch_cde_coproc = 0; + int cde_bits[] = {isa_bit_cdecp0, isa_bit_cdecp1, isa_bit_cdecp2, + isa_bit_cdecp3, isa_bit_cdecp4, isa_bit_cdecp5, + isa_bit_cdecp6, isa_bit_cdecp7}; + for (int i = 0, e = ARRAY_SIZE (cde_bits); i <