]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/config/arc/arc-arch.h
Update copyright years.
[thirdparty/gcc.git] / gcc / config / arc / arc-arch.h
index bfd3f234f32a7f6a9331ab5010ccaee923f3e700..4c728a874536b7c37c1e5e3f53043ee47a8f6db6 100644 (file)
@@ -1,6 +1,6 @@
 /* Definitions of types that are used to store ARC architecture and
    device information.
-   Copyright (C) 2016 Free Software Foundation, Inc.
+   Copyright (C) 2016-2022 Free Software Foundation, Inc.
    Contributed by Claudiu Zissulescu (claziss@synopsys.com)
 
 This file is part of GCC.
@@ -28,7 +28,7 @@ along with GCC; see the file COPYING3.  If not see
 enum cpu_flags
   {
 #define ARC_OPT(NAME, CODE, MASK, DOC)     NAME = CODE,
-#define ARC_OPTX(NAME, CODE, VAR, VAL, DOC) NAME = CODE,
+#define ARC_OPTX(NAME, CODE, VAR, VAL, DOC0, DOC1) NAME = CODE,
 #include "arc-options.def"
 #undef ARC_OPT
 #undef ARC_OPTX
@@ -47,6 +47,23 @@ enum base_architecture
     BASE_ARCH_END
   };
 
+/* Architecture specific propoerties.  */
+
+typedef struct
+{
+  /* Architecture name.  */
+  const char *const name;
+
+  /* Architecture class.  */
+  enum base_architecture arch_id;
+
+  /* All allowed flags for this architecture.  */
+  const unsigned long long flags;
+
+  /* Default flags for this architecture.  It is a subset of
+     FLAGS.  */
+  const unsigned long long dflags;
+} arc_arch_t;
 
 /* Tune variants.  Needs to match the attr_tune enum.  */
 
@@ -54,10 +71,26 @@ enum arc_tune_attr
   {
     ARC_TUNE_NONE,
     ARC_TUNE_ARC600,
+    ARC_TUNE_ARC7XX,
     ARC_TUNE_ARC700_4_2_STD,
-    ARC_TUNE_ARC700_4_2_XMAC
+    ARC_TUNE_ARC700_4_2_XMAC,
+    ARC_TUNE_CORE_3,
+    ARC_TUNE_ARCHS4X,
+    ARC_TUNE_ARCHS4XD,
+    ARC_TUNE_ARCHS4XD_SLOW
   };
 
+/* Extra options for a processor template to hold any CPU specific
+   information which is not cover in arc-arches.def.  Such example is
+   the width of LP_COUNT register, or the number of register
+   banks.  */
+
+enum arc_extras
+{
+  HAS_NONE,
+  HAS_LPCOUNT_16
+};
+
 /* CPU specific properties.  */
 
 typedef struct
@@ -66,7 +99,7 @@ typedef struct
   const char *const name;
 
   /* Architecture class.  */
-  enum base_architecture arch;
+  const arc_arch_t *arch_info;
 
   /* Specific processor type.  */
   enum processor_type processor;
@@ -74,30 +107,13 @@ typedef struct
   /* Specific flags.  */
   const unsigned long long flags;
 
+  /* Extra value.  */
+  enum arc_extras extra;
+
   /* Tune value.  */
   enum arc_tune_attr tune;
-} arc_cpu_t;
-
-
-/* Architecture specific propoerties.  */
-
-typedef struct
-{
-  /* Architecture name.  */
-  const char *const name;
-
-  /* Architecture class.  */
-  enum base_architecture arch;
-
-  /* All allowed flags for this architecture.  */
-  const unsigned long long flags;
-
-  /* Default flags for this architecture.  It is a subset of
-     FLAGS.  */
-  const unsigned long long dflags;
-} arc_arch_t;
-
 
+} arc_cpu_t;
 
 const arc_arch_t arc_arch_types[] =
   {
@@ -111,13 +127,16 @@ const arc_arch_t arc_arch_types[] =
 
 const arc_cpu_t arc_cpu_types[] =
   {
-    {"none", BASE_ARCH_NONE, PROCESSOR_NONE, 0, ARC_TUNE_NONE},
-#define ARC_CPU(NAME, ARCH, FLAGS, TUNE)       \
-    {#NAME, BASE_ARCH_##ARCH, PROCESSOR_##NAME, FLAGS, ARC_TUNE_##TUNE},
+    {"none", NULL, PROCESSOR_NONE, 0, HAS_NONE, ARC_TUNE_NONE},
+#define ARC_CPU(NAME, ARCH, FLAGS, EXTRA, TUNE)                                \
+    {#NAME, &arc_arch_types [BASE_ARCH_##ARCH], PROCESSOR_##NAME, FLAGS, HAS_##EXTRA, ARC_TUNE_##TUNE },
 #include "arc-cpus.def"
 #undef ARC_CPU
-    {NULL, BASE_ARCH_END, PROCESSOR_NONE, 0, ARC_TUNE_NONE}
+    {NULL, NULL, PROCESSOR_NONE, 0, HAS_NONE, ARC_TUNE_NONE}
   };
 
+/* Currently selected cpu type.  */
+extern const arc_cpu_t *arc_selected_cpu;
+
 #endif
 #endif /* GCC_ARC_ARCH_H */