]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
arm: Add support for Arm Cortex-M52 CPU.
authorChung-Ju Wu <jasonwucj@gmail.com>
Tue, 9 Jan 2024 06:26:18 +0000 (14:26 +0800)
committerChung-Ju Wu <jasonwucj@gmail.com>
Tue, 9 Jan 2024 06:26:18 +0000 (14:26 +0800)
This patch adds the -mcpu support for the Arm Cortex-M52 CPU which is
an Armv8.1-M Mainline CPU supporting MVE and PACBTI by default.

-mcpu=cortex-m52 switch by default matches to -march=armv8.1-m.main+pacbti+mve.fp+fp.dp.

The cde feature is supported by specifying +cdecpN (e.g. -mcpu=cortex-m52+cdecp<N>),
where N is the coprocessor number 0 to 7.

Also following options are provided to disable default features.
+nomve.fp (disables MVE Floating point)
+nomve (disables MVE Integer and MVE Floating point)
+nodsp (disables dsp, MVE Integer and MVE Floating point)
+nopacbti (disables pacbti)
+nofp (disables floating point and MVE floating point)

Signed-off-by: Chung-Ju Wu <jasonwucj@gmail.com>
gcc/ChangeLog:

* config/arm/arm-cpus.in (cortex-m52): New cpu.
* config/arm/arm-tables.opt: Regenerate.
* config/arm/arm-tune.md: Regenerate.

gcc/config/arm/arm-cpus.in
gcc/config/arm/arm-tables.opt
gcc/config/arm/arm-tune.md

index 6fa7e315ef0b1176329bcc8a5b393a1e237c161a..451b15fe9f9321aee6b5df23e2b43abe34cdeeed 100644 (file)
@@ -1641,6 +1641,27 @@ begin cpu cortex-m35p
  costs v7m
 end cpu cortex-m35p
 
+begin cpu cortex-m52
+ cname cortexm52
+ tune flags LDSCHED
+ architecture armv8.1-m.main+pacbti+mve.fp+fp.dp
+ option nopacbti remove pacbti
+ option nomve.fp remove mve_float
+ option nomve remove mve mve_float
+ option nofp remove ALL_FP mve_float
+ option nodsp remove MVE mve_float
+ 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
+ isa quirk_no_asmcpu quirk_vlldm
+ costs v7m
+end cpu cortex-m52
+
 begin cpu cortex-m55
  cname cortexm55
  tune flags LDSCHED
index 9d6ae875ede6a504ad4ff0abd995872674e6ea39..d3eb9a97739bffe55533e471796b1a6d8a9668d0 100644 (file)
@@ -282,6 +282,9 @@ Enum(processor_type) String(cortex-m33) Value( TARGET_CPU_cortexm33)
 EnumValue
 Enum(processor_type) String(cortex-m35p) Value( TARGET_CPU_cortexm35p)
 
+EnumValue
+Enum(processor_type) String(cortex-m52) Value( TARGET_CPU_cortexm52)
+
 EnumValue
 Enum(processor_type) String(cortex-m55) Value( TARGET_CPU_cortexm55)
 
index 7318f03b97e886e4c297e9ab7891a9daf2793d70..6a631d8296627f4fcc63620aa4c7824406004162 100644 (file)
@@ -49,7 +49,7 @@
        cortexa710,cortexx1,cortexx1c,
        neoversen1,cortexa75cortexa55,cortexa76cortexa55,
        neoversev1,neoversen2,cortexm23,
-       cortexm33,cortexm35p,cortexm55,
-       starmc1,cortexm85,cortexr52,
-       cortexr52plus"
+       cortexm33,cortexm35p,cortexm52,
+       cortexm55,starmc1,cortexm85,
+       cortexr52,cortexr52plus"
        (const (symbol_ref "((enum attr_tune) arm_tune)")))