annotate gcc/config/aarch64/aarch64-protos.h @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Machine description for AArch64 architecture.
kono
parents:
diff changeset
2 Copyright (C) 2009-2017 Free Software Foundation, Inc.
kono
parents:
diff changeset
3 Contributed by ARM Ltd.
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 This file is part of GCC.
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 GCC is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
8 under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
9 the Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
10 any later version.
kono
parents:
diff changeset
11
kono
parents:
diff changeset
12 GCC is distributed in the hope that it will be useful, but
kono
parents:
diff changeset
13 WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
kono
parents:
diff changeset
15 General Public License for more details.
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
18 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
19 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 #ifndef GCC_AARCH64_PROTOS_H
kono
parents:
diff changeset
23 #define GCC_AARCH64_PROTOS_H
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 #include "input.h"
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 /* SYMBOL_SMALL_ABSOLUTE: Generate symbol accesses through
kono
parents:
diff changeset
28 high and lo relocs that calculate the base address using a PC
kono
parents:
diff changeset
29 relative reloc.
kono
parents:
diff changeset
30 So to get the address of foo, we generate
kono
parents:
diff changeset
31 adrp x0, foo
kono
parents:
diff changeset
32 add x0, x0, :lo12:foo
kono
parents:
diff changeset
33
kono
parents:
diff changeset
34 To load or store something to foo, we could use the corresponding
kono
parents:
diff changeset
35 load store variants that generate an
kono
parents:
diff changeset
36 ldr x0, [x0,:lo12:foo]
kono
parents:
diff changeset
37 or
kono
parents:
diff changeset
38 str x1, [x0, :lo12:foo]
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 This corresponds to the small code model of the compiler.
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 SYMBOL_SMALL_GOT_4G: Similar to the one above but this
kono
parents:
diff changeset
43 gives us the GOT entry of the symbol being referred to :
kono
parents:
diff changeset
44 Thus calculating the GOT entry for foo is done using the
kono
parents:
diff changeset
45 following sequence of instructions. The ADRP instruction
kono
parents:
diff changeset
46 gets us to the page containing the GOT entry of the symbol
kono
parents:
diff changeset
47 and the got_lo12 gets us the actual offset in it, together
kono
parents:
diff changeset
48 the base and offset, we can address 4G size GOT table.
kono
parents:
diff changeset
49
kono
parents:
diff changeset
50 adrp x0, :got:foo
kono
parents:
diff changeset
51 ldr x0, [x0, :gotoff_lo12:foo]
kono
parents:
diff changeset
52
kono
parents:
diff changeset
53 This corresponds to the small PIC model of the compiler.
kono
parents:
diff changeset
54
kono
parents:
diff changeset
55 SYMBOL_SMALL_GOT_28K: Similar to SYMBOL_SMALL_GOT_4G, but used for symbol
kono
parents:
diff changeset
56 restricted within 28K GOT table size.
kono
parents:
diff changeset
57
kono
parents:
diff changeset
58 ldr reg, [gp, #:gotpage_lo15:sym]
kono
parents:
diff changeset
59
kono
parents:
diff changeset
60 This corresponds to -fpic model for small memory model of the compiler.
kono
parents:
diff changeset
61
kono
parents:
diff changeset
62 SYMBOL_SMALL_TLSGD
kono
parents:
diff changeset
63 SYMBOL_SMALL_TLSDESC
kono
parents:
diff changeset
64 SYMBOL_SMALL_TLSIE
kono
parents:
diff changeset
65 SYMBOL_TINY_TLSIE
kono
parents:
diff changeset
66 SYMBOL_TLSLE12
kono
parents:
diff changeset
67 SYMBOL_TLSLE24
kono
parents:
diff changeset
68 SYMBOL_TLSLE32
kono
parents:
diff changeset
69 SYMBOL_TLSLE48
kono
parents:
diff changeset
70 Each of these represents a thread-local symbol, and corresponds to the
kono
parents:
diff changeset
71 thread local storage relocation operator for the symbol being referred to.
kono
parents:
diff changeset
72
kono
parents:
diff changeset
73 SYMBOL_TINY_ABSOLUTE
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 Generate symbol accesses as a PC relative address using a single
kono
parents:
diff changeset
76 instruction. To compute the address of symbol foo, we generate:
kono
parents:
diff changeset
77
kono
parents:
diff changeset
78 ADR x0, foo
kono
parents:
diff changeset
79
kono
parents:
diff changeset
80 SYMBOL_TINY_GOT
kono
parents:
diff changeset
81
kono
parents:
diff changeset
82 Generate symbol accesses via the GOT using a single PC relative
kono
parents:
diff changeset
83 instruction. To compute the address of symbol foo, we generate:
kono
parents:
diff changeset
84
kono
parents:
diff changeset
85 ldr t0, :got:foo
kono
parents:
diff changeset
86
kono
parents:
diff changeset
87 The value of foo can subsequently read using:
kono
parents:
diff changeset
88
kono
parents:
diff changeset
89 ldrb t0, [t0]
kono
parents:
diff changeset
90
kono
parents:
diff changeset
91 SYMBOL_FORCE_TO_MEM : Global variables are addressed using
kono
parents:
diff changeset
92 constant pool. All variable addresses are spilled into constant
kono
parents:
diff changeset
93 pools. The constant pools themselves are addressed using PC
kono
parents:
diff changeset
94 relative accesses. This only works for the large code model.
kono
parents:
diff changeset
95 */
kono
parents:
diff changeset
96 enum aarch64_symbol_type
kono
parents:
diff changeset
97 {
kono
parents:
diff changeset
98 SYMBOL_SMALL_ABSOLUTE,
kono
parents:
diff changeset
99 SYMBOL_SMALL_GOT_28K,
kono
parents:
diff changeset
100 SYMBOL_SMALL_GOT_4G,
kono
parents:
diff changeset
101 SYMBOL_SMALL_TLSGD,
kono
parents:
diff changeset
102 SYMBOL_SMALL_TLSDESC,
kono
parents:
diff changeset
103 SYMBOL_SMALL_TLSIE,
kono
parents:
diff changeset
104 SYMBOL_TINY_ABSOLUTE,
kono
parents:
diff changeset
105 SYMBOL_TINY_GOT,
kono
parents:
diff changeset
106 SYMBOL_TINY_TLSIE,
kono
parents:
diff changeset
107 SYMBOL_TLSLE12,
kono
parents:
diff changeset
108 SYMBOL_TLSLE24,
kono
parents:
diff changeset
109 SYMBOL_TLSLE32,
kono
parents:
diff changeset
110 SYMBOL_TLSLE48,
kono
parents:
diff changeset
111 SYMBOL_FORCE_TO_MEM
kono
parents:
diff changeset
112 };
kono
parents:
diff changeset
113
kono
parents:
diff changeset
114 /* A set of tuning parameters contains references to size and time
kono
parents:
diff changeset
115 cost models and vectors for address cost calculations, register
kono
parents:
diff changeset
116 move costs and memory move costs. */
kono
parents:
diff changeset
117
kono
parents:
diff changeset
118 /* Scaled addressing modes can vary cost depending on the mode of the
kono
parents:
diff changeset
119 value to be loaded/stored. QImode values cannot use scaled
kono
parents:
diff changeset
120 addressing modes. */
kono
parents:
diff changeset
121
kono
parents:
diff changeset
122 struct scale_addr_mode_cost
kono
parents:
diff changeset
123 {
kono
parents:
diff changeset
124 const int hi;
kono
parents:
diff changeset
125 const int si;
kono
parents:
diff changeset
126 const int di;
kono
parents:
diff changeset
127 const int ti;
kono
parents:
diff changeset
128 };
kono
parents:
diff changeset
129
kono
parents:
diff changeset
130 /* Additional cost for addresses. */
kono
parents:
diff changeset
131 struct cpu_addrcost_table
kono
parents:
diff changeset
132 {
kono
parents:
diff changeset
133 const struct scale_addr_mode_cost addr_scale_costs;
kono
parents:
diff changeset
134 const int pre_modify;
kono
parents:
diff changeset
135 const int post_modify;
kono
parents:
diff changeset
136 const int register_offset;
kono
parents:
diff changeset
137 const int register_sextend;
kono
parents:
diff changeset
138 const int register_zextend;
kono
parents:
diff changeset
139 const int imm_offset;
kono
parents:
diff changeset
140 };
kono
parents:
diff changeset
141
kono
parents:
diff changeset
142 /* Additional costs for register copies. Cost is for one register. */
kono
parents:
diff changeset
143 struct cpu_regmove_cost
kono
parents:
diff changeset
144 {
kono
parents:
diff changeset
145 const int GP2GP;
kono
parents:
diff changeset
146 const int GP2FP;
kono
parents:
diff changeset
147 const int FP2GP;
kono
parents:
diff changeset
148 const int FP2FP;
kono
parents:
diff changeset
149 };
kono
parents:
diff changeset
150
kono
parents:
diff changeset
151 /* Cost for vector insn classes. */
kono
parents:
diff changeset
152 struct cpu_vector_cost
kono
parents:
diff changeset
153 {
kono
parents:
diff changeset
154 const int scalar_int_stmt_cost; /* Cost of any int scalar operation,
kono
parents:
diff changeset
155 excluding load and store. */
kono
parents:
diff changeset
156 const int scalar_fp_stmt_cost; /* Cost of any fp scalar operation,
kono
parents:
diff changeset
157 excluding load and store. */
kono
parents:
diff changeset
158 const int scalar_load_cost; /* Cost of scalar load. */
kono
parents:
diff changeset
159 const int scalar_store_cost; /* Cost of scalar store. */
kono
parents:
diff changeset
160 const int vec_int_stmt_cost; /* Cost of any int vector operation,
kono
parents:
diff changeset
161 excluding load, store, permute,
kono
parents:
diff changeset
162 vector-to-scalar and
kono
parents:
diff changeset
163 scalar-to-vector operation. */
kono
parents:
diff changeset
164 const int vec_fp_stmt_cost; /* Cost of any fp vector operation,
kono
parents:
diff changeset
165 excluding load, store, permute,
kono
parents:
diff changeset
166 vector-to-scalar and
kono
parents:
diff changeset
167 scalar-to-vector operation. */
kono
parents:
diff changeset
168 const int vec_permute_cost; /* Cost of permute operation. */
kono
parents:
diff changeset
169 const int vec_to_scalar_cost; /* Cost of vec-to-scalar operation. */
kono
parents:
diff changeset
170 const int scalar_to_vec_cost; /* Cost of scalar-to-vector
kono
parents:
diff changeset
171 operation. */
kono
parents:
diff changeset
172 const int vec_align_load_cost; /* Cost of aligned vector load. */
kono
parents:
diff changeset
173 const int vec_unalign_load_cost; /* Cost of unaligned vector load. */
kono
parents:
diff changeset
174 const int vec_unalign_store_cost; /* Cost of unaligned vector store. */
kono
parents:
diff changeset
175 const int vec_store_cost; /* Cost of vector store. */
kono
parents:
diff changeset
176 const int cond_taken_branch_cost; /* Cost of taken branch. */
kono
parents:
diff changeset
177 const int cond_not_taken_branch_cost; /* Cost of not taken branch. */
kono
parents:
diff changeset
178 };
kono
parents:
diff changeset
179
kono
parents:
diff changeset
180 /* Branch costs. */
kono
parents:
diff changeset
181 struct cpu_branch_cost
kono
parents:
diff changeset
182 {
kono
parents:
diff changeset
183 const int predictable; /* Predictable branch or optimizing for size. */
kono
parents:
diff changeset
184 const int unpredictable; /* Unpredictable branch or optimizing for speed. */
kono
parents:
diff changeset
185 };
kono
parents:
diff changeset
186
kono
parents:
diff changeset
187 /* Control approximate alternatives to certain FP operators. */
kono
parents:
diff changeset
188 #define AARCH64_APPROX_MODE(MODE) \
kono
parents:
diff changeset
189 ((MIN_MODE_FLOAT <= (MODE) && (MODE) <= MAX_MODE_FLOAT) \
kono
parents:
diff changeset
190 ? (1 << ((MODE) - MIN_MODE_FLOAT)) \
kono
parents:
diff changeset
191 : (MIN_MODE_VECTOR_FLOAT <= (MODE) && (MODE) <= MAX_MODE_VECTOR_FLOAT) \
kono
parents:
diff changeset
192 ? (1 << ((MODE) - MIN_MODE_VECTOR_FLOAT \
kono
parents:
diff changeset
193 + MAX_MODE_FLOAT - MIN_MODE_FLOAT + 1)) \
kono
parents:
diff changeset
194 : (0))
kono
parents:
diff changeset
195 #define AARCH64_APPROX_NONE (0)
kono
parents:
diff changeset
196 #define AARCH64_APPROX_ALL (-1)
kono
parents:
diff changeset
197
kono
parents:
diff changeset
198 /* Allowed modes for approximations. */
kono
parents:
diff changeset
199 struct cpu_approx_modes
kono
parents:
diff changeset
200 {
kono
parents:
diff changeset
201 const unsigned int division; /* Division. */
kono
parents:
diff changeset
202 const unsigned int sqrt; /* Square root. */
kono
parents:
diff changeset
203 const unsigned int recip_sqrt; /* Reciprocal square root. */
kono
parents:
diff changeset
204 };
kono
parents:
diff changeset
205
kono
parents:
diff changeset
206 /* Cache prefetch settings for prefetch-loop-arrays. */
kono
parents:
diff changeset
207 struct cpu_prefetch_tune
kono
parents:
diff changeset
208 {
kono
parents:
diff changeset
209 const int num_slots;
kono
parents:
diff changeset
210 const int l1_cache_size;
kono
parents:
diff changeset
211 const int l1_cache_line_size;
kono
parents:
diff changeset
212 const int l2_cache_size;
kono
parents:
diff changeset
213 const int default_opt_level;
kono
parents:
diff changeset
214 };
kono
parents:
diff changeset
215
kono
parents:
diff changeset
216 struct tune_params
kono
parents:
diff changeset
217 {
kono
parents:
diff changeset
218 const struct cpu_cost_table *insn_extra_cost;
kono
parents:
diff changeset
219 const struct cpu_addrcost_table *addr_cost;
kono
parents:
diff changeset
220 const struct cpu_regmove_cost *regmove_cost;
kono
parents:
diff changeset
221 const struct cpu_vector_cost *vec_costs;
kono
parents:
diff changeset
222 const struct cpu_branch_cost *branch_costs;
kono
parents:
diff changeset
223 const struct cpu_approx_modes *approx_modes;
kono
parents:
diff changeset
224 int memmov_cost;
kono
parents:
diff changeset
225 int issue_rate;
kono
parents:
diff changeset
226 unsigned int fusible_ops;
kono
parents:
diff changeset
227 int function_align;
kono
parents:
diff changeset
228 int jump_align;
kono
parents:
diff changeset
229 int loop_align;
kono
parents:
diff changeset
230 int int_reassoc_width;
kono
parents:
diff changeset
231 int fp_reassoc_width;
kono
parents:
diff changeset
232 int vec_reassoc_width;
kono
parents:
diff changeset
233 int min_div_recip_mul_sf;
kono
parents:
diff changeset
234 int min_div_recip_mul_df;
kono
parents:
diff changeset
235 /* Value for aarch64_case_values_threshold; or 0 for the default. */
kono
parents:
diff changeset
236 unsigned int max_case_values;
kono
parents:
diff changeset
237 /* An enum specifying how to take into account CPU autoprefetch capabilities
kono
parents:
diff changeset
238 during instruction scheduling:
kono
parents:
diff changeset
239 - AUTOPREFETCHER_OFF: Do not take autoprefetch capabilities into account.
kono
parents:
diff changeset
240 - AUTOPREFETCHER_WEAK: Attempt to sort sequences of loads/store in order of
kono
parents:
diff changeset
241 offsets but allow the pipeline hazard recognizer to alter that order to
kono
parents:
diff changeset
242 maximize multi-issue opportunities.
kono
parents:
diff changeset
243 - AUTOPREFETCHER_STRONG: Attempt to sort sequences of loads/store in order of
kono
parents:
diff changeset
244 offsets and prefer this even if it restricts multi-issue opportunities. */
kono
parents:
diff changeset
245
kono
parents:
diff changeset
246 enum aarch64_autoprefetch_model
kono
parents:
diff changeset
247 {
kono
parents:
diff changeset
248 AUTOPREFETCHER_OFF,
kono
parents:
diff changeset
249 AUTOPREFETCHER_WEAK,
kono
parents:
diff changeset
250 AUTOPREFETCHER_STRONG
kono
parents:
diff changeset
251 } autoprefetcher_model;
kono
parents:
diff changeset
252
kono
parents:
diff changeset
253 unsigned int extra_tuning_flags;
kono
parents:
diff changeset
254
kono
parents:
diff changeset
255 /* Place prefetch struct pointer at the end to enable type checking
kono
parents:
diff changeset
256 errors when tune_params misses elements (e.g., from erroneous merges). */
kono
parents:
diff changeset
257 const struct cpu_prefetch_tune *prefetch;
kono
parents:
diff changeset
258 };
kono
parents:
diff changeset
259
kono
parents:
diff changeset
260 #define AARCH64_FUSION_PAIR(x, name) \
kono
parents:
diff changeset
261 AARCH64_FUSE_##name##_index,
kono
parents:
diff changeset
262 /* Supported fusion operations. */
kono
parents:
diff changeset
263 enum aarch64_fusion_pairs_index
kono
parents:
diff changeset
264 {
kono
parents:
diff changeset
265 #include "aarch64-fusion-pairs.def"
kono
parents:
diff changeset
266 AARCH64_FUSE_index_END
kono
parents:
diff changeset
267 };
kono
parents:
diff changeset
268
kono
parents:
diff changeset
269 #define AARCH64_FUSION_PAIR(x, name) \
kono
parents:
diff changeset
270 AARCH64_FUSE_##name = (1u << AARCH64_FUSE_##name##_index),
kono
parents:
diff changeset
271 /* Supported fusion operations. */
kono
parents:
diff changeset
272 enum aarch64_fusion_pairs
kono
parents:
diff changeset
273 {
kono
parents:
diff changeset
274 AARCH64_FUSE_NOTHING = 0,
kono
parents:
diff changeset
275 #include "aarch64-fusion-pairs.def"
kono
parents:
diff changeset
276 AARCH64_FUSE_ALL = (1u << AARCH64_FUSE_index_END) - 1
kono
parents:
diff changeset
277 };
kono
parents:
diff changeset
278
kono
parents:
diff changeset
279 #define AARCH64_EXTRA_TUNING_OPTION(x, name) \
kono
parents:
diff changeset
280 AARCH64_EXTRA_TUNE_##name##_index,
kono
parents:
diff changeset
281 /* Supported tuning flags indexes. */
kono
parents:
diff changeset
282 enum aarch64_extra_tuning_flags_index
kono
parents:
diff changeset
283 {
kono
parents:
diff changeset
284 #include "aarch64-tuning-flags.def"
kono
parents:
diff changeset
285 AARCH64_EXTRA_TUNE_index_END
kono
parents:
diff changeset
286 };
kono
parents:
diff changeset
287
kono
parents:
diff changeset
288
kono
parents:
diff changeset
289 #define AARCH64_EXTRA_TUNING_OPTION(x, name) \
kono
parents:
diff changeset
290 AARCH64_EXTRA_TUNE_##name = (1u << AARCH64_EXTRA_TUNE_##name##_index),
kono
parents:
diff changeset
291 /* Supported tuning flags. */
kono
parents:
diff changeset
292 enum aarch64_extra_tuning_flags
kono
parents:
diff changeset
293 {
kono
parents:
diff changeset
294 AARCH64_EXTRA_TUNE_NONE = 0,
kono
parents:
diff changeset
295 #include "aarch64-tuning-flags.def"
kono
parents:
diff changeset
296 AARCH64_EXTRA_TUNE_ALL = (1u << AARCH64_EXTRA_TUNE_index_END) - 1
kono
parents:
diff changeset
297 };
kono
parents:
diff changeset
298
kono
parents:
diff changeset
299 /* Enum describing the various ways that the
kono
parents:
diff changeset
300 aarch64_parse_{arch,tune,cpu,extension} functions can fail.
kono
parents:
diff changeset
301 This way their callers can choose what kind of error to give. */
kono
parents:
diff changeset
302
kono
parents:
diff changeset
303 enum aarch64_parse_opt_result
kono
parents:
diff changeset
304 {
kono
parents:
diff changeset
305 AARCH64_PARSE_OK, /* Parsing was successful. */
kono
parents:
diff changeset
306 AARCH64_PARSE_MISSING_ARG, /* Missing argument. */
kono
parents:
diff changeset
307 AARCH64_PARSE_INVALID_FEATURE, /* Invalid feature modifier. */
kono
parents:
diff changeset
308 AARCH64_PARSE_INVALID_ARG /* Invalid arch, tune, cpu arg. */
kono
parents:
diff changeset
309 };
kono
parents:
diff changeset
310
kono
parents:
diff changeset
311 /* Enum to distinguish which type of check is to be done in
kono
parents:
diff changeset
312 aarch64_simd_valid_immediate. This is used as a bitmask where
kono
parents:
diff changeset
313 AARCH64_CHECK_MOV has both bits set. Thus AARCH64_CHECK_MOV will
kono
parents:
diff changeset
314 perform all checks. Adding new types would require changes accordingly. */
kono
parents:
diff changeset
315 enum simd_immediate_check {
kono
parents:
diff changeset
316 AARCH64_CHECK_ORR = 1 << 0,
kono
parents:
diff changeset
317 AARCH64_CHECK_BIC = 1 << 1,
kono
parents:
diff changeset
318 AARCH64_CHECK_MOV = AARCH64_CHECK_ORR | AARCH64_CHECK_BIC
kono
parents:
diff changeset
319 };
kono
parents:
diff changeset
320
kono
parents:
diff changeset
321 extern struct tune_params aarch64_tune_params;
kono
parents:
diff changeset
322
kono
parents:
diff changeset
323 HOST_WIDE_INT aarch64_initial_elimination_offset (unsigned, unsigned);
kono
parents:
diff changeset
324 int aarch64_get_condition_code (rtx);
kono
parents:
diff changeset
325 bool aarch64_address_valid_for_prefetch_p (rtx, bool);
kono
parents:
diff changeset
326 bool aarch64_bitmask_imm (HOST_WIDE_INT val, machine_mode);
kono
parents:
diff changeset
327 unsigned HOST_WIDE_INT aarch64_and_split_imm1 (HOST_WIDE_INT val_in);
kono
parents:
diff changeset
328 unsigned HOST_WIDE_INT aarch64_and_split_imm2 (HOST_WIDE_INT val_in);
kono
parents:
diff changeset
329 bool aarch64_and_bitmask_imm (unsigned HOST_WIDE_INT val_in, machine_mode mode);
kono
parents:
diff changeset
330 int aarch64_branch_cost (bool, bool);
kono
parents:
diff changeset
331 enum aarch64_symbol_type aarch64_classify_symbolic_expression (rtx);
kono
parents:
diff changeset
332 bool aarch64_can_const_movi_rtx_p (rtx x, machine_mode mode);
kono
parents:
diff changeset
333 bool aarch64_const_vec_all_same_int_p (rtx, HOST_WIDE_INT);
kono
parents:
diff changeset
334 bool aarch64_constant_address_p (rtx);
kono
parents:
diff changeset
335 bool aarch64_emit_approx_div (rtx, rtx, rtx);
kono
parents:
diff changeset
336 bool aarch64_emit_approx_sqrt (rtx, rtx, bool);
kono
parents:
diff changeset
337 void aarch64_expand_call (rtx, rtx, bool);
kono
parents:
diff changeset
338 bool aarch64_expand_movmem (rtx *);
kono
parents:
diff changeset
339 bool aarch64_float_const_zero_rtx_p (rtx);
kono
parents:
diff changeset
340 bool aarch64_float_const_rtx_p (rtx);
kono
parents:
diff changeset
341 bool aarch64_function_arg_regno_p (unsigned);
kono
parents:
diff changeset
342 bool aarch64_fusion_enabled_p (enum aarch64_fusion_pairs);
kono
parents:
diff changeset
343 bool aarch64_gen_movmemqi (rtx *);
kono
parents:
diff changeset
344 bool aarch64_gimple_fold_builtin (gimple_stmt_iterator *);
kono
parents:
diff changeset
345 bool aarch64_is_extend_from_extract (scalar_int_mode, rtx, rtx);
kono
parents:
diff changeset
346 bool aarch64_is_long_call_p (rtx);
kono
parents:
diff changeset
347 bool aarch64_is_noplt_call_p (rtx);
kono
parents:
diff changeset
348 bool aarch64_label_mentioned_p (rtx);
kono
parents:
diff changeset
349 void aarch64_declare_function_name (FILE *, const char*, tree);
kono
parents:
diff changeset
350 bool aarch64_legitimate_pic_operand_p (rtx);
kono
parents:
diff changeset
351 bool aarch64_mask_and_shift_for_ubfiz_p (scalar_int_mode, rtx, rtx);
kono
parents:
diff changeset
352 bool aarch64_zero_extend_const_eq (machine_mode, rtx, machine_mode, rtx);
kono
parents:
diff changeset
353 bool aarch64_move_imm (HOST_WIDE_INT, machine_mode);
kono
parents:
diff changeset
354 bool aarch64_mov_operand_p (rtx, machine_mode);
kono
parents:
diff changeset
355 rtx aarch64_reverse_mask (machine_mode);
kono
parents:
diff changeset
356 bool aarch64_offset_7bit_signed_scaled_p (machine_mode, HOST_WIDE_INT);
kono
parents:
diff changeset
357 char *aarch64_output_scalar_simd_mov_immediate (rtx, scalar_int_mode);
kono
parents:
diff changeset
358 char *aarch64_output_simd_mov_immediate (rtx, machine_mode, unsigned,
kono
parents:
diff changeset
359 enum simd_immediate_check w = AARCH64_CHECK_MOV);
kono
parents:
diff changeset
360 bool aarch64_pad_reg_upward (machine_mode, const_tree, bool);
kono
parents:
diff changeset
361 bool aarch64_regno_ok_for_base_p (int, bool);
kono
parents:
diff changeset
362 bool aarch64_regno_ok_for_index_p (int, bool);
kono
parents:
diff changeset
363 bool aarch64_reinterpret_float_as_int (rtx value, unsigned HOST_WIDE_INT *fail);
kono
parents:
diff changeset
364 bool aarch64_simd_check_vect_par_cnst_half (rtx op, machine_mode mode,
kono
parents:
diff changeset
365 bool high);
kono
parents:
diff changeset
366 bool aarch64_simd_imm_zero_p (rtx, machine_mode);
kono
parents:
diff changeset
367 bool aarch64_simd_scalar_immediate_valid_for_move (rtx, scalar_int_mode);
kono
parents:
diff changeset
368 bool aarch64_simd_shift_imm_p (rtx, machine_mode, bool);
kono
parents:
diff changeset
369 bool aarch64_simd_valid_immediate (rtx, machine_mode, bool,
kono
parents:
diff changeset
370 struct simd_immediate_info *,
kono
parents:
diff changeset
371 enum simd_immediate_check w = AARCH64_CHECK_MOV);
kono
parents:
diff changeset
372 bool aarch64_split_dimode_const_store (rtx, rtx);
kono
parents:
diff changeset
373 bool aarch64_symbolic_address_p (rtx);
kono
parents:
diff changeset
374 bool aarch64_uimm12_shift (HOST_WIDE_INT);
kono
parents:
diff changeset
375 bool aarch64_use_return_insn_p (void);
kono
parents:
diff changeset
376 const char *aarch64_mangle_builtin_type (const_tree);
kono
parents:
diff changeset
377 const char *aarch64_output_casesi (rtx *);
kono
parents:
diff changeset
378
kono
parents:
diff changeset
379 enum aarch64_symbol_type aarch64_classify_symbol (rtx, rtx);
kono
parents:
diff changeset
380 enum aarch64_symbol_type aarch64_classify_tls_symbol (rtx);
kono
parents:
diff changeset
381 enum reg_class aarch64_regno_regclass (unsigned);
kono
parents:
diff changeset
382 int aarch64_asm_preferred_eh_data_format (int, int);
kono
parents:
diff changeset
383 int aarch64_fpconst_pow_of_2 (rtx);
kono
parents:
diff changeset
384 machine_mode aarch64_hard_regno_caller_save_mode (unsigned, unsigned,
kono
parents:
diff changeset
385 machine_mode);
kono
parents:
diff changeset
386 int aarch64_uxt_size (int, HOST_WIDE_INT);
kono
parents:
diff changeset
387 int aarch64_vec_fpconst_pow_of_2 (rtx);
kono
parents:
diff changeset
388 rtx aarch64_eh_return_handler_rtx (void);
kono
parents:
diff changeset
389 rtx aarch64_mask_from_zextract_ops (rtx, rtx);
kono
parents:
diff changeset
390 const char *aarch64_output_move_struct (rtx *operands);
kono
parents:
diff changeset
391 rtx aarch64_return_addr (int, rtx);
kono
parents:
diff changeset
392 rtx aarch64_simd_gen_const_vector_dup (machine_mode, HOST_WIDE_INT);
kono
parents:
diff changeset
393 bool aarch64_simd_mem_operand_p (rtx);
kono
parents:
diff changeset
394 rtx aarch64_simd_vect_par_cnst_half (machine_mode, bool);
kono
parents:
diff changeset
395 rtx aarch64_tls_get_addr (void);
kono
parents:
diff changeset
396 tree aarch64_fold_builtin (tree, int, tree *, bool);
kono
parents:
diff changeset
397 unsigned aarch64_dbx_register_number (unsigned);
kono
parents:
diff changeset
398 unsigned aarch64_trampoline_size (void);
kono
parents:
diff changeset
399 void aarch64_asm_output_labelref (FILE *, const char *);
kono
parents:
diff changeset
400 void aarch64_cpu_cpp_builtins (cpp_reader *);
kono
parents:
diff changeset
401 const char * aarch64_gen_far_branch (rtx *, int, const char *, const char *);
kono
parents:
diff changeset
402 const char * aarch64_output_probe_stack_range (rtx, rtx);
kono
parents:
diff changeset
403 void aarch64_err_no_fpadvsimd (machine_mode, const char *);
kono
parents:
diff changeset
404 void aarch64_expand_epilogue (bool);
kono
parents:
diff changeset
405 void aarch64_expand_mov_immediate (rtx, rtx);
kono
parents:
diff changeset
406 void aarch64_expand_prologue (void);
kono
parents:
diff changeset
407 void aarch64_expand_vector_init (rtx, rtx);
kono
parents:
diff changeset
408 void aarch64_init_cumulative_args (CUMULATIVE_ARGS *, const_tree, rtx,
kono
parents:
diff changeset
409 const_tree, unsigned);
kono
parents:
diff changeset
410 void aarch64_init_expanders (void);
kono
parents:
diff changeset
411 void aarch64_init_simd_builtins (void);
kono
parents:
diff changeset
412 void aarch64_emit_call_insn (rtx);
kono
parents:
diff changeset
413 void aarch64_register_pragmas (void);
kono
parents:
diff changeset
414 void aarch64_relayout_simd_types (void);
kono
parents:
diff changeset
415 void aarch64_reset_previous_fndecl (void);
kono
parents:
diff changeset
416 bool aarch64_return_address_signing_enabled (void);
kono
parents:
diff changeset
417 void aarch64_save_restore_target_globals (tree);
kono
parents:
diff changeset
418
kono
parents:
diff changeset
419 /* Initialize builtins for SIMD intrinsics. */
kono
parents:
diff changeset
420 void init_aarch64_simd_builtins (void);
kono
parents:
diff changeset
421
kono
parents:
diff changeset
422 void aarch64_simd_emit_reg_reg_move (rtx *, machine_mode, unsigned int);
kono
parents:
diff changeset
423
kono
parents:
diff changeset
424 /* Expand builtins for SIMD intrinsics. */
kono
parents:
diff changeset
425 rtx aarch64_simd_expand_builtin (int, tree, rtx);
kono
parents:
diff changeset
426
kono
parents:
diff changeset
427 void aarch64_simd_lane_bounds (rtx, HOST_WIDE_INT, HOST_WIDE_INT, const_tree);
kono
parents:
diff changeset
428
kono
parents:
diff changeset
429 void aarch64_split_128bit_move (rtx, rtx);
kono
parents:
diff changeset
430
kono
parents:
diff changeset
431 bool aarch64_split_128bit_move_p (rtx, rtx);
kono
parents:
diff changeset
432
kono
parents:
diff changeset
433 void aarch64_split_simd_combine (rtx, rtx, rtx);
kono
parents:
diff changeset
434
kono
parents:
diff changeset
435 void aarch64_split_simd_move (rtx, rtx);
kono
parents:
diff changeset
436
kono
parents:
diff changeset
437 /* Check for a legitimate floating point constant for FMOV. */
kono
parents:
diff changeset
438 bool aarch64_float_const_representable_p (rtx);
kono
parents:
diff changeset
439
kono
parents:
diff changeset
440 #if defined (RTX_CODE)
kono
parents:
diff changeset
441
kono
parents:
diff changeset
442 bool aarch64_legitimate_address_p (machine_mode, rtx, RTX_CODE, bool);
kono
parents:
diff changeset
443 machine_mode aarch64_select_cc_mode (RTX_CODE, rtx, rtx);
kono
parents:
diff changeset
444 rtx aarch64_gen_compare_reg (RTX_CODE, rtx, rtx);
kono
parents:
diff changeset
445 rtx aarch64_load_tp (rtx);
kono
parents:
diff changeset
446
kono
parents:
diff changeset
447 void aarch64_expand_compare_and_swap (rtx op[]);
kono
parents:
diff changeset
448 void aarch64_split_compare_and_swap (rtx op[]);
kono
parents:
diff changeset
449 void aarch64_gen_atomic_cas (rtx, rtx, rtx, rtx, rtx);
kono
parents:
diff changeset
450
kono
parents:
diff changeset
451 bool aarch64_atomic_ldop_supported_p (enum rtx_code);
kono
parents:
diff changeset
452 void aarch64_gen_atomic_ldop (enum rtx_code, rtx, rtx, rtx, rtx, rtx);
kono
parents:
diff changeset
453 void aarch64_split_atomic_op (enum rtx_code, rtx, rtx, rtx, rtx, rtx, rtx);
kono
parents:
diff changeset
454
kono
parents:
diff changeset
455 bool aarch64_gen_adjusted_ldpstp (rtx *, bool, scalar_mode, RTX_CODE);
kono
parents:
diff changeset
456 #endif /* RTX_CODE */
kono
parents:
diff changeset
457
kono
parents:
diff changeset
458 void aarch64_init_builtins (void);
kono
parents:
diff changeset
459
kono
parents:
diff changeset
460 bool aarch64_process_target_attr (tree, const char*);
kono
parents:
diff changeset
461 void aarch64_override_options_internal (struct gcc_options *);
kono
parents:
diff changeset
462
kono
parents:
diff changeset
463 rtx aarch64_expand_builtin (tree exp,
kono
parents:
diff changeset
464 rtx target,
kono
parents:
diff changeset
465 rtx subtarget ATTRIBUTE_UNUSED,
kono
parents:
diff changeset
466 machine_mode mode ATTRIBUTE_UNUSED,
kono
parents:
diff changeset
467 int ignore ATTRIBUTE_UNUSED);
kono
parents:
diff changeset
468 tree aarch64_builtin_decl (unsigned, bool ATTRIBUTE_UNUSED);
kono
parents:
diff changeset
469 tree aarch64_builtin_rsqrt (unsigned int);
kono
parents:
diff changeset
470 tree aarch64_builtin_vectorized_function (unsigned int, tree, tree);
kono
parents:
diff changeset
471
kono
parents:
diff changeset
472 extern void aarch64_split_combinev16qi (rtx operands[3]);
kono
parents:
diff changeset
473 extern void aarch64_expand_vec_perm (rtx target, rtx op0, rtx op1, rtx sel);
kono
parents:
diff changeset
474 extern bool aarch64_madd_needs_nop (rtx_insn *);
kono
parents:
diff changeset
475 extern void aarch64_final_prescan_insn (rtx_insn *);
kono
parents:
diff changeset
476 extern bool
kono
parents:
diff changeset
477 aarch64_expand_vec_perm_const (rtx target, rtx op0, rtx op1, rtx sel);
kono
parents:
diff changeset
478 void aarch64_atomic_assign_expand_fenv (tree *, tree *, tree *);
kono
parents:
diff changeset
479 int aarch64_ccmp_mode_to_code (machine_mode mode);
kono
parents:
diff changeset
480
kono
parents:
diff changeset
481 bool extract_base_offset_in_addr (rtx mem, rtx *base, rtx *offset);
kono
parents:
diff changeset
482 bool aarch64_operands_ok_for_ldpstp (rtx *, bool, machine_mode);
kono
parents:
diff changeset
483 bool aarch64_operands_adjust_ok_for_ldpstp (rtx *, bool, scalar_mode);
kono
parents:
diff changeset
484
kono
parents:
diff changeset
485 extern void aarch64_asm_output_pool_epilogue (FILE *, const char *,
kono
parents:
diff changeset
486 tree, HOST_WIDE_INT);
kono
parents:
diff changeset
487
kono
parents:
diff changeset
488 /* Defined in common/config/aarch64-common.c. */
kono
parents:
diff changeset
489 bool aarch64_handle_option (struct gcc_options *, struct gcc_options *,
kono
parents:
diff changeset
490 const struct cl_decoded_option *, location_t);
kono
parents:
diff changeset
491 const char *aarch64_rewrite_selected_cpu (const char *name);
kono
parents:
diff changeset
492 enum aarch64_parse_opt_result aarch64_parse_extension (const char *,
kono
parents:
diff changeset
493 unsigned long *);
kono
parents:
diff changeset
494 std::string aarch64_get_extension_string_for_isa_flags (unsigned long,
kono
parents:
diff changeset
495 unsigned long);
kono
parents:
diff changeset
496
kono
parents:
diff changeset
497 rtl_opt_pass *make_pass_fma_steering (gcc::context *ctxt);
kono
parents:
diff changeset
498
kono
parents:
diff changeset
499 #endif /* GCC_AARCH64_PROTOS_H */