]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/arc/arc-arch.h
[ARC] Update warning messges.
[thirdparty/gcc.git] / gcc / config / arc / arc-arch.h
CommitLineData
f9ccf899
CZ
1/* Definitions of types that are used to store ARC architecture and
2 device information.
85ec4feb 3 Copyright (C) 2016-2018 Free Software Foundation, Inc.
f9ccf899
CZ
4 Contributed by Claudiu Zissulescu (claziss@synopsys.com)
5
6This file is part of GCC.
7
8GCC is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 3, or (at your option)
11any later version.
12
13GCC is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GCC; see the file COPYING3. If not see
20<http://www.gnu.org/licenses/>. */
21
22#ifndef GCC_ARC_ARCH_H
23#define GCC_ARC_ARCH_H
24
25#ifndef IN_LIBGCC2
26/* Architecture selection types. */
27
28enum cpu_flags
29 {
30#define ARC_OPT(NAME, CODE, MASK, DOC) NAME = CODE,
d65485c5 31#define ARC_OPTX(NAME, CODE, VAR, VAL, DOC0, DOC1) NAME = CODE,
f9ccf899
CZ
32#include "arc-options.def"
33#undef ARC_OPT
34#undef ARC_OPTX
35 FL_END
36 };
37
38
39/* ARC architecture variants. */
40
41enum base_architecture
42 {
43 BASE_ARCH_NONE,
44#define ARC_ARCH(NAME, ARCH, FLAGS, DFLAGS) BASE_ARCH_##ARCH,
45#include "arc-arches.def"
46#undef ARC_ARCH
47 BASE_ARCH_END
48 };
49
c3bde35a
AB
50/* Architecture specific propoerties. */
51
52typedef struct
53{
54 /* Architecture name. */
55 const char *const name;
56
57 /* Architecture class. */
58 enum base_architecture arch_id;
59
60 /* All allowed flags for this architecture. */
61 const unsigned long long flags;
62
63 /* Default flags for this architecture. It is a subset of
64 FLAGS. */
65 const unsigned long long dflags;
66} arc_arch_t;
f9ccf899
CZ
67
68/* Tune variants. Needs to match the attr_tune enum. */
69
70enum arc_tune_attr
71 {
72 ARC_TUNE_NONE,
73 ARC_TUNE_ARC600,
74 ARC_TUNE_ARC700_4_2_STD,
62f26645
CZ
75 ARC_TUNE_ARC700_4_2_XMAC,
76 ARC_TUNE_CORE_3
f9ccf899
CZ
77 };
78
79/* CPU specific properties. */
80
81typedef struct
82{
83 /* CPU name. */
84 const char *const name;
85
86 /* Architecture class. */
c3bde35a 87 const arc_arch_t *arch_info;
f9ccf899
CZ
88
89 /* Specific processor type. */
90 enum processor_type processor;
91
92 /* Specific flags. */
93 const unsigned long long flags;
94
95 /* Tune value. */
96 enum arc_tune_attr tune;
f9ccf899 97
c3bde35a 98} arc_cpu_t;
f9ccf899
CZ
99
100const arc_arch_t arc_arch_types[] =
101 {
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"
106#undef ARC_ARCH
107 {NULL, BASE_ARCH_END, 0, 0}
108 };
109
110const arc_cpu_t arc_cpu_types[] =
111 {
c3bde35a 112 {"none", NULL, PROCESSOR_NONE, 0, ARC_TUNE_NONE},
f9ccf899 113#define ARC_CPU(NAME, ARCH, FLAGS, TUNE) \
c3bde35a 114 {#NAME, &arc_arch_types [BASE_ARCH_##ARCH], PROCESSOR_##NAME, FLAGS, ARC_TUNE_##TUNE },
f9ccf899
CZ
115#include "arc-cpus.def"
116#undef ARC_CPU
c3bde35a 117 {NULL, NULL, PROCESSOR_NONE, 0, ARC_TUNE_NONE}
f9ccf899
CZ
118 };
119
c3bde35a
AB
120/* Currently selected cpu type. */
121extern const arc_cpu_t *arc_selected_cpu;
122
f9ccf899
CZ
123#endif
124#endif /* GCC_ARC_ARCH_H */