]>
Commit | Line | Data |
---|---|---|
eb3921e8 | 1 | /* Prototypes for exported functions defined in arm.c and pe.c |
8d9254fc | 2 | Copyright (C) 1999-2020 Free Software Foundation, Inc. |
eb3921e8 NC |
3 | Contributed by Richard Earnshaw (rearnsha@arm.com) |
4 | Minor hacks by Nick Clifton (nickc@cygnus.com) | |
5 | ||
4f448245 | 6 | This file is part of GCC. |
eb3921e8 | 7 | |
4f448245 NC |
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 | |
2f83c7d6 | 10 | the Free Software Foundation; either version 3, or (at your option) |
4f448245 | 11 | any later version. |
eb3921e8 | 12 | |
4f448245 NC |
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. | |
eb3921e8 | 17 | |
4f448245 | 18 | You should have received a copy of the GNU General Public License |
2f83c7d6 NC |
19 | along with GCC; see the file COPYING3. If not see |
20 | <http://www.gnu.org/licenses/>. */ | |
eb3921e8 | 21 | |
8b97c5f8 ZW |
22 | #ifndef GCC_ARM_PROTOS_H |
23 | #define GCC_ARM_PROTOS_H | |
24 | ||
851966d6 | 25 | #include "sbitmap.h" |
70e73d3c | 26 | |
677f3fa8 | 27 | extern enum unwind_info_type arm_except_unwind_info (struct gcc_options *); |
a72d4945 | 28 | extern int use_return_insn (int, rtx); |
24d5b097 | 29 | extern bool use_simple_return_p (void); |
bbbbb16a | 30 | extern enum reg_class arm_regno_class (int); |
cf16f980 KT |
31 | extern bool arm_check_builtin_call (location_t , vec<location_t> , tree, |
32 | tree, unsigned int, tree *); | |
89d75572 | 33 | extern void arm_load_pic_register (unsigned long, rtx); |
e32bac5b | 34 | extern int arm_volatile_func (void); |
e32bac5b | 35 | extern void arm_expand_prologue (void); |
d461c88a | 36 | extern void arm_expand_epilogue (bool); |
258619bb | 37 | extern void arm_declare_function_name (FILE *, const char *, tree); |
9ad1f699 | 38 | extern void arm_asm_declare_function_name (FILE *, const char *, tree); |
24d5b097 | 39 | extern void thumb2_expand_return (bool); |
e32bac5b RE |
40 | extern const char *arm_strip_name_encoding (const char *); |
41 | extern void arm_asm_output_labelref (FILE *, const char *); | |
5b3e6663 | 42 | extern void thumb2_asm_output_opcode (FILE *); |
e32bac5b | 43 | extern unsigned long arm_current_func_type (void); |
b3f8d95d MM |
44 | extern HOST_WIDE_INT arm_compute_initial_elimination_offset (unsigned int, |
45 | unsigned int); | |
5848830f PB |
46 | extern HOST_WIDE_INT thumb_compute_initial_elimination_offset (unsigned int, |
47 | unsigned int); | |
2fa330b2 | 48 | extern unsigned int arm_dbx_register_number (unsigned int); |
617a1b71 | 49 | extern void arm_output_fn_unwind (FILE *, bool); |
33857df2 JG |
50 | |
51 | extern rtx arm_expand_builtin (tree exp, rtx target, rtx subtarget | |
b8506a8a | 52 | ATTRIBUTE_UNUSED, machine_mode mode |
33857df2 JG |
53 | ATTRIBUTE_UNUSED, int ignore ATTRIBUTE_UNUSED); |
54 | extern tree arm_builtin_decl (unsigned code, bool initialize_p | |
55 | ATTRIBUTE_UNUSED); | |
56 | extern void arm_init_builtins (void); | |
57 | extern void arm_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update); | |
93c590ee MC |
58 | extern rtx arm_simd_vect_par_cnst_half (machine_mode mode, bool high); |
59 | extern bool arm_simd_check_vect_par_cnst_half_p (rtx op, machine_mode mode, | |
60 | bool high); | |
ebdb6f23 | 61 | extern void arm_emit_speculation_barrier_function (void); |
0406dccd | 62 | extern void arm_decompose_di_binop (rtx, rtx, rtx *, rtx *, rtx *, rtx *); |
cf16f980 | 63 | extern bool arm_q_bit_access (void); |
16155ccf | 64 | extern bool arm_ge_bits_access (void); |
ebdb6f23 | 65 | |
eb3921e8 | 66 | #ifdef RTX_CODE |
c8cd4696 MC |
67 | extern void arm_gen_unlikely_cbranch (enum rtx_code, machine_mode cc_mode, |
68 | rtx label_ref); | |
ef4bddc2 RS |
69 | extern bool arm_vector_mode_supported_p (machine_mode); |
70 | extern bool arm_small_register_classes_for_mode_p (machine_mode); | |
e32bac5b | 71 | extern int const_ok_for_arm (HOST_WIDE_INT); |
c2b640a7 | 72 | extern int const_ok_for_op (HOST_WIDE_INT, enum rtx_code); |
44cd6810 | 73 | extern int const_ok_for_dimode_op (HOST_WIDE_INT, enum rtx_code); |
e24f6408 | 74 | extern void thumb1_gen_const_int (rtx, HOST_WIDE_INT); |
ef4bddc2 | 75 | extern int arm_split_constant (RTX_CODE, machine_mode, rtx, |
a406f566 | 76 | HOST_WIDE_INT, rtx, rtx, int); |
e32bac5b | 77 | extern int legitimate_pic_operand_p (rtx); |
89d75572 | 78 | extern rtx legitimize_pic_address (rtx, machine_mode, rtx, rtx, bool); |
d3585b76 | 79 | extern rtx legitimize_tls_address (rtx, rtx); |
ef4bddc2 RS |
80 | extern bool arm_legitimate_address_p (machine_mode, rtx, bool); |
81 | extern int arm_legitimate_address_outer_p (machine_mode, rtx, RTX_CODE, int); | |
82 | extern int thumb_legitimate_offset_p (machine_mode, HOST_WIDE_INT); | |
ef4bddc2 RS |
83 | extern int thumb1_legitimate_address_p (machine_mode, rtx, int); |
84 | extern bool ldm_stm_operation_p (rtx, bool, machine_mode mode, | |
fb40241d | 85 | bool, bool); |
9b66ebb1 | 86 | extern int arm_const_double_rtx (rtx); |
f1adb0a9 | 87 | extern int vfp3_const_double_rtx (rtx); |
ef4bddc2 RS |
88 | extern int neon_immediate_valid_for_move (rtx, machine_mode, rtx *, int *); |
89 | extern int neon_immediate_valid_for_logic (rtx, machine_mode, int, rtx *, | |
88f77cba | 90 | int *); |
ef4bddc2 | 91 | extern int neon_immediate_valid_for_shift (rtx, machine_mode, rtx *, |
31a0c825 | 92 | int *, bool); |
88f77cba | 93 | extern char *neon_output_logic_immediate (const char *, rtx *, |
ef4bddc2 | 94 | machine_mode, int, int); |
31a0c825 | 95 | extern char *neon_output_shift_immediate (const char *, char, rtx *, |
ef4bddc2 RS |
96 | machine_mode, int, bool); |
97 | extern void neon_pairwise_reduce (rtx, rtx, machine_mode, | |
88f77cba | 98 | rtx (*) (rtx, rtx, rtx)); |
814a4c3b | 99 | extern rtx neon_make_constant (rtx); |
10766209 | 100 | extern tree arm_builtin_vectorized_function (unsigned int, tree, tree); |
88f77cba | 101 | extern void neon_expand_vector_init (rtx, rtx); |
eaa80f64 | 102 | extern void neon_lane_bounds (rtx, HOST_WIDE_INT, HOST_WIDE_INT, const_tree); |
d57daa0c | 103 | extern void arm_const_bounds (rtx, HOST_WIDE_INT, HOST_WIDE_INT); |
ef4bddc2 | 104 | extern HOST_WIDE_INT neon_element_bits (machine_mode); |
ef4bddc2 | 105 | extern void neon_emit_pair_result_insn (machine_mode, |
88f77cba JB |
106 | rtx (*) (rtx, rtx, rtx, rtx), |
107 | rtx, rtx, rtx); | |
108 | extern void neon_disambiguate_copy (rtx *, rtx *, rtx *, unsigned int); | |
b440f324 | 109 | extern void neon_split_vcombine (rtx op[3]); |
ef4bddc2 | 110 | extern enum reg_class coproc_secondary_reload_class (machine_mode, rtx, |
fe2d934b | 111 | bool); |
d3585b76 | 112 | extern bool arm_tls_referenced_p (rtx); |
d5b7b3ae | 113 | |
fdd695fd | 114 | extern int arm_coproc_mem_operand (rtx, bool); |
33255ae3 | 115 | extern int neon_vector_mem_operand (rtx, int, bool); |
88f77cba | 116 | extern int neon_struct_mem_operand (rtx); |
e32bac5b | 117 | |
ee8045e5 | 118 | extern rtx *neon_vcmla_lane_prepare_operands (rtx *); |
c2b7062d | 119 | |
d3585b76 | 120 | extern int tls_mentioned_p (rtx); |
e32bac5b RE |
121 | extern int symbol_mentioned_p (rtx); |
122 | extern int label_mentioned_p (rtx); | |
123 | extern RTX_CODE minmax_code (rtx); | |
5d216c70 | 124 | extern bool arm_sat_operator_match (rtx, rtx, int *, bool *); |
e32bac5b | 125 | extern int adjacent_mem_locations (rtx, rtx); |
37119410 BS |
126 | extern bool gen_ldm_seq (rtx *, int, bool); |
127 | extern bool gen_stm_seq (rtx *, int); | |
128 | extern bool gen_const_stm_seq (rtx *, int); | |
129 | extern rtx arm_gen_load_multiple (int *, int, rtx, int, rtx, HOST_WIDE_INT *); | |
130 | extern rtx arm_gen_store_multiple (int *, int, rtx, int, rtx, HOST_WIDE_INT *); | |
56289ed2 SD |
131 | extern bool offset_ok_for_ldrd_strd (HOST_WIDE_INT); |
132 | extern bool operands_ok_ldrd_strd (rtx, rtx, rtx, HOST_WIDE_INT, bool, bool); | |
4542a38a | 133 | extern bool gen_operands_ldrd_strd (rtx *, bool, bool, bool); |
c272bbda | 134 | extern bool valid_operands_ldrd_strd (rtx *, bool); |
76715c32 AS |
135 | extern int arm_gen_cpymemqi (rtx *); |
136 | extern bool gen_cpymem_ldrd_strd (rtx *); | |
ef4bddc2 RS |
137 | extern machine_mode arm_select_cc_mode (RTX_CODE, rtx, rtx); |
138 | extern machine_mode arm_select_dominance_cc_mode (rtx, rtx, | |
e32bac5b | 139 | HOST_WIDE_INT); |
18f0fe6b | 140 | extern rtx arm_gen_compare_reg (RTX_CODE, rtx, rtx, rtx); |
e32bac5b RE |
141 | extern rtx arm_gen_return_addr_mask (void); |
142 | extern void arm_reload_in_hi (rtx *); | |
143 | extern void arm_reload_out_hi (rtx *); | |
02231c13 | 144 | extern int arm_max_const_double_inline_cost (void); |
2075b05d | 145 | extern int arm_const_double_inline_cost (rtx); |
b4a58f80 | 146 | extern bool arm_const_double_by_parts (rtx); |
73160ba9 | 147 | extern bool arm_const_double_by_immediates (rtx); |
8b63716e | 148 | extern rtx arm_load_function_descriptor (rtx funcdesc); |
7a32d6c4 | 149 | extern void arm_emit_call_insn (rtx, rtx, bool); |
c92e08e3 | 150 | bool detect_cmse_nonsecure_call (tree); |
e32bac5b | 151 | extern const char *output_call (rtx *); |
571191af | 152 | void arm_emit_movpair (rtx, rtx); |
e32bac5b | 153 | extern const char *output_mov_long_double_arm_from_arm (rtx *); |
3598da80 | 154 | extern const char *output_move_double (rtx *, bool, int *count); |
88f77cba | 155 | extern const char *output_move_quad (rtx *); |
3598da80 | 156 | extern int arm_count_output_move_double_insns (rtx *); |
c272bbda | 157 | extern int arm_count_ldrdstrd_insns (rtx *, bool); |
5b3e6663 | 158 | extern const char *output_move_vfp (rtx *operands); |
88f77cba | 159 | extern const char *output_move_neon (rtx *operands); |
647d790d DM |
160 | extern int arm_attr_length_move_neon (rtx_insn *); |
161 | extern int arm_address_offset_is_imm (rtx_insn *); | |
e32bac5b RE |
162 | extern const char *output_add_immediate (rtx *); |
163 | extern const char *arithmetic_instr (rtx, int); | |
164 | extern void output_ascii_pseudo_op (FILE *, const unsigned char *, int); | |
f79b86a4 | 165 | extern const char *output_return_instruction (rtx, bool, bool, bool); |
4fb94ef9 | 166 | extern const char *output_probe_stack_range (rtx, rtx); |
e32bac5b | 167 | extern void arm_poke_function_name (FILE *, const char *); |
81e3f921 | 168 | extern void arm_final_prescan_insn (rtx_insn *); |
e32bac5b | 169 | extern int arm_debugger_arg_offset (int, rtx); |
25a65198 | 170 | extern bool arm_is_long_call_p (tree); |
5a9335ef | 171 | extern int arm_emit_vector_const (FILE *, rtx); |
0fd8c3ad | 172 | extern void arm_emit_fp16_const (rtx c); |
5a9335ef | 173 | extern const char * arm_output_load_gr (rtx *); |
b27832ed | 174 | extern const char *vfp_output_vstmd (rtx *); |
3aee1982 | 175 | extern void arm_output_multireg_pop (rtx *, bool, rtx, bool, bool); |
c9ca9b88 | 176 | extern void arm_set_return_address (rtx, rtx); |
6555b6bd | 177 | extern int arm_eliminable_register (rtx); |
5b3e6663 | 178 | extern const char *arm_output_shift(rtx *, int); |
8fd03515 XQ |
179 | extern const char *arm_output_iwmmxt_shift_immediate (const char *, rtx *, bool); |
180 | extern const char *arm_output_iwmmxt_tinsr (rtx *); | |
029e79eb | 181 | extern unsigned int arm_sync_loop_insns (rtx , rtx *); |
0c27e2d8 | 182 | extern int arm_attr_length_push_multi(rtx, rtx); |
5775d58c | 183 | extern int arm_attr_length_pop_multi(rtx *, bool, bool); |
18f0fe6b RH |
184 | extern void arm_expand_compare_and_swap (rtx op[]); |
185 | extern void arm_split_compare_and_swap (rtx op[]); | |
186 | extern void arm_split_atomic_op (enum rtx_code, rtx, rtx, rtx, rtx, rtx, rtx); | |
f959607b | 187 | extern rtx arm_load_tp (rtx); |
d57daa0c | 188 | extern bool arm_coproc_builtin_available (enum unspecv); |
3811581f | 189 | extern bool arm_coproc_ldc_stc_legitimate_address (rtx); |
d5b7b3ae RE |
190 | |
191 | #if defined TREE_CODE | |
e32bac5b | 192 | extern void arm_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree); |
ef4bddc2 | 193 | extern bool arm_pad_reg_upward (machine_mode, tree, int); |
d5b7b3ae | 194 | #endif |
9f7bf991 | 195 | extern int arm_apply_result_size (void); |
d5b7b3ae | 196 | |
eb3921e8 NC |
197 | #endif /* RTX_CODE */ |
198 | ||
d5b7b3ae | 199 | /* Thumb functions. */ |
e32bac5b | 200 | extern void arm_init_expanders (void); |
90911ab6 | 201 | extern const char *thumb1_unexpanded_epilogue (void); |
5b3e6663 PB |
202 | extern void thumb1_expand_prologue (void); |
203 | extern void thumb1_expand_epilogue (void); | |
d018b46e | 204 | extern const char *thumb1_output_interwork (void); |
e32bac5b | 205 | extern int thumb_shiftable_const (unsigned HOST_WIDE_INT); |
cd2b33d0 | 206 | #ifdef RTX_CODE |
723d95fe | 207 | extern enum arm_cond_code maybe_get_arm_condition_code (rtx); |
81e3f921 DM |
208 | extern void thumb1_final_prescan_insn (rtx_insn *); |
209 | extern void thumb2_final_prescan_insn (rtx_insn *); | |
e32bac5b RE |
210 | extern const char *thumb_load_double_from_address (rtx *); |
211 | extern const char *thumb_output_move_mem_multiple (int, rtx *); | |
b12a00f1 | 212 | extern const char *thumb_call_via_reg (rtx); |
76715c32 | 213 | extern void thumb_expand_cpymemqi (rtx *); |
e32bac5b RE |
214 | extern rtx arm_return_addr (int, rtx); |
215 | extern void thumb_reload_out_hi (rtx *); | |
c9ca9b88 | 216 | extern void thumb_set_return_address (rtx, rtx); |
907dd0c7 RE |
217 | extern const char *thumb1_output_casesi (rtx *); |
218 | extern const char *thumb2_output_casesi (rtx *); | |
d5b7b3ae RE |
219 | #endif |
220 | ||
221 | /* Defined in pe.c. */ | |
e32bac5b RE |
222 | extern int arm_dllexport_name_p (const char *); |
223 | extern int arm_dllimport_name_p (const char *); | |
d5b7b3ae RE |
224 | |
225 | #ifdef TREE_CODE | |
e32bac5b RE |
226 | extern void arm_pe_unique_section (tree, int); |
227 | extern void arm_pe_encode_section_info (tree, rtx, int); | |
228 | extern int arm_dllexport_p (tree); | |
229 | extern int arm_dllimport_p (tree); | |
230 | extern void arm_mark_dllexport (tree); | |
231 | extern void arm_mark_dllimport (tree); | |
d5524d52 | 232 | extern bool arm_change_mode_p (tree); |
d5b7b3ae | 233 | #endif |
8b97c5f8 | 234 | |
c84f825c CB |
235 | extern tree arm_valid_target_attribute_tree (tree, struct gcc_options *, |
236 | struct gcc_options *); | |
851966d6 | 237 | extern void arm_configure_build_target (struct arm_build_target *, |
a53613c4 | 238 | struct cl_target_option *, |
851966d6 | 239 | struct gcc_options *, bool); |
008a11cc TC |
240 | extern void arm_option_reconfigure_globals (void); |
241 | extern void arm_options_perform_arch_sanity_checks (void); | |
e32bac5b RE |
242 | extern void arm_pr_long_calls (struct cpp_reader *); |
243 | extern void arm_pr_no_long_calls (struct cpp_reader *); | |
244 | extern void arm_pr_long_calls_off (struct cpp_reader *); | |
8b97c5f8 | 245 | |
3101faab | 246 | extern const char *arm_mangle_type (const_tree); |
6276b630 | 247 | extern const char *arm_mangle_builtin_type (const_tree); |
608063c3 | 248 | |
795dc4fc PB |
249 | extern void arm_order_regs_for_local_alloc (void); |
250 | ||
b24a2ce5 GY |
251 | extern int arm_max_conditional_execute (); |
252 | ||
2597da22 CL |
253 | /* Vectorizer cost model implementation. */ |
254 | struct cpu_vec_costs { | |
255 | const int scalar_stmt_cost; /* Cost of any scalar operation, excluding | |
256 | load and store. */ | |
257 | const int scalar_load_cost; /* Cost of scalar load. */ | |
258 | const int scalar_store_cost; /* Cost of scalar store. */ | |
259 | const int vec_stmt_cost; /* Cost of any vector operation, excluding | |
260 | load, store, vector-to-scalar and | |
261 | scalar-to-vector operation. */ | |
262 | const int vec_to_scalar_cost; /* Cost of vect-to-scalar operation. */ | |
263 | const int scalar_to_vec_cost; /* Cost of scalar-to-vector operation. */ | |
264 | const int vec_align_load_cost; /* Cost of aligned vector load. */ | |
265 | const int vec_unalign_load_cost; /* Cost of unaligned vector load. */ | |
266 | const int vec_unalign_store_cost; /* Cost of unaligned vector load. */ | |
267 | const int vec_store_cost; /* Cost of vector store. */ | |
268 | const int cond_taken_branch_cost; /* Cost of taken branch for vectorizer | |
269 | cost model. */ | |
270 | const int cond_not_taken_branch_cost;/* Cost of not taken branch for | |
271 | vectorizer cost model. */ | |
272 | }; | |
273 | ||
1b78f575 RE |
274 | #ifdef RTX_CODE |
275 | /* This needs to be here because we need RTX_CODE and similar. */ | |
276 | ||
5bea0c6c KT |
277 | struct cpu_cost_table; |
278 | ||
612ea540 CB |
279 | /* Addressing mode operations. Used to index tables in struct |
280 | addr_mode_cost_table. */ | |
281 | enum arm_addr_mode_op | |
282 | { | |
283 | AMO_DEFAULT, | |
284 | AMO_NO_WB, /* Offset with no writeback. */ | |
285 | AMO_WB, /* Offset with writeback. */ | |
286 | AMO_MAX /* For array size. */ | |
287 | }; | |
288 | ||
289 | /* Table of additional costs in units of COSTS_N_INSNS() when using | |
290 | addressing modes for each access type. */ | |
291 | struct addr_mode_cost_table | |
292 | { | |
293 | const int integer[AMO_MAX]; | |
294 | const int fp[AMO_MAX]; | |
295 | const int vector[AMO_MAX]; | |
296 | }; | |
297 | ||
2301ca74 BC |
298 | /* Dump function ARM_PRINT_TUNE_INFO should be updated whenever this |
299 | structure is modified. */ | |
300 | ||
1b78f575 RE |
301 | struct tune_params |
302 | { | |
5bea0c6c | 303 | const struct cpu_cost_table *insn_extra_cost; |
612ea540 | 304 | const struct addr_mode_cost_table *addr_mode_costs; |
b505225b | 305 | bool (*sched_adjust_cost) (rtx_insn *, int, rtx_insn *, int *); |
52c266ba RE |
306 | int (*branch_cost) (bool, bool); |
307 | /* Vectorizer costs. */ | |
308 | const struct cpu_vec_costs* vec_costs; | |
1b78f575 | 309 | int constant_limit; |
b24a2ce5 | 310 | /* Maximum number of instructions to conditionalise. */ |
16868d84 | 311 | int max_insns_skipped; |
52c266ba RE |
312 | /* Maximum number of instructions to inline calls to memset. */ |
313 | int max_insns_inline_memset; | |
314 | /* Issue rate of the processor. */ | |
315 | unsigned int issue_rate; | |
316 | /* Explicit prefetch data. */ | |
317 | struct | |
318 | { | |
319 | int num_slots; | |
320 | int l1_cache_size; | |
321 | int l1_cache_line_size; | |
322 | } prefetch; | |
323 | enum {PREF_CONST_POOL_FALSE, PREF_CONST_POOL_TRUE} | |
324 | prefer_constant_pool: 1; | |
ab3dfff7 | 325 | /* Prefer STRD/LDRD instructions over PUSH/POP/LDM/STM. */ |
52c266ba | 326 | enum {PREF_LDRD_FALSE, PREF_LDRD_TRUE} prefer_ldrd_strd: 1; |
a51fb17f BC |
327 | /* The preference for non short cirtcuit operation when optimizing for |
328 | performance. The first element covers Thumb state and the second one | |
329 | is for ARM state. */ | |
ffa7068e JG |
330 | enum log_op_non_short_circuit {LOG_OP_NON_SHORT_CIRCUIT_FALSE, |
331 | LOG_OP_NON_SHORT_CIRCUIT_TRUE}; | |
332 | log_op_non_short_circuit logical_op_non_short_circuit_thumb: 1; | |
333 | log_op_non_short_circuit logical_op_non_short_circuit_arm: 1; | |
46fbb3eb | 334 | /* Prefer 32-bit encoding instead of flag-setting 16-bit encoding. */ |
52c266ba RE |
335 | enum {DISPARAGE_FLAGS_NEITHER, DISPARAGE_FLAGS_PARTIAL, DISPARAGE_FLAGS_ALL} |
336 | disparage_flag_setting_t16_encodings: 2; | |
ad421159 | 337 | /* Prefer to inline string operations like memset by using Neon. */ |
52c266ba RE |
338 | enum {PREF_NEON_STRINGOPS_FALSE, PREF_NEON_STRINGOPS_TRUE} |
339 | string_ops_prefer_neon: 1; | |
fe0b29c7 | 340 | /* Bitfield encoding the fusible pairs of instructions. Use FUSE_OPS |
52c266ba RE |
341 | in an initializer if multiple fusion operations are supported on a |
342 | target. */ | |
343 | enum fuse_ops | |
344 | { | |
345 | FUSE_NOTHING = 0, | |
066c14c9 WD |
346 | FUSE_MOVW_MOVT = 1 << 0, |
347 | FUSE_AES_AESMC = 1 << 1 | |
348 | } fusible_ops: 2; | |
340c7904 | 349 | /* Depth of scheduling queue to check for L2 autoprefetcher. */ |
52c266ba RE |
350 | enum {SCHED_AUTOPREF_OFF, SCHED_AUTOPREF_RANK, SCHED_AUTOPREF_FULL} |
351 | sched_autopref: 2; | |
1b78f575 RE |
352 | }; |
353 | ||
52c266ba RE |
354 | /* Smash multiple fusion operations into a type that can be used for an |
355 | initializer. */ | |
356 | #define FUSE_OPS(x) ((tune_params::fuse_ops) (x)) | |
357 | ||
1b78f575 | 358 | extern const struct tune_params *current_tune; |
7f3d8f56 | 359 | extern int vfp3_const_double_for_fract_bits (rtx); |
c75d51aa RL |
360 | /* return power of two from operand, otherwise 0. */ |
361 | extern int vfp3_const_double_for_bits (rtx); | |
99aea943 AS |
362 | |
363 | extern void arm_emit_coreregs_64bit_shift (enum rtx_code, rtx, rtx, rtx, rtx, | |
364 | rtx); | |
39fa4aec | 365 | extern bool arm_fusion_enabled_p (tune_params::fuse_ops); |
6ce43645 | 366 | extern bool arm_valid_symbolic_address_p (rtx); |
95ffee1f | 367 | extern bool arm_validize_comparison (rtx *, rtx *, rtx *); |
1b78f575 RE |
368 | #endif /* RTX_CODE */ |
369 | ||
ad421159 | 370 | extern bool arm_gen_setmem (rtx *); |
b440f324 | 371 | extern void arm_expand_vec_perm (rtx target, rtx op0, rtx op1, rtx sel); |
b440f324 | 372 | |
ef4bddc2 | 373 | extern bool arm_autoinc_modes_ok_p (machine_mode, enum arm_auto_incmodes); |
8875e939 | 374 | |
34dd397b SB |
375 | extern void arm_emit_eabi_attribute (const char *, int, int); |
376 | ||
d5524d52 | 377 | extern void arm_reset_previous_fndecl (void); |
eeb085f3 | 378 | extern void save_restore_target_globals (tree); |
d5524d52 | 379 | |
b848e289 JG |
380 | /* Defined in gcc/common/config/arm-common.c. */ |
381 | extern const char *arm_rewrite_selected_cpu (const char *name); | |
382 | ||
7049e4eb CB |
383 | /* Defined in gcc/common/config/arm-c.c. */ |
384 | extern void arm_lang_object_attributes_init (void); | |
c84f825c | 385 | extern void arm_register_target_pragmas (void); |
7049e4eb CB |
386 | extern void arm_cpu_cpp_builtins (struct cpp_reader *); |
387 | ||
b4c522fa IB |
388 | /* Defined in arm-d.c */ |
389 | extern void arm_d_target_versions (void); | |
390 | ||
aed773a2 CB |
391 | extern bool arm_is_constant_pool_ref (rtx); |
392 | ||
a27d8d80 JG |
393 | /* The bits in this mask specify which instruction scheduling options should |
394 | be used. */ | |
643a5717 | 395 | extern unsigned int tune_flags; |
a27d8d80 | 396 | |
a27d8d80 JG |
397 | /* Nonzero if this chip supports the ARM Architecture 4 extensions. */ |
398 | extern int arm_arch4; | |
399 | ||
400 | /* Nonzero if this chip supports the ARM Architecture 4t extensions. */ | |
401 | extern int arm_arch4t; | |
402 | ||
c3f808d3 KT |
403 | /* Nonzero if this chip supports the ARM Architecture 5t extensions. */ |
404 | extern int arm_arch5t; | |
a27d8d80 | 405 | |
c3f808d3 KT |
406 | /* Nonzero if this chip supports the ARM Architecture 5te extensions. */ |
407 | extern int arm_arch5te; | |
a27d8d80 JG |
408 | |
409 | /* Nonzero if this chip supports the ARM Architecture 6 extensions. */ | |
410 | extern int arm_arch6; | |
411 | ||
412 | /* Nonzero if this chip supports the ARM 6K extensions. */ | |
413 | extern int arm_arch6k; | |
414 | ||
39c12541 MW |
415 | /* Nonzero if this chip supports the ARM 6KZ extensions. */ |
416 | extern int arm_arch6kz; | |
417 | ||
a27d8d80 JG |
418 | /* Nonzero if instructions present in ARMv6-M can be used. */ |
419 | extern int arm_arch6m; | |
420 | ||
421 | /* Nonzero if this chip supports the ARM 7 extensions. */ | |
422 | extern int arm_arch7; | |
423 | ||
bf634d1c TP |
424 | /* Nonzero if this chip supports the Large Physical Address Extension. */ |
425 | extern int arm_arch_lpae; | |
6c466c7c | 426 | |
a27d8d80 JG |
427 | /* Nonzero if instructions not present in the 'M' profile can be used. */ |
428 | extern int arm_arch_notm; | |
429 | ||
430 | /* Nonzero if instructions present in ARMv7E-M can be used. */ | |
431 | extern int arm_arch7em; | |
432 | ||
433 | /* Nonzero if instructions present in ARMv8 can be used. */ | |
434 | extern int arm_arch8; | |
435 | ||
436 | /* Nonzero if this chip can benefit from load scheduling. */ | |
437 | extern int arm_ld_sched; | |
438 | ||
439 | /* Nonzero if this chip is a StrongARM. */ | |
440 | extern int arm_tune_strongarm; | |
441 | ||
442 | /* Nonzero if this chip supports Intel Wireless MMX technology. */ | |
443 | extern int arm_arch_iwmmxt; | |
444 | ||
445 | /* Nonzero if this chip supports Intel Wireless MMX2 technology. */ | |
446 | extern int arm_arch_iwmmxt2; | |
447 | ||
448 | /* Nonzero if this chip is an XScale. */ | |
449 | extern int arm_arch_xscale; | |
450 | ||
451 | /* Nonzero if tuning for XScale */ | |
452 | extern int arm_tune_xscale; | |
453 | ||
454 | /* Nonzero if we want to tune for stores that access the write-buffer. | |
455 | This typically means an ARM6 or ARM7 with MMU or MPU. */ | |
456 | extern int arm_tune_wbuf; | |
457 | ||
458 | /* Nonzero if tuning for Cortex-A9. */ | |
459 | extern int arm_tune_cortex_a9; | |
460 | ||
a27d8d80 JG |
461 | /* Nonzero if we should define __THUMB_INTERWORK__ in the |
462 | preprocessor. | |
463 | XXX This is a bit of a hack, it's intended to help work around | |
464 | problems in GLD which doesn't understand that armv5t code is | |
465 | interworking clean. */ | |
466 | extern int arm_cpp_interwork; | |
467 | ||
52545641 TP |
468 | /* Nonzero if chip supports Thumb 1. */ |
469 | extern int arm_arch_thumb1; | |
470 | ||
a27d8d80 JG |
471 | /* Nonzero if chip supports Thumb 2. */ |
472 | extern int arm_arch_thumb2; | |
473 | ||
474 | /* Nonzero if chip supports integer division instruction. */ | |
475 | extern int arm_arch_arm_hwdiv; | |
476 | extern int arm_arch_thumb_hwdiv; | |
477 | ||
afe006ad TG |
478 | /* Nonzero if chip disallows volatile memory access in IT block. */ |
479 | extern int arm_arch_no_volatile_ce; | |
480 | ||
8341f8c4 RE |
481 | /* Structure defining the current overall architectural target and tuning. */ |
482 | struct arm_build_target | |
483 | { | |
484 | /* Name of the target CPU, if known, or NULL if the target CPU was not | |
485 | specified by the user (and inferred from the -march option). */ | |
486 | const char *core_name; | |
487 | /* Name of the target ARCH. NULL if there is a selected CPU. */ | |
488 | const char *arch_name; | |
489 | /* Preprocessor substring (never NULL). */ | |
490 | const char *arch_pp_name; | |
8341f8c4 RE |
491 | /* The base architecture value. */ |
492 | enum base_architecture base_arch; | |
8afb5358 RE |
493 | /* The profile letter for the architecture, upper case by convention. */ |
494 | char profile; | |
8341f8c4 RE |
495 | /* Bitmap encapsulating the isa_bits for the target environment. */ |
496 | sbitmap isa; | |
497 | /* Flags used for tuning. Long term, these move into tune_params. */ | |
498 | unsigned int tune_flags; | |
499 | /* Tables with more detailed tuning information. */ | |
500 | const struct tune_params *tune; | |
501 | /* CPU identifier for the tuning target. */ | |
502 | enum processor_type tune_core; | |
503 | }; | |
504 | ||
505 | extern struct arm_build_target arm_active_target; | |
a27d8d80 | 506 | |
d4f680c6 RE |
507 | /* Table entry for a CPU alias. */ |
508 | struct cpu_alias | |
509 | { | |
510 | /* The alias name. */ | |
511 | const char *const name; | |
512 | /* True if the name should be displayed in help text listing cpu names. */ | |
513 | bool visible; | |
514 | }; | |
515 | ||
516 | /* Table entry for an architectural feature extension. */ | |
050809ed RE |
517 | struct cpu_arch_extension |
518 | { | |
357e1023 | 519 | /* Feature name. */ |
050809ed | 520 | const char *const name; |
357e1023 | 521 | /* True if the option is negative (removes extensions). */ |
050809ed | 522 | bool remove; |
357e1023 RE |
523 | /* True if the option is an alias for another option with identical effect; |
524 | the option will be ignored for canonicalization. */ | |
525 | bool alias; | |
526 | /* The modifier bits. */ | |
050809ed RE |
527 | const enum isa_feature isa_bits[isa_num_bits]; |
528 | }; | |
529 | ||
d4f680c6 | 530 | /* Common elements of both CPU and architectural options. */ |
050809ed RE |
531 | struct cpu_arch_option |
532 | { | |
533 | /* Name for this option. */ | |
534 | const char *name; | |
535 | /* List of feature extensions permitted. */ | |
536 | const struct cpu_arch_extension *extensions; | |
537 | /* Standard feature bits. */ | |
538 | enum isa_feature isa_bits[isa_num_bits]; | |
539 | }; | |
540 | ||
d4f680c6 | 541 | /* Table entry for an architecture entry. */ |
050809ed RE |
542 | struct arch_option |
543 | { | |
544 | /* Common option fields. */ | |
545 | cpu_arch_option common; | |
546 | /* Short string for this architecture. */ | |
547 | const char *arch; | |
548 | /* Base architecture, from which this specific architecture is derived. */ | |
549 | enum base_architecture base_arch; | |
8afb5358 RE |
550 | /* The profile letter for the architecture, upper case by convention. */ |
551 | const char profile; | |
050809ed RE |
552 | /* Default tune target (in the absence of any more specific data). */ |
553 | enum processor_type tune_id; | |
554 | }; | |
555 | ||
d4f680c6 | 556 | /* Table entry for a CPU entry. */ |
050809ed RE |
557 | struct cpu_option |
558 | { | |
559 | /* Common option fields. */ | |
560 | cpu_arch_option common; | |
d4f680c6 RE |
561 | /* List of aliases for this CPU. */ |
562 | const struct cpu_alias *aliases; | |
050809ed RE |
563 | /* Architecture upon which this CPU is based. */ |
564 | enum arch_type arch; | |
565 | }; | |
a27d8d80 | 566 | |
435d1272 RE |
567 | extern const arch_option all_architectures[]; |
568 | extern const cpu_option all_cores[]; | |
569 | ||
570 | const cpu_option *arm_parse_cpu_option_name (const cpu_option *, const char *, | |
a4017ff7 | 571 | const char *, bool = true); |
435d1272 | 572 | const arch_option *arm_parse_arch_option_name (const arch_option *, |
a4017ff7 | 573 | const char *, const char *, bool = true); |
435d1272 RE |
574 | void arm_parse_option_features (sbitmap, const cpu_arch_option *, |
575 | const char *); | |
576 | ||
577 | void arm_initialize_isa (sbitmap, const enum isa_feature *); | |
578 | ||
88657302 | 579 | #endif /* ! GCC_ARM_PROTOS_H */ |