1 /* Definitions of types that are used to store ARC architecture and
3 Copyright (C) 2016-2018 Free Software Foundation, Inc.
4 Contributed by Claudiu Zissulescu (claziss@synopsys.com)
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
22 #ifndef GCC_ARC_ARCH_H
23 #define GCC_ARC_ARCH_H
26 /* Architecture selection types. */
30 #define ARC_OPT(NAME, CODE, MASK, DOC) NAME = CODE,
31 #define ARC_OPTX(NAME, CODE, VAR, VAL, DOC) NAME = CODE,
32 #include "arc-options.def"
39 /* ARC architecture variants. */
41 enum base_architecture
44 #define ARC_ARCH(NAME, ARCH, FLAGS, DFLAGS) BASE_ARCH_##ARCH,
45 #include "arc-arches.def"
50 /* Architecture specific propoerties. */
54 /* Architecture name. */
55 const char *const name
;
57 /* Architecture class. */
58 enum base_architecture arch_id
;
60 /* All allowed flags for this architecture. */
61 const unsigned long long flags
;
63 /* Default flags for this architecture. It is a subset of
65 const unsigned long long dflags
;
68 /* Tune variants. Needs to match the attr_tune enum. */
74 ARC_TUNE_ARC700_4_2_STD
,
75 ARC_TUNE_ARC700_4_2_XMAC
,
79 /* CPU specific properties. */
84 const char *const name
;
86 /* Architecture class. */
87 const arc_arch_t
*arch_info
;
89 /* Specific processor type. */
90 enum processor_type processor
;
93 const unsigned long long flags
;
96 enum arc_tune_attr tune
;
100 const arc_arch_t arc_arch_types
[] =
102 {"none", BASE_ARCH_NONE
, 0, 0},
103 #define ARC_ARCH(NAME, ARCH, FLAGS, DFLAGS) \
104 {NAME, BASE_ARCH_##ARCH, FLAGS, DFLAGS},
105 #include "arc-arches.def"
107 {NULL
, BASE_ARCH_END
, 0, 0}
110 const arc_cpu_t arc_cpu_types
[] =
112 {"none", NULL
, PROCESSOR_NONE
, 0, ARC_TUNE_NONE
},
113 #define ARC_CPU(NAME, ARCH, FLAGS, TUNE) \
114 {#NAME, &arc_arch_types [BASE_ARCH_##ARCH], PROCESSOR_##NAME, FLAGS, ARC_TUNE_##TUNE },
115 #include "arc-cpus.def"
117 {NULL
, NULL
, PROCESSOR_NONE
, 0, ARC_TUNE_NONE
}
120 /* Currently selected cpu type. */
121 extern const arc_cpu_t
*arc_selected_cpu
;
124 #endif /* GCC_ARC_ARCH_H */