1 # Machine description for AArch64 architecture.
2 # Copyright (C) 2009-2021 Free Software Foundation, Inc.
3 # Contributed by ARM Ltd.
5 # This file is part of GCC.
7 # GCC is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3, or (at your option)
12 # GCC is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with GCC; see the file COPYING3. If not see
19 # <http://www.gnu.org/licenses/>.
21 TM_H += $(srcdir)/config/aarch64/aarch64-cores.def
22 OPTIONS_H_EXTRA += $(srcdir)/config/aarch64/aarch64-cores.def \
23 $(srcdir)/config/aarch64/aarch64-arches.def \
24 $(srcdir)/config/aarch64/aarch64-fusion-pairs.def \
25 $(srcdir)/config/aarch64/aarch64-tuning-flags.def
27 $(srcdir)/config/aarch64/aarch64-tune.md: s-aarch64-tune-md; @true
28 s-aarch64-tune-md: $(srcdir)/config/aarch64/gentune.sh \
29 $(srcdir)/config/aarch64/aarch64-cores.def
30 $(SHELL) $(srcdir)/config/aarch64/gentune.sh \
31 $(srcdir)/config/aarch64/aarch64-cores.def > \
33 $(SHELL) $(srcdir)/../move-if-change tmp-aarch64-tune.md \
34 $(srcdir)/config/aarch64/aarch64-tune.md
35 $(STAMP) s-aarch64-tune-md
37 aarch64-builtins.o: $(srcdir)/config/aarch64/aarch64-builtins.c $(CONFIG_H) \
38 $(SYSTEM_H) coretypes.h $(TM_H) \
39 $(RTL_H) $(TREE_H) expr.h $(TM_P_H) $(RECOG_H) langhooks.h \
40 $(DIAGNOSTIC_CORE_H) $(OPTABS_H) \
41 $(srcdir)/config/aarch64/aarch64-simd-builtins.def \
42 $(srcdir)/config/aarch64/aarch64-simd-builtin-types.def \
43 aarch64-builtin-iterators.h
44 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
45 $(srcdir)/config/aarch64/aarch64-builtins.c
47 aarch64-sve-builtins.o: $(srcdir)/config/aarch64/aarch64-sve-builtins.cc \
48 $(srcdir)/config/aarch64/aarch64-sve-builtins.def \
49 $(srcdir)/config/aarch64/aarch64-sve-builtins-base.def \
50 $(srcdir)/config/aarch64/aarch64-sve-builtins-sve2.def \
51 $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) \
52 $(TM_P_H) memmodel.h insn-codes.h $(OPTABS_H) $(RECOG_H) $(DIAGNOSTIC_H) \
53 $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) fold-const.h $(GIMPLE_H) \
54 gimple-iterator.h gimplify.h explow.h $(EMIT_RTL_H) tree-vector-builder.h \
55 stor-layout.h $(REG_H) alias.h gimple-fold.h langhooks.h \
57 $(srcdir)/config/aarch64/aarch64-sve-builtins.h \
58 $(srcdir)/config/aarch64/aarch64-sve-builtins-shapes.h \
59 $(srcdir)/config/aarch64/aarch64-sve-builtins-base.h \
60 $(srcdir)/config/aarch64/aarch64-sve-builtins-sve2.h
61 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
62 $(srcdir)/config/aarch64/aarch64-sve-builtins.cc
64 aarch64-sve-builtins-shapes.o: \
65 $(srcdir)/config/aarch64/aarch64-sve-builtins-shapes.cc \
66 $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) \
67 $(TM_P_H) memmodel.h insn-codes.h $(OPTABS_H) \
68 $(srcdir)/config/aarch64/aarch64-sve-builtins.h \
69 $(srcdir)/config/aarch64/aarch64-sve-builtins-shapes.h
70 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
71 $(srcdir)/config/aarch64/aarch64-sve-builtins-shapes.cc
73 aarch64-sve-builtins-base.o: \
74 $(srcdir)/config/aarch64/aarch64-sve-builtins-base.cc \
75 $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) \
76 $(TM_P_H) memmodel.h insn-codes.h $(OPTABS_H) $(RECOG_H) \
77 $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) fold-const.h $(GIMPLE_H) \
78 gimple-iterator.h gimplify.h explow.h $(EMIT_RTL_H) tree-vector-builder.h \
79 rtx-vector-builder.h vec-perm-indices.h \
80 $(srcdir)/config/aarch64/aarch64-sve-builtins.h \
81 $(srcdir)/config/aarch64/aarch64-sve-builtins-shapes.h \
82 $(srcdir)/config/aarch64/aarch64-sve-builtins-base.h \
83 $(srcdir)/config/aarch64/aarch64-sve-builtins-functions.h
84 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
85 $(srcdir)/config/aarch64/aarch64-sve-builtins-base.cc
87 aarch64-sve-builtins-sve2.o: \
88 $(srcdir)/config/aarch64/aarch64-sve-builtins-sve2.cc \
89 $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) \
90 $(TM_P_H) memmodel.h insn-codes.h $(OPTABS_H) $(RECOG_H) \
91 $(EXPR_H) $(BASIC_BLOCK_H) $(FUNCTION_H) fold-const.h $(GIMPLE_H) \
92 gimple-iterator.h gimplify.h explow.h $(EMIT_RTL_H) tree-vector-builder.h \
93 rtx-vector-builder.h vec-perm-indices.h \
94 $(srcdir)/config/aarch64/aarch64-sve-builtins.h \
95 $(srcdir)/config/aarch64/aarch64-sve-builtins-shapes.h \
96 $(srcdir)/config/aarch64/aarch64-sve-builtins-sve2.h \
97 $(srcdir)/config/aarch64/aarch64-sve-builtins-functions.h
98 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
99 $(srcdir)/config/aarch64/aarch64-sve-builtins-sve2.cc
101 aarch64-builtin-iterators.h: $(srcdir)/config/aarch64/geniterators.sh \
102 $(srcdir)/config/aarch64/iterators.md
103 $(SHELL) $(srcdir)/config/aarch64/geniterators.sh \
104 $(srcdir)/config/aarch64/iterators.md > \
105 aarch64-builtin-iterators.h
107 aarch-common.o: $(srcdir)/config/arm/aarch-common.c $(CONFIG_H) $(SYSTEM_H) \
108 coretypes.h $(TM_H) $(TM_P_H) $(RTL_H) $(TREE_H) output.h $(C_COMMON_H)
109 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
110 $(srcdir)/config/arm/aarch-common.c
112 aarch64-c.o: $(srcdir)/config/aarch64/aarch64-c.c $(CONFIG_H) $(SYSTEM_H) \
113 coretypes.h $(TM_H) $(TREE_H) output.h $(C_COMMON_H) $(TARGET_H)
114 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
115 $(srcdir)/config/aarch64/aarch64-c.c
117 aarch64-d.o: $(srcdir)/config/aarch64/aarch64-d.c
121 PASSES_EXTRA += $(srcdir)/config/aarch64/aarch64-passes.def
123 cortex-a57-fma-steering.o: $(srcdir)/config/aarch64/cortex-a57-fma-steering.c \
124 $(CONFIG_H) $(SYSTEM_H) $(TM_H) $(REGS_H) insn-config.h $(RTL_BASE_H) \
125 dominance.h cfg.h cfganal.h $(BASIC_BLOCK_H) $(INSN_ATTR_H) $(RECOG_H) \
126 output.h hash-map.h $(DF_H) $(OBSTACK_H) $(TARGET_H) $(RTL_H) \
127 $(CONTEXT_H) $(TREE_PASS_H) regrename.h \
128 $(srcdir)/config/aarch64/aarch64-protos.h
129 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
130 $(srcdir)/config/aarch64/cortex-a57-fma-steering.c
132 aarch64-speculation.o: $(srcdir)/config/aarch64/aarch64-speculation.cc \
139 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_SPPFLAGS) $(INCLUDES) \
140 $(srcdir)/config/aarch64/aarch64-speculation.cc
142 falkor-tag-collision-avoidance.o: \
143 $(srcdir)/config/aarch64/falkor-tag-collision-avoidance.c \
144 $(CONFIG_H) $(SYSTEM_H) $(TM_H) $(REGS_H) insn-config.h $(RTL_BASE_H) \
145 dominance.h cfg.h cfganal.h $(BASIC_BLOCK_H) $(INSN_ATTR_H) $(RECOG_H) \
146 output.h hash-map.h $(DF_H) $(OBSTACK_H) $(TARGET_H) $(RTL_H) \
147 $(CONTEXT_H) $(TREE_PASS_H) regrename.h \
148 $(srcdir)/config/aarch64/aarch64-protos.h
149 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
150 $(srcdir)/config/aarch64/falkor-tag-collision-avoidance.c
152 aarch64-bti-insert.o: $(srcdir)/config/aarch64/aarch64-bti-insert.c \
153 $(CONFIG_H) $(SYSTEM_H) $(TM_H) $(REGS_H) insn-config.h $(RTL_BASE_H) \
154 dominance.h cfg.h cfganal.h $(BASIC_BLOCK_H) $(INSN_ATTR_H) $(RECOG_H) \
155 output.h hash-map.h $(DF_H) $(OBSTACK_H) $(TARGET_H) $(RTL_H) \
156 $(CONTEXT_H) $(TREE_PASS_H) regrename.h \
157 $(srcdir)/config/aarch64/aarch64-protos.h
158 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
159 $(srcdir)/config/aarch64/aarch64-bti-insert.c
161 aarch64-cc-fusion.o: $(srcdir)/config/aarch64/aarch64-cc-fusion.cc \
162 $(CONFIG_H) $(SYSTEM_H) $(CORETYPES_H) $(BACKEND_H) $(RTL_H) $(DF_H) \
163 $(RTL_SSA_H) tree-pass.h
164 $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
165 $(srcdir)/config/aarch64/aarch64-cc-fusion.cc
168 MULTILIB_OPTIONS = $(subst $(comma),/, $(patsubst %, mabi=%, $(subst $(comma),$(comma)mabi=,$(TM_MULTILIB_CONFIG))))
169 MULTILIB_DIRNAMES = $(subst $(comma), ,$(TM_MULTILIB_CONFIG))
171 insn-conditions.md: s-check-sve-md
172 s-check-sve-md: $(srcdir)/config/aarch64/check-sve-md.awk \
173 $(srcdir)/config/aarch64/aarch64-sve.md \
174 $(srcdir)/config/aarch64/aarch64-sve2.md
175 $(AWK) -f $(srcdir)/config/aarch64/check-sve-md.awk \
176 $(srcdir)/config/aarch64/aarch64-sve.md
177 $(AWK) -f $(srcdir)/config/aarch64/check-sve-md.awk \
178 $(srcdir)/config/aarch64/aarch64-sve2.md
179 $(STAMP) s-check-sve-md