aarch64-protos.h revision 1.9 1 1.1 mrg /* Machine description for AArch64 architecture.
2 1.9 mrg Copyright (C) 2009-2020 Free Software Foundation, Inc.
3 1.1 mrg Contributed by ARM Ltd.
4 1.1 mrg
5 1.1 mrg This file is part of GCC.
6 1.1 mrg
7 1.1 mrg GCC is free software; you can redistribute it and/or modify it
8 1.1 mrg under the terms of the GNU General Public License as published by
9 1.1 mrg the Free Software Foundation; either version 3, or (at your option)
10 1.1 mrg any later version.
11 1.1 mrg
12 1.1 mrg GCC is distributed in the hope that it will be useful, but
13 1.1 mrg WITHOUT ANY WARRANTY; without even the implied warranty of
14 1.1 mrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 1.1 mrg General Public License for more details.
16 1.1 mrg
17 1.1 mrg You should have received a copy of the GNU General Public License
18 1.1 mrg along with GCC; see the file COPYING3. If not see
19 1.1 mrg <http://www.gnu.org/licenses/>. */
20 1.1 mrg
21 1.1 mrg
22 1.1 mrg #ifndef GCC_AARCH64_PROTOS_H
23 1.1 mrg #define GCC_AARCH64_PROTOS_H
24 1.1 mrg
25 1.4 mrg #include "input.h"
26 1.1 mrg
27 1.1 mrg /* SYMBOL_SMALL_ABSOLUTE: Generate symbol accesses through
28 1.1 mrg high and lo relocs that calculate the base address using a PC
29 1.1 mrg relative reloc.
30 1.1 mrg So to get the address of foo, we generate
31 1.1 mrg adrp x0, foo
32 1.1 mrg add x0, x0, :lo12:foo
33 1.1 mrg
34 1.1 mrg To load or store something to foo, we could use the corresponding
35 1.1 mrg load store variants that generate an
36 1.1 mrg ldr x0, [x0,:lo12:foo]
37 1.1 mrg or
38 1.1 mrg str x1, [x0, :lo12:foo]
39 1.1 mrg
40 1.1 mrg This corresponds to the small code model of the compiler.
41 1.1 mrg
42 1.4 mrg SYMBOL_SMALL_GOT_4G: Similar to the one above but this
43 1.1 mrg gives us the GOT entry of the symbol being referred to :
44 1.1 mrg Thus calculating the GOT entry for foo is done using the
45 1.1 mrg following sequence of instructions. The ADRP instruction
46 1.1 mrg gets us to the page containing the GOT entry of the symbol
47 1.4 mrg and the got_lo12 gets us the actual offset in it, together
48 1.4 mrg the base and offset, we can address 4G size GOT table.
49 1.1 mrg
50 1.1 mrg adrp x0, :got:foo
51 1.1 mrg ldr x0, [x0, :gotoff_lo12:foo]
52 1.1 mrg
53 1.1 mrg This corresponds to the small PIC model of the compiler.
54 1.1 mrg
55 1.4 mrg SYMBOL_SMALL_GOT_28K: Similar to SYMBOL_SMALL_GOT_4G, but used for symbol
56 1.4 mrg restricted within 28K GOT table size.
57 1.4 mrg
58 1.4 mrg ldr reg, [gp, #:gotpage_lo15:sym]
59 1.4 mrg
60 1.4 mrg This corresponds to -fpic model for small memory model of the compiler.
61 1.4 mrg
62 1.1 mrg SYMBOL_SMALL_TLSGD
63 1.1 mrg SYMBOL_SMALL_TLSDESC
64 1.4 mrg SYMBOL_SMALL_TLSIE
65 1.4 mrg SYMBOL_TINY_TLSIE
66 1.4 mrg SYMBOL_TLSLE12
67 1.4 mrg SYMBOL_TLSLE24
68 1.4 mrg SYMBOL_TLSLE32
69 1.4 mrg SYMBOL_TLSLE48
70 1.4 mrg Each of these represents a thread-local symbol, and corresponds to the
71 1.1 mrg thread local storage relocation operator for the symbol being referred to.
72 1.1 mrg
73 1.3 mrg SYMBOL_TINY_ABSOLUTE
74 1.3 mrg
75 1.3 mrg Generate symbol accesses as a PC relative address using a single
76 1.3 mrg instruction. To compute the address of symbol foo, we generate:
77 1.3 mrg
78 1.3 mrg ADR x0, foo
79 1.3 mrg
80 1.3 mrg SYMBOL_TINY_GOT
81 1.3 mrg
82 1.3 mrg Generate symbol accesses via the GOT using a single PC relative
83 1.3 mrg instruction. To compute the address of symbol foo, we generate:
84 1.3 mrg
85 1.3 mrg ldr t0, :got:foo
86 1.3 mrg
87 1.3 mrg The value of foo can subsequently read using:
88 1.3 mrg
89 1.3 mrg ldrb t0, [t0]
90 1.3 mrg
91 1.1 mrg SYMBOL_FORCE_TO_MEM : Global variables are addressed using
92 1.1 mrg constant pool. All variable addresses are spilled into constant
93 1.1 mrg pools. The constant pools themselves are addressed using PC
94 1.1 mrg relative accesses. This only works for the large code model.
95 1.1 mrg */
96 1.1 mrg enum aarch64_symbol_type
97 1.1 mrg {
98 1.1 mrg SYMBOL_SMALL_ABSOLUTE,
99 1.4 mrg SYMBOL_SMALL_GOT_28K,
100 1.4 mrg SYMBOL_SMALL_GOT_4G,
101 1.1 mrg SYMBOL_SMALL_TLSGD,
102 1.1 mrg SYMBOL_SMALL_TLSDESC,
103 1.4 mrg SYMBOL_SMALL_TLSIE,
104 1.3 mrg SYMBOL_TINY_ABSOLUTE,
105 1.3 mrg SYMBOL_TINY_GOT,
106 1.4 mrg SYMBOL_TINY_TLSIE,
107 1.4 mrg SYMBOL_TLSLE12,
108 1.4 mrg SYMBOL_TLSLE24,
109 1.4 mrg SYMBOL_TLSLE32,
110 1.4 mrg SYMBOL_TLSLE48,
111 1.1 mrg SYMBOL_FORCE_TO_MEM
112 1.1 mrg };
113 1.1 mrg
114 1.7 mrg /* Classifies the type of an address query.
115 1.7 mrg
116 1.7 mrg ADDR_QUERY_M
117 1.7 mrg Query what is valid for an "m" constraint and a memory_operand
118 1.7 mrg (the rules are the same for both).
119 1.7 mrg
120 1.7 mrg ADDR_QUERY_LDP_STP
121 1.7 mrg Query what is valid for a load/store pair.
122 1.7 mrg
123 1.8 mrg ADDR_QUERY_LDP_STP_N
124 1.8 mrg Query what is valid for a load/store pair, but narrow the incoming mode
125 1.8 mrg for address checking. This is used for the store_pair_lanes patterns.
126 1.8 mrg
127 1.7 mrg ADDR_QUERY_ANY
128 1.7 mrg Query what is valid for at least one memory constraint, which may
129 1.7 mrg allow things that "m" doesn't. For example, the SVE LDR and STR
130 1.7 mrg addressing modes allow a wider range of immediate offsets than "m"
131 1.7 mrg does. */
132 1.7 mrg enum aarch64_addr_query_type {
133 1.7 mrg ADDR_QUERY_M,
134 1.7 mrg ADDR_QUERY_LDP_STP,
135 1.8 mrg ADDR_QUERY_LDP_STP_N,
136 1.7 mrg ADDR_QUERY_ANY
137 1.7 mrg };
138 1.7 mrg
139 1.9 mrg /* Enumerates values that can be arbitrarily mixed into a calculation
140 1.9 mrg in order to make the result of the calculation unique to its use case.
141 1.9 mrg
142 1.9 mrg AARCH64_SALT_SSP_SET
143 1.9 mrg AARCH64_SALT_SSP_TEST
144 1.9 mrg Used when calculating the address of the stack protection canary value.
145 1.9 mrg There is a separate value for setting and testing the canary, meaning
146 1.9 mrg that these two operations produce unique addresses: they are different
147 1.9 mrg from each other, and from all other address calculations.
148 1.9 mrg
149 1.9 mrg The main purpose of this is to prevent the SET address being spilled
150 1.9 mrg to the stack and reloaded for the TEST, since that would give an
151 1.9 mrg attacker the opportunity to change the address of the expected
152 1.9 mrg canary value. */
153 1.9 mrg enum aarch64_salt_type {
154 1.9 mrg AARCH64_SALT_SSP_SET,
155 1.9 mrg AARCH64_SALT_SSP_TEST
156 1.9 mrg };
157 1.9 mrg
158 1.1 mrg /* A set of tuning parameters contains references to size and time
159 1.1 mrg cost models and vectors for address cost calculations, register
160 1.1 mrg move costs and memory move costs. */
161 1.1 mrg
162 1.3 mrg /* Scaled addressing modes can vary cost depending on the mode of the
163 1.3 mrg value to be loaded/stored. QImode values cannot use scaled
164 1.3 mrg addressing modes. */
165 1.1 mrg
166 1.3 mrg struct scale_addr_mode_cost
167 1.1 mrg {
168 1.3 mrg const int hi;
169 1.3 mrg const int si;
170 1.3 mrg const int di;
171 1.3 mrg const int ti;
172 1.1 mrg };
173 1.1 mrg
174 1.1 mrg /* Additional cost for addresses. */
175 1.1 mrg struct cpu_addrcost_table
176 1.1 mrg {
177 1.3 mrg const struct scale_addr_mode_cost addr_scale_costs;
178 1.1 mrg const int pre_modify;
179 1.1 mrg const int post_modify;
180 1.1 mrg const int register_offset;
181 1.4 mrg const int register_sextend;
182 1.4 mrg const int register_zextend;
183 1.1 mrg const int imm_offset;
184 1.1 mrg };
185 1.1 mrg
186 1.1 mrg /* Additional costs for register copies. Cost is for one register. */
187 1.1 mrg struct cpu_regmove_cost
188 1.1 mrg {
189 1.1 mrg const int GP2GP;
190 1.1 mrg const int GP2FP;
191 1.1 mrg const int FP2GP;
192 1.1 mrg const int FP2FP;
193 1.1 mrg };
194 1.1 mrg
195 1.3 mrg /* Cost for vector insn classes. */
196 1.3 mrg struct cpu_vector_cost
197 1.3 mrg {
198 1.6 mrg const int scalar_int_stmt_cost; /* Cost of any int scalar operation,
199 1.6 mrg excluding load and store. */
200 1.6 mrg const int scalar_fp_stmt_cost; /* Cost of any fp scalar operation,
201 1.3 mrg excluding load and store. */
202 1.3 mrg const int scalar_load_cost; /* Cost of scalar load. */
203 1.3 mrg const int scalar_store_cost; /* Cost of scalar store. */
204 1.6 mrg const int vec_int_stmt_cost; /* Cost of any int vector operation,
205 1.6 mrg excluding load, store, permute,
206 1.6 mrg vector-to-scalar and
207 1.6 mrg scalar-to-vector operation. */
208 1.6 mrg const int vec_fp_stmt_cost; /* Cost of any fp vector operation,
209 1.4 mrg excluding load, store, permute,
210 1.3 mrg vector-to-scalar and
211 1.3 mrg scalar-to-vector operation. */
212 1.4 mrg const int vec_permute_cost; /* Cost of permute operation. */
213 1.3 mrg const int vec_to_scalar_cost; /* Cost of vec-to-scalar operation. */
214 1.3 mrg const int scalar_to_vec_cost; /* Cost of scalar-to-vector
215 1.3 mrg operation. */
216 1.3 mrg const int vec_align_load_cost; /* Cost of aligned vector load. */
217 1.3 mrg const int vec_unalign_load_cost; /* Cost of unaligned vector load. */
218 1.3 mrg const int vec_unalign_store_cost; /* Cost of unaligned vector store. */
219 1.3 mrg const int vec_store_cost; /* Cost of vector store. */
220 1.3 mrg const int cond_taken_branch_cost; /* Cost of taken branch. */
221 1.3 mrg const int cond_not_taken_branch_cost; /* Cost of not taken branch. */
222 1.3 mrg };
223 1.3 mrg
224 1.4 mrg /* Branch costs. */
225 1.4 mrg struct cpu_branch_cost
226 1.4 mrg {
227 1.4 mrg const int predictable; /* Predictable branch or optimizing for size. */
228 1.4 mrg const int unpredictable; /* Unpredictable branch or optimizing for speed. */
229 1.4 mrg };
230 1.4 mrg
231 1.6 mrg /* Control approximate alternatives to certain FP operators. */
232 1.6 mrg #define AARCH64_APPROX_MODE(MODE) \
233 1.6 mrg ((MIN_MODE_FLOAT <= (MODE) && (MODE) <= MAX_MODE_FLOAT) \
234 1.9 mrg ? ((uint64_t) 1 << ((MODE) - MIN_MODE_FLOAT)) \
235 1.6 mrg : (MIN_MODE_VECTOR_FLOAT <= (MODE) && (MODE) <= MAX_MODE_VECTOR_FLOAT) \
236 1.9 mrg ? ((uint64_t) 1 << ((MODE) - MIN_MODE_VECTOR_FLOAT \
237 1.9 mrg + MAX_MODE_FLOAT - MIN_MODE_FLOAT + 1)) \
238 1.6 mrg : (0))
239 1.9 mrg #define AARCH64_APPROX_NONE ((uint64_t) 0)
240 1.9 mrg #define AARCH64_APPROX_ALL (~(uint64_t) 0)
241 1.6 mrg
242 1.6 mrg /* Allowed modes for approximations. */
243 1.6 mrg struct cpu_approx_modes
244 1.6 mrg {
245 1.9 mrg const uint64_t division; /* Division. */
246 1.9 mrg const uint64_t sqrt; /* Square root. */
247 1.9 mrg const uint64_t recip_sqrt; /* Reciprocal square root. */
248 1.6 mrg };
249 1.6 mrg
250 1.7 mrg /* Cache prefetch settings for prefetch-loop-arrays. */
251 1.7 mrg struct cpu_prefetch_tune
252 1.7 mrg {
253 1.7 mrg const int num_slots;
254 1.7 mrg const int l1_cache_size;
255 1.7 mrg const int l1_cache_line_size;
256 1.7 mrg const int l2_cache_size;
257 1.8 mrg /* Whether software prefetch hints should be issued for non-constant
258 1.8 mrg strides. */
259 1.8 mrg const bool prefetch_dynamic_strides;
260 1.8 mrg /* The minimum constant stride beyond which we should use prefetch
261 1.8 mrg hints for. */
262 1.8 mrg const int minimum_stride;
263 1.7 mrg const int default_opt_level;
264 1.7 mrg };
265 1.7 mrg
266 1.1 mrg struct tune_params
267 1.1 mrg {
268 1.4 mrg const struct cpu_cost_table *insn_extra_cost;
269 1.4 mrg const struct cpu_addrcost_table *addr_cost;
270 1.4 mrg const struct cpu_regmove_cost *regmove_cost;
271 1.4 mrg const struct cpu_vector_cost *vec_costs;
272 1.4 mrg const struct cpu_branch_cost *branch_costs;
273 1.6 mrg const struct cpu_approx_modes *approx_modes;
274 1.8 mrg /* Width of the SVE registers or SVE_NOT_IMPLEMENTED if not applicable.
275 1.8 mrg Only used for tuning decisions, does not disable VLA
276 1.8 mrg vectorization. */
277 1.8 mrg enum aarch64_sve_vector_bits_enum sve_width;
278 1.4 mrg int memmov_cost;
279 1.4 mrg int issue_rate;
280 1.4 mrg unsigned int fusible_ops;
281 1.8 mrg const char *function_align;
282 1.8 mrg const char *jump_align;
283 1.8 mrg const char *loop_align;
284 1.4 mrg int int_reassoc_width;
285 1.4 mrg int fp_reassoc_width;
286 1.4 mrg int vec_reassoc_width;
287 1.4 mrg int min_div_recip_mul_sf;
288 1.4 mrg int min_div_recip_mul_df;
289 1.4 mrg /* Value for aarch64_case_values_threshold; or 0 for the default. */
290 1.4 mrg unsigned int max_case_values;
291 1.4 mrg /* An enum specifying how to take into account CPU autoprefetch capabilities
292 1.4 mrg during instruction scheduling:
293 1.4 mrg - AUTOPREFETCHER_OFF: Do not take autoprefetch capabilities into account.
294 1.4 mrg - AUTOPREFETCHER_WEAK: Attempt to sort sequences of loads/store in order of
295 1.4 mrg offsets but allow the pipeline hazard recognizer to alter that order to
296 1.4 mrg maximize multi-issue opportunities.
297 1.4 mrg - AUTOPREFETCHER_STRONG: Attempt to sort sequences of loads/store in order of
298 1.4 mrg offsets and prefer this even if it restricts multi-issue opportunities. */
299 1.4 mrg
300 1.4 mrg enum aarch64_autoprefetch_model
301 1.4 mrg {
302 1.4 mrg AUTOPREFETCHER_OFF,
303 1.4 mrg AUTOPREFETCHER_WEAK,
304 1.4 mrg AUTOPREFETCHER_STRONG
305 1.4 mrg } autoprefetcher_model;
306 1.4 mrg
307 1.4 mrg unsigned int extra_tuning_flags;
308 1.7 mrg
309 1.7 mrg /* Place prefetch struct pointer at the end to enable type checking
310 1.7 mrg errors when tune_params misses elements (e.g., from erroneous merges). */
311 1.7 mrg const struct cpu_prefetch_tune *prefetch;
312 1.4 mrg };
313 1.4 mrg
314 1.8 mrg /* Classifies an address.
315 1.8 mrg
316 1.8 mrg ADDRESS_REG_IMM
317 1.8 mrg A simple base register plus immediate offset.
318 1.8 mrg
319 1.8 mrg ADDRESS_REG_WB
320 1.8 mrg A base register indexed by immediate offset with writeback.
321 1.8 mrg
322 1.8 mrg ADDRESS_REG_REG
323 1.8 mrg A base register indexed by (optionally scaled) register.
324 1.8 mrg
325 1.8 mrg ADDRESS_REG_UXTW
326 1.8 mrg A base register indexed by (optionally scaled) zero-extended register.
327 1.8 mrg
328 1.8 mrg ADDRESS_REG_SXTW
329 1.8 mrg A base register indexed by (optionally scaled) sign-extended register.
330 1.8 mrg
331 1.8 mrg ADDRESS_LO_SUM
332 1.8 mrg A LO_SUM rtx with a base register and "LO12" symbol relocation.
333 1.8 mrg
334 1.8 mrg ADDRESS_SYMBOLIC:
335 1.8 mrg A constant symbolic address, in pc-relative literal pool. */
336 1.8 mrg
337 1.8 mrg enum aarch64_address_type {
338 1.8 mrg ADDRESS_REG_IMM,
339 1.8 mrg ADDRESS_REG_WB,
340 1.8 mrg ADDRESS_REG_REG,
341 1.8 mrg ADDRESS_REG_UXTW,
342 1.8 mrg ADDRESS_REG_SXTW,
343 1.8 mrg ADDRESS_LO_SUM,
344 1.8 mrg ADDRESS_SYMBOLIC
345 1.8 mrg };
346 1.8 mrg
347 1.8 mrg /* Address information. */
348 1.8 mrg struct aarch64_address_info {
349 1.8 mrg enum aarch64_address_type type;
350 1.8 mrg rtx base;
351 1.8 mrg rtx offset;
352 1.8 mrg poly_int64 const_offset;
353 1.8 mrg int shift;
354 1.8 mrg enum aarch64_symbol_type symbol_type;
355 1.8 mrg };
356 1.8 mrg
357 1.4 mrg #define AARCH64_FUSION_PAIR(x, name) \
358 1.4 mrg AARCH64_FUSE_##name##_index,
359 1.4 mrg /* Supported fusion operations. */
360 1.4 mrg enum aarch64_fusion_pairs_index
361 1.4 mrg {
362 1.4 mrg #include "aarch64-fusion-pairs.def"
363 1.4 mrg AARCH64_FUSE_index_END
364 1.4 mrg };
365 1.4 mrg
366 1.4 mrg #define AARCH64_FUSION_PAIR(x, name) \
367 1.4 mrg AARCH64_FUSE_##name = (1u << AARCH64_FUSE_##name##_index),
368 1.4 mrg /* Supported fusion operations. */
369 1.4 mrg enum aarch64_fusion_pairs
370 1.4 mrg {
371 1.4 mrg AARCH64_FUSE_NOTHING = 0,
372 1.4 mrg #include "aarch64-fusion-pairs.def"
373 1.4 mrg AARCH64_FUSE_ALL = (1u << AARCH64_FUSE_index_END) - 1
374 1.1 mrg };
375 1.4 mrg
376 1.4 mrg #define AARCH64_EXTRA_TUNING_OPTION(x, name) \
377 1.4 mrg AARCH64_EXTRA_TUNE_##name##_index,
378 1.4 mrg /* Supported tuning flags indexes. */
379 1.4 mrg enum aarch64_extra_tuning_flags_index
380 1.4 mrg {
381 1.4 mrg #include "aarch64-tuning-flags.def"
382 1.4 mrg AARCH64_EXTRA_TUNE_index_END
383 1.4 mrg };
384 1.4 mrg
385 1.4 mrg
386 1.4 mrg #define AARCH64_EXTRA_TUNING_OPTION(x, name) \
387 1.4 mrg AARCH64_EXTRA_TUNE_##name = (1u << AARCH64_EXTRA_TUNE_##name##_index),
388 1.4 mrg /* Supported tuning flags. */
389 1.4 mrg enum aarch64_extra_tuning_flags
390 1.4 mrg {
391 1.4 mrg AARCH64_EXTRA_TUNE_NONE = 0,
392 1.4 mrg #include "aarch64-tuning-flags.def"
393 1.4 mrg AARCH64_EXTRA_TUNE_ALL = (1u << AARCH64_EXTRA_TUNE_index_END) - 1
394 1.4 mrg };
395 1.4 mrg
396 1.4 mrg /* Enum describing the various ways that the
397 1.4 mrg aarch64_parse_{arch,tune,cpu,extension} functions can fail.
398 1.4 mrg This way their callers can choose what kind of error to give. */
399 1.4 mrg
400 1.4 mrg enum aarch64_parse_opt_result
401 1.4 mrg {
402 1.4 mrg AARCH64_PARSE_OK, /* Parsing was successful. */
403 1.4 mrg AARCH64_PARSE_MISSING_ARG, /* Missing argument. */
404 1.4 mrg AARCH64_PARSE_INVALID_FEATURE, /* Invalid feature modifier. */
405 1.4 mrg AARCH64_PARSE_INVALID_ARG /* Invalid arch, tune, cpu arg. */
406 1.4 mrg };
407 1.4 mrg
408 1.7 mrg /* Enum to distinguish which type of check is to be done in
409 1.7 mrg aarch64_simd_valid_immediate. This is used as a bitmask where
410 1.7 mrg AARCH64_CHECK_MOV has both bits set. Thus AARCH64_CHECK_MOV will
411 1.7 mrg perform all checks. Adding new types would require changes accordingly. */
412 1.7 mrg enum simd_immediate_check {
413 1.7 mrg AARCH64_CHECK_ORR = 1 << 0,
414 1.7 mrg AARCH64_CHECK_BIC = 1 << 1,
415 1.7 mrg AARCH64_CHECK_MOV = AARCH64_CHECK_ORR | AARCH64_CHECK_BIC
416 1.7 mrg };
417 1.7 mrg
418 1.9 mrg /* The key type that -msign-return-address should use. */
419 1.9 mrg enum aarch64_key_type {
420 1.9 mrg AARCH64_KEY_A,
421 1.9 mrg AARCH64_KEY_B
422 1.9 mrg };
423 1.9 mrg
424 1.9 mrg extern enum aarch64_key_type aarch64_ra_sign_key;
425 1.9 mrg
426 1.4 mrg extern struct tune_params aarch64_tune_params;
427 1.1 mrg
428 1.9 mrg /* The available SVE predicate patterns, known in the ACLE as "svpattern". */
429 1.9 mrg #define AARCH64_FOR_SVPATTERN(T) \
430 1.9 mrg T (POW2, pow2, 0) \
431 1.9 mrg T (VL1, vl1, 1) \
432 1.9 mrg T (VL2, vl2, 2) \
433 1.9 mrg T (VL3, vl3, 3) \
434 1.9 mrg T (VL4, vl4, 4) \
435 1.9 mrg T (VL5, vl5, 5) \
436 1.9 mrg T (VL6, vl6, 6) \
437 1.9 mrg T (VL7, vl7, 7) \
438 1.9 mrg T (VL8, vl8, 8) \
439 1.9 mrg T (VL16, vl16, 9) \
440 1.9 mrg T (VL32, vl32, 10) \
441 1.9 mrg T (VL64, vl64, 11) \
442 1.9 mrg T (VL128, vl128, 12) \
443 1.9 mrg T (VL256, vl256, 13) \
444 1.9 mrg T (MUL4, mul4, 29) \
445 1.9 mrg T (MUL3, mul3, 30) \
446 1.9 mrg T (ALL, all, 31)
447 1.9 mrg
448 1.9 mrg /* The available SVE prefetch operations, known in the ACLE as "svprfop". */
449 1.9 mrg #define AARCH64_FOR_SVPRFOP(T) \
450 1.9 mrg T (PLDL1KEEP, pldl1keep, 0) \
451 1.9 mrg T (PLDL1STRM, pldl1strm, 1) \
452 1.9 mrg T (PLDL2KEEP, pldl2keep, 2) \
453 1.9 mrg T (PLDL2STRM, pldl2strm, 3) \
454 1.9 mrg T (PLDL3KEEP, pldl3keep, 4) \
455 1.9 mrg T (PLDL3STRM, pldl3strm, 5) \
456 1.9 mrg T (PSTL1KEEP, pstl1keep, 8) \
457 1.9 mrg T (PSTL1STRM, pstl1strm, 9) \
458 1.9 mrg T (PSTL2KEEP, pstl2keep, 10) \
459 1.9 mrg T (PSTL2STRM, pstl2strm, 11) \
460 1.9 mrg T (PSTL3KEEP, pstl3keep, 12) \
461 1.9 mrg T (PSTL3STRM, pstl3strm, 13)
462 1.9 mrg
463 1.9 mrg #define AARCH64_SVENUM(UPPER, LOWER, VALUE) AARCH64_SV_##UPPER = VALUE,
464 1.9 mrg enum aarch64_svpattern {
465 1.9 mrg AARCH64_FOR_SVPATTERN (AARCH64_SVENUM)
466 1.9 mrg AARCH64_NUM_SVPATTERNS
467 1.9 mrg };
468 1.9 mrg
469 1.9 mrg enum aarch64_svprfop {
470 1.9 mrg AARCH64_FOR_SVPRFOP (AARCH64_SVENUM)
471 1.9 mrg AARCH64_NUM_SVPRFOPS
472 1.9 mrg };
473 1.9 mrg #undef AARCH64_SVENUM
474 1.9 mrg
475 1.9 mrg /* It's convenient to divide the built-in function codes into groups,
476 1.9 mrg rather than having everything in a single enum. This type enumerates
477 1.9 mrg those groups. */
478 1.9 mrg enum aarch64_builtin_class
479 1.9 mrg {
480 1.9 mrg AARCH64_BUILTIN_GENERAL,
481 1.9 mrg AARCH64_BUILTIN_SVE
482 1.9 mrg };
483 1.9 mrg
484 1.9 mrg /* Built-in function codes are structured so that the low
485 1.9 mrg AARCH64_BUILTIN_SHIFT bits contain the aarch64_builtin_class
486 1.9 mrg and the upper bits contain a group-specific subcode. */
487 1.9 mrg const unsigned int AARCH64_BUILTIN_SHIFT = 1;
488 1.9 mrg
489 1.9 mrg /* Mask that selects the aarch64_builtin_class part of a function code. */
490 1.9 mrg const unsigned int AARCH64_BUILTIN_CLASS = (1 << AARCH64_BUILTIN_SHIFT) - 1;
491 1.9 mrg
492 1.9 mrg void aarch64_post_cfi_startproc (void);
493 1.7 mrg poly_int64 aarch64_initial_elimination_offset (unsigned, unsigned);
494 1.3 mrg int aarch64_get_condition_code (rtx);
495 1.7 mrg bool aarch64_address_valid_for_prefetch_p (rtx, bool);
496 1.3 mrg bool aarch64_bitmask_imm (HOST_WIDE_INT val, machine_mode);
497 1.6 mrg unsigned HOST_WIDE_INT aarch64_and_split_imm1 (HOST_WIDE_INT val_in);
498 1.6 mrg unsigned HOST_WIDE_INT aarch64_and_split_imm2 (HOST_WIDE_INT val_in);
499 1.6 mrg bool aarch64_and_bitmask_imm (unsigned HOST_WIDE_INT val_in, machine_mode mode);
500 1.4 mrg int aarch64_branch_cost (bool, bool);
501 1.4 mrg enum aarch64_symbol_type aarch64_classify_symbolic_expression (rtx);
502 1.9 mrg opt_machine_mode aarch64_vq_mode (scalar_mode);
503 1.9 mrg opt_machine_mode aarch64_full_sve_mode (scalar_mode);
504 1.7 mrg bool aarch64_can_const_movi_rtx_p (rtx x, machine_mode mode);
505 1.3 mrg bool aarch64_const_vec_all_same_int_p (rtx, HOST_WIDE_INT);
506 1.7 mrg bool aarch64_const_vec_all_same_in_range_p (rtx, HOST_WIDE_INT,
507 1.7 mrg HOST_WIDE_INT);
508 1.1 mrg bool aarch64_constant_address_p (rtx);
509 1.6 mrg bool aarch64_emit_approx_div (rtx, rtx, rtx);
510 1.6 mrg bool aarch64_emit_approx_sqrt (rtx, rtx, bool);
511 1.9 mrg void aarch64_expand_call (rtx, rtx, rtx, bool);
512 1.9 mrg bool aarch64_expand_cpymem (rtx *);
513 1.1 mrg bool aarch64_float_const_zero_rtx_p (rtx);
514 1.7 mrg bool aarch64_float_const_rtx_p (rtx);
515 1.1 mrg bool aarch64_function_arg_regno_p (unsigned);
516 1.6 mrg bool aarch64_fusion_enabled_p (enum aarch64_fusion_pairs);
517 1.9 mrg bool aarch64_gen_cpymemqi (rtx *);
518 1.7 mrg bool aarch64_is_extend_from_extract (scalar_int_mode, rtx, rtx);
519 1.1 mrg bool aarch64_is_long_call_p (rtx);
520 1.4 mrg bool aarch64_is_noplt_call_p (rtx);
521 1.1 mrg bool aarch64_label_mentioned_p (rtx);
522 1.4 mrg void aarch64_declare_function_name (FILE *, const char*, tree);
523 1.8 mrg void aarch64_asm_output_alias (FILE *, const tree, const tree);
524 1.8 mrg void aarch64_asm_output_external (FILE *, tree, const char*);
525 1.1 mrg bool aarch64_legitimate_pic_operand_p (rtx);
526 1.7 mrg bool aarch64_mask_and_shift_for_ubfiz_p (scalar_int_mode, rtx, rtx);
527 1.8 mrg bool aarch64_masks_and_shift_for_bfi_p (scalar_int_mode, unsigned HOST_WIDE_INT,
528 1.8 mrg unsigned HOST_WIDE_INT,
529 1.8 mrg unsigned HOST_WIDE_INT);
530 1.3 mrg bool aarch64_zero_extend_const_eq (machine_mode, rtx, machine_mode, rtx);
531 1.3 mrg bool aarch64_move_imm (HOST_WIDE_INT, machine_mode);
532 1.9 mrg machine_mode aarch64_sve_int_mode (machine_mode);
533 1.7 mrg opt_machine_mode aarch64_sve_pred_mode (unsigned int);
534 1.9 mrg machine_mode aarch64_sve_pred_mode (machine_mode);
535 1.9 mrg opt_machine_mode aarch64_sve_data_mode (scalar_mode, poly_uint64);
536 1.9 mrg bool aarch64_sve_mode_p (machine_mode);
537 1.9 mrg HOST_WIDE_INT aarch64_fold_sve_cnt_pat (aarch64_svpattern, unsigned int);
538 1.7 mrg bool aarch64_sve_cnt_immediate_p (rtx);
539 1.9 mrg bool aarch64_sve_scalar_inc_dec_immediate_p (rtx);
540 1.7 mrg bool aarch64_sve_addvl_addpl_immediate_p (rtx);
541 1.9 mrg bool aarch64_sve_vector_inc_dec_immediate_p (rtx);
542 1.7 mrg int aarch64_add_offset_temporaries (rtx);
543 1.7 mrg void aarch64_split_add_offset (scalar_int_mode, rtx, rtx, rtx, rtx, rtx);
544 1.4 mrg bool aarch64_mov_operand_p (rtx, machine_mode);
545 1.7 mrg rtx aarch64_reverse_mask (machine_mode, unsigned int);
546 1.7 mrg bool aarch64_offset_7bit_signed_scaled_p (machine_mode, poly_int64);
547 1.8 mrg bool aarch64_offset_9bit_signed_unscaled_p (machine_mode, poly_int64);
548 1.9 mrg char *aarch64_output_sve_prefetch (const char *, rtx, const char *);
549 1.7 mrg char *aarch64_output_sve_cnt_immediate (const char *, const char *, rtx);
550 1.9 mrg char *aarch64_output_sve_cnt_pat_immediate (const char *, const char *, rtx *);
551 1.9 mrg char *aarch64_output_sve_scalar_inc_dec (rtx);
552 1.9 mrg char *aarch64_output_sve_addvl_addpl (rtx);
553 1.9 mrg char *aarch64_output_sve_vector_inc_dec (const char *, rtx);
554 1.7 mrg char *aarch64_output_scalar_simd_mov_immediate (rtx, scalar_int_mode);
555 1.7 mrg char *aarch64_output_simd_mov_immediate (rtx, unsigned,
556 1.7 mrg enum simd_immediate_check w = AARCH64_CHECK_MOV);
557 1.7 mrg char *aarch64_output_sve_mov_immediate (rtx);
558 1.9 mrg char *aarch64_output_sve_ptrues (rtx);
559 1.3 mrg bool aarch64_pad_reg_upward (machine_mode, const_tree, bool);
560 1.1 mrg bool aarch64_regno_ok_for_base_p (int, bool);
561 1.1 mrg bool aarch64_regno_ok_for_index_p (int, bool);
562 1.7 mrg bool aarch64_reinterpret_float_as_int (rtx value, unsigned HOST_WIDE_INT *fail);
563 1.3 mrg bool aarch64_simd_check_vect_par_cnst_half (rtx op, machine_mode mode,
564 1.3 mrg bool high);
565 1.7 mrg bool aarch64_simd_scalar_immediate_valid_for_move (rtx, scalar_int_mode);
566 1.3 mrg bool aarch64_simd_shift_imm_p (rtx, machine_mode, bool);
567 1.9 mrg bool aarch64_sve_ptrue_svpattern_p (rtx, struct simd_immediate_info *);
568 1.7 mrg bool aarch64_simd_valid_immediate (rtx, struct simd_immediate_info *,
569 1.7 mrg enum simd_immediate_check w = AARCH64_CHECK_MOV);
570 1.7 mrg rtx aarch64_check_zero_based_sve_index_immediate (rtx);
571 1.7 mrg bool aarch64_sve_index_immediate_p (rtx);
572 1.9 mrg bool aarch64_sve_arith_immediate_p (machine_mode, rtx, bool);
573 1.9 mrg bool aarch64_sve_sqadd_sqsub_immediate_p (machine_mode, rtx, bool);
574 1.7 mrg bool aarch64_sve_bitmask_immediate_p (rtx);
575 1.7 mrg bool aarch64_sve_dup_immediate_p (rtx);
576 1.7 mrg bool aarch64_sve_cmp_immediate_p (rtx, bool);
577 1.7 mrg bool aarch64_sve_float_arith_immediate_p (rtx, bool);
578 1.7 mrg bool aarch64_sve_float_mul_immediate_p (rtx);
579 1.6 mrg bool aarch64_split_dimode_const_store (rtx, rtx);
580 1.1 mrg bool aarch64_symbolic_address_p (rtx);
581 1.1 mrg bool aarch64_uimm12_shift (HOST_WIDE_INT);
582 1.9 mrg int aarch64_movk_shift (const wide_int_ref &, const wide_int_ref &);
583 1.3 mrg bool aarch64_use_return_insn_p (void);
584 1.1 mrg const char *aarch64_output_casesi (rtx *);
585 1.3 mrg
586 1.9 mrg unsigned int aarch64_tlsdesc_abi_id ();
587 1.7 mrg enum aarch64_symbol_type aarch64_classify_symbol (rtx, HOST_WIDE_INT);
588 1.1 mrg enum aarch64_symbol_type aarch64_classify_tls_symbol (rtx);
589 1.1 mrg enum reg_class aarch64_regno_regclass (unsigned);
590 1.1 mrg int aarch64_asm_preferred_eh_data_format (int, int);
591 1.4 mrg int aarch64_fpconst_pow_of_2 (rtx);
592 1.9 mrg int aarch64_fpconst_pow2_recip (rtx);
593 1.3 mrg machine_mode aarch64_hard_regno_caller_save_mode (unsigned, unsigned,
594 1.3 mrg machine_mode);
595 1.1 mrg int aarch64_uxt_size (int, HOST_WIDE_INT);
596 1.4 mrg int aarch64_vec_fpconst_pow_of_2 (rtx);
597 1.4 mrg rtx aarch64_eh_return_handler_rtx (void);
598 1.4 mrg rtx aarch64_mask_from_zextract_ops (rtx, rtx);
599 1.1 mrg const char *aarch64_output_move_struct (rtx *operands);
600 1.9 mrg rtx aarch64_return_addr_rtx (void);
601 1.1 mrg rtx aarch64_return_addr (int, rtx);
602 1.6 mrg rtx aarch64_simd_gen_const_vector_dup (machine_mode, HOST_WIDE_INT);
603 1.1 mrg bool aarch64_simd_mem_operand_p (rtx);
604 1.7 mrg bool aarch64_sve_ld1r_operand_p (rtx);
605 1.9 mrg bool aarch64_sve_ld1rq_operand_p (rtx);
606 1.9 mrg bool aarch64_sve_ld1ro_operand_p (rtx, scalar_mode);
607 1.9 mrg bool aarch64_sve_ldff1_operand_p (rtx);
608 1.9 mrg bool aarch64_sve_ldnf1_operand_p (rtx);
609 1.7 mrg bool aarch64_sve_ldr_operand_p (rtx);
610 1.9 mrg bool aarch64_sve_prefetch_operand_p (rtx, machine_mode);
611 1.7 mrg bool aarch64_sve_struct_memory_operand_p (rtx);
612 1.7 mrg rtx aarch64_simd_vect_par_cnst_half (machine_mode, int, bool);
613 1.9 mrg rtx aarch64_gen_stepped_int_parallel (unsigned int, int, int);
614 1.9 mrg bool aarch64_stepped_int_parallel_p (rtx, int);
615 1.1 mrg rtx aarch64_tls_get_addr (void);
616 1.1 mrg unsigned aarch64_dbx_register_number (unsigned);
617 1.1 mrg unsigned aarch64_trampoline_size (void);
618 1.1 mrg void aarch64_asm_output_labelref (FILE *, const char *);
619 1.4 mrg void aarch64_cpu_cpp_builtins (cpp_reader *);
620 1.4 mrg const char * aarch64_gen_far_branch (rtx *, int, const char *, const char *);
621 1.4 mrg const char * aarch64_output_probe_stack_range (rtx, rtx);
622 1.8 mrg const char * aarch64_output_probe_sve_stack_clash (rtx, rtx, rtx, rtx);
623 1.8 mrg void aarch64_err_no_fpadvsimd (machine_mode);
624 1.1 mrg void aarch64_expand_epilogue (bool);
625 1.9 mrg rtx aarch64_ptrue_all (unsigned int);
626 1.9 mrg opt_machine_mode aarch64_ptrue_all_mode (rtx);
627 1.9 mrg rtx aarch64_convert_sve_data_to_pred (rtx, machine_mode, rtx);
628 1.9 mrg rtx aarch64_expand_sve_dupq (rtx, machine_mode, rtx);
629 1.9 mrg void aarch64_expand_mov_immediate (rtx, rtx);
630 1.9 mrg rtx aarch64_stack_protect_canary_mem (machine_mode, rtx, aarch64_salt_type);
631 1.9 mrg rtx aarch64_ptrue_reg (machine_mode);
632 1.9 mrg rtx aarch64_pfalse_reg (machine_mode);
633 1.9 mrg bool aarch64_sve_same_pred_for_ptest_p (rtx *, rtx *);
634 1.7 mrg void aarch64_emit_sve_pred_move (rtx, rtx, rtx);
635 1.7 mrg void aarch64_expand_sve_mem_move (rtx, rtx, machine_mode);
636 1.7 mrg bool aarch64_maybe_expand_sve_subreg_move (rtx, rtx);
637 1.9 mrg rtx aarch64_replace_reg_mode (rtx, machine_mode);
638 1.7 mrg void aarch64_split_sve_subreg_move (rtx, rtx, rtx);
639 1.1 mrg void aarch64_expand_prologue (void);
640 1.1 mrg void aarch64_expand_vector_init (rtx, rtx);
641 1.9 mrg void aarch64_sve_expand_vector_init (rtx, rtx);
642 1.1 mrg void aarch64_init_cumulative_args (CUMULATIVE_ARGS *, const_tree, rtx,
643 1.9 mrg const_tree, unsigned, bool = false);
644 1.1 mrg void aarch64_init_expanders (void);
645 1.4 mrg void aarch64_init_simd_builtins (void);
646 1.3 mrg void aarch64_emit_call_insn (rtx);
647 1.4 mrg void aarch64_register_pragmas (void);
648 1.4 mrg void aarch64_relayout_simd_types (void);
649 1.4 mrg void aarch64_reset_previous_fndecl (void);
650 1.6 mrg bool aarch64_return_address_signing_enabled (void);
651 1.8 mrg bool aarch64_bti_enabled (void);
652 1.4 mrg void aarch64_save_restore_target_globals (tree);
653 1.8 mrg void aarch64_addti_scratch_regs (rtx, rtx, rtx *,
654 1.8 mrg rtx *, rtx *,
655 1.8 mrg rtx *, rtx *,
656 1.8 mrg rtx *);
657 1.8 mrg void aarch64_subvti_scratch_regs (rtx, rtx, rtx *,
658 1.8 mrg rtx *, rtx *,
659 1.8 mrg rtx *, rtx *, rtx *);
660 1.8 mrg void aarch64_expand_subvti (rtx, rtx, rtx,
661 1.8 mrg rtx, rtx, rtx, rtx, bool);
662 1.8 mrg
663 1.1 mrg
664 1.1 mrg /* Initialize builtins for SIMD intrinsics. */
665 1.1 mrg void init_aarch64_simd_builtins (void);
666 1.1 mrg
667 1.7 mrg void aarch64_simd_emit_reg_reg_move (rtx *, machine_mode, unsigned int);
668 1.1 mrg
669 1.1 mrg /* Expand builtins for SIMD intrinsics. */
670 1.1 mrg rtx aarch64_simd_expand_builtin (int, tree, rtx);
671 1.1 mrg
672 1.3 mrg void aarch64_simd_lane_bounds (rtx, HOST_WIDE_INT, HOST_WIDE_INT, const_tree);
673 1.7 mrg rtx aarch64_endian_lane_rtx (machine_mode, unsigned int);
674 1.1 mrg
675 1.1 mrg void aarch64_split_128bit_move (rtx, rtx);
676 1.1 mrg
677 1.1 mrg bool aarch64_split_128bit_move_p (rtx, rtx);
678 1.1 mrg
679 1.7 mrg bool aarch64_mov128_immediate (rtx);
680 1.7 mrg
681 1.3 mrg void aarch64_split_simd_combine (rtx, rtx, rtx);
682 1.3 mrg
683 1.3 mrg void aarch64_split_simd_move (rtx, rtx);
684 1.3 mrg
685 1.1 mrg /* Check for a legitimate floating point constant for FMOV. */
686 1.1 mrg bool aarch64_float_const_representable_p (rtx);
687 1.1 mrg
688 1.8 mrg extern int aarch64_epilogue_uses (int);
689 1.8 mrg
690 1.1 mrg #if defined (RTX_CODE)
691 1.8 mrg void aarch64_gen_unlikely_cbranch (enum rtx_code, machine_mode cc_mode,
692 1.8 mrg rtx label_ref);
693 1.7 mrg bool aarch64_legitimate_address_p (machine_mode, rtx, bool,
694 1.7 mrg aarch64_addr_query_type = ADDR_QUERY_M);
695 1.3 mrg machine_mode aarch64_select_cc_mode (RTX_CODE, rtx, rtx);
696 1.1 mrg rtx aarch64_gen_compare_reg (RTX_CODE, rtx, rtx);
697 1.1 mrg rtx aarch64_load_tp (rtx);
698 1.1 mrg
699 1.1 mrg void aarch64_expand_compare_and_swap (rtx op[]);
700 1.1 mrg void aarch64_split_compare_and_swap (rtx op[]);
701 1.4 mrg
702 1.1 mrg void aarch64_split_atomic_op (enum rtx_code, rtx, rtx, rtx, rtx, rtx, rtx);
703 1.1 mrg
704 1.7 mrg bool aarch64_gen_adjusted_ldpstp (rtx *, bool, scalar_mode, RTX_CODE);
705 1.7 mrg
706 1.7 mrg void aarch64_expand_sve_vec_cmp_int (rtx, rtx_code, rtx, rtx);
707 1.7 mrg bool aarch64_expand_sve_vec_cmp_float (rtx, rtx_code, rtx, rtx, bool);
708 1.7 mrg void aarch64_expand_sve_vcond (machine_mode, machine_mode, rtx *);
709 1.9 mrg
710 1.9 mrg bool aarch64_prepare_sve_int_fma (rtx *, rtx_code);
711 1.9 mrg bool aarch64_prepare_sve_cond_int_fma (rtx *, rtx_code);
712 1.1 mrg #endif /* RTX_CODE */
713 1.1 mrg
714 1.7 mrg bool aarch64_process_target_attr (tree);
715 1.4 mrg void aarch64_override_options_internal (struct gcc_options *);
716 1.4 mrg
717 1.9 mrg const char *aarch64_general_mangle_builtin_type (const_tree);
718 1.9 mrg void aarch64_general_init_builtins (void);
719 1.9 mrg tree aarch64_general_fold_builtin (unsigned int, tree, unsigned int, tree *);
720 1.9 mrg gimple *aarch64_general_gimple_fold_builtin (unsigned int, gcall *);
721 1.9 mrg rtx aarch64_general_expand_builtin (unsigned int, tree, rtx, int);
722 1.9 mrg tree aarch64_general_builtin_decl (unsigned, bool);
723 1.9 mrg tree aarch64_general_builtin_rsqrt (unsigned int);
724 1.4 mrg tree aarch64_builtin_vectorized_function (unsigned int, tree, tree);
725 1.1 mrg
726 1.9 mrg namespace aarch64_sve {
727 1.9 mrg void init_builtins ();
728 1.9 mrg void handle_arm_sve_h ();
729 1.9 mrg tree builtin_decl (unsigned, bool);
730 1.9 mrg bool builtin_type_p (const_tree);
731 1.9 mrg bool builtin_type_p (const_tree, unsigned int *, unsigned int *);
732 1.9 mrg const char *mangle_builtin_type (const_tree);
733 1.9 mrg tree resolve_overloaded_builtin (location_t, unsigned int,
734 1.9 mrg vec<tree, va_gc> *);
735 1.9 mrg bool check_builtin_call (location_t, vec<location_t>, unsigned int,
736 1.9 mrg tree, unsigned int, tree *);
737 1.9 mrg gimple *gimple_fold_builtin (unsigned int, gimple_stmt_iterator *, gcall *);
738 1.9 mrg rtx expand_builtin (unsigned int, tree, rtx);
739 1.9 mrg tree handle_arm_sve_vector_bits_attribute (tree *, tree, tree, int, bool *);
740 1.9 mrg #ifdef GCC_TARGET_H
741 1.9 mrg bool verify_type_context (location_t, type_context_kind, const_tree, bool);
742 1.9 mrg #endif
743 1.9 mrg }
744 1.9 mrg
745 1.1 mrg extern void aarch64_split_combinev16qi (rtx operands[3]);
746 1.7 mrg extern void aarch64_expand_vec_perm (rtx, rtx, rtx, rtx, unsigned int);
747 1.7 mrg extern void aarch64_expand_sve_vec_perm (rtx, rtx, rtx, rtx);
748 1.3 mrg extern bool aarch64_madd_needs_nop (rtx_insn *);
749 1.3 mrg extern void aarch64_final_prescan_insn (rtx_insn *);
750 1.3 mrg void aarch64_atomic_assign_expand_fenv (tree *, tree *, tree *);
751 1.7 mrg int aarch64_ccmp_mode_to_code (machine_mode mode);
752 1.1 mrg
753 1.3 mrg bool extract_base_offset_in_addr (rtx mem, rtx *base, rtx *offset);
754 1.7 mrg bool aarch64_operands_ok_for_ldpstp (rtx *, bool, machine_mode);
755 1.7 mrg bool aarch64_operands_adjust_ok_for_ldpstp (rtx *, bool, scalar_mode);
756 1.8 mrg void aarch64_swap_ldrstr_operands (rtx *, bool);
757 1.4 mrg
758 1.4 mrg extern void aarch64_asm_output_pool_epilogue (FILE *, const char *,
759 1.4 mrg tree, HOST_WIDE_INT);
760 1.4 mrg
761 1.8 mrg
762 1.8 mrg extern bool aarch64_classify_address (struct aarch64_address_info *, rtx,
763 1.8 mrg machine_mode, bool,
764 1.8 mrg aarch64_addr_query_type = ADDR_QUERY_M);
765 1.8 mrg
766 1.4 mrg /* Defined in common/config/aarch64-common.c. */
767 1.4 mrg bool aarch64_handle_option (struct gcc_options *, struct gcc_options *,
768 1.4 mrg const struct cl_decoded_option *, location_t);
769 1.4 mrg const char *aarch64_rewrite_selected_cpu (const char *name);
770 1.4 mrg enum aarch64_parse_opt_result aarch64_parse_extension (const char *,
771 1.9 mrg uint64_t *,
772 1.8 mrg std::string *);
773 1.8 mrg void aarch64_get_all_extension_candidates (auto_vec<const char *> *candidates);
774 1.9 mrg std::string aarch64_get_extension_string_for_isa_flags (uint64_t, uint64_t);
775 1.4 mrg
776 1.8 mrg /* Defined in aarch64-d.c */
777 1.8 mrg extern void aarch64_d_target_versions (void);
778 1.8 mrg
779 1.8 mrg rtl_opt_pass *make_pass_fma_steering (gcc::context *);
780 1.8 mrg rtl_opt_pass *make_pass_track_speculation (gcc::context *);
781 1.8 mrg rtl_opt_pass *make_pass_tag_collision_avoidance (gcc::context *);
782 1.8 mrg rtl_opt_pass *make_pass_insert_bti (gcc::context *ctxt);
783 1.6 mrg
784 1.7 mrg poly_uint64 aarch64_regmode_natural_size (machine_mode);
785 1.7 mrg
786 1.8 mrg bool aarch64_high_bits_all_ones_p (HOST_WIDE_INT);
787 1.8 mrg
788 1.9 mrg struct atomic_ool_names
789 1.9 mrg {
790 1.9 mrg const char *str[5][5];
791 1.9 mrg };
792 1.9 mrg
793 1.9 mrg rtx aarch64_atomic_ool_func(machine_mode mode, rtx model_rtx,
794 1.9 mrg const atomic_ool_names *names);
795 1.9 mrg extern const atomic_ool_names aarch64_ool_swp_names;
796 1.9 mrg extern const atomic_ool_names aarch64_ool_ldadd_names;
797 1.9 mrg extern const atomic_ool_names aarch64_ool_ldset_names;
798 1.9 mrg extern const atomic_ool_names aarch64_ool_ldclr_names;
799 1.9 mrg extern const atomic_ool_names aarch64_ool_ldeor_names;
800 1.9 mrg
801 1.9 mrg tree aarch64_resolve_overloaded_builtin_general (location_t, tree, void *);
802 1.9 mrg
803 1.9 mrg const char *aarch64_sls_barrier (int);
804 1.9 mrg const char *aarch64_indirect_call_asm (rtx);
805 1.9 mrg extern bool aarch64_harden_sls_retbr_p (void);
806 1.9 mrg extern bool aarch64_harden_sls_blr_p (void);
807 1.9 mrg
808 1.1 mrg #endif /* GCC_AARCH64_PROTOS_H */
809