您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

589 行
23KB

  1. /* Prototypes for exported functions defined in arm.c and pe.c
  2. Copyright (C) 1999-2020 Free Software Foundation, Inc.
  3. Contributed by Richard Earnshaw (rearnsha@arm.com)
  4. Minor hacks by Nick Clifton (nickc@cygnus.com)
  5. This file is part of GCC.
  6. GCC is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 3, or (at your option)
  9. any later version.
  10. GCC is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with GCC; see the file COPYING3. If not see
  16. <http://www.gnu.org/licenses/>. */
  17. #ifndef GCC_ARM_PROTOS_H
  18. #define GCC_ARM_PROTOS_H
  19. #include "sbitmap.h"
  20. extern enum unwind_info_type arm_except_unwind_info (struct gcc_options *);
  21. extern int use_return_insn (int, rtx);
  22. extern bool use_simple_return_p (void);
  23. extern enum reg_class arm_regno_class (int);
  24. extern bool arm_check_builtin_call (location_t , vec<location_t> , tree,
  25. tree, unsigned int, tree *);
  26. extern void arm_load_pic_register (unsigned long, rtx);
  27. extern int arm_volatile_func (void);
  28. extern void arm_expand_prologue (void);
  29. extern void arm_expand_epilogue (bool);
  30. extern void arm_declare_function_name (FILE *, const char *, tree);
  31. extern void arm_asm_declare_function_name (FILE *, const char *, tree);
  32. extern void thumb2_expand_return (bool);
  33. extern const char *arm_strip_name_encoding (const char *);
  34. extern void arm_asm_output_labelref (FILE *, const char *);
  35. extern void thumb2_asm_output_opcode (FILE *);
  36. extern unsigned long arm_current_func_type (void);
  37. extern HOST_WIDE_INT arm_compute_initial_elimination_offset (unsigned int,
  38. unsigned int);
  39. extern HOST_WIDE_INT thumb_compute_initial_elimination_offset (unsigned int,
  40. unsigned int);
  41. extern unsigned int arm_dbx_register_number (unsigned int);
  42. extern void arm_output_fn_unwind (FILE *, bool);
  43. extern rtx arm_expand_builtin (tree exp, rtx target, rtx subtarget
  44. ATTRIBUTE_UNUSED, machine_mode mode
  45. ATTRIBUTE_UNUSED, int ignore ATTRIBUTE_UNUSED);
  46. extern tree arm_builtin_decl (unsigned code, bool initialize_p
  47. ATTRIBUTE_UNUSED);
  48. extern void arm_init_builtins (void);
  49. extern void arm_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update);
  50. extern rtx arm_simd_vect_par_cnst_half (machine_mode mode, bool high);
  51. extern bool arm_simd_check_vect_par_cnst_half_p (rtx op, machine_mode mode,
  52. bool high);
  53. extern void arm_emit_speculation_barrier_function (void);
  54. extern void arm_decompose_di_binop (rtx, rtx, rtx *, rtx *, rtx *, rtx *);
  55. extern bool arm_q_bit_access (void);
  56. extern bool arm_ge_bits_access (void);
  57. #ifdef RTX_CODE
  58. enum reg_class
  59. arm_mode_base_reg_class (machine_mode);
  60. extern void arm_gen_unlikely_cbranch (enum rtx_code, machine_mode cc_mode,
  61. rtx label_ref);
  62. extern bool arm_vector_mode_supported_p (machine_mode);
  63. extern bool arm_small_register_classes_for_mode_p (machine_mode);
  64. extern int const_ok_for_arm (HOST_WIDE_INT);
  65. extern int const_ok_for_op (HOST_WIDE_INT, enum rtx_code);
  66. extern int const_ok_for_dimode_op (HOST_WIDE_INT, enum rtx_code);
  67. extern void thumb1_gen_const_int (rtx, HOST_WIDE_INT);
  68. extern int arm_split_constant (RTX_CODE, machine_mode, rtx,
  69. HOST_WIDE_INT, rtx, rtx, int);
  70. extern int legitimate_pic_operand_p (rtx);
  71. extern rtx legitimize_pic_address (rtx, machine_mode, rtx, rtx, bool);
  72. extern rtx legitimize_tls_address (rtx, rtx);
  73. extern bool arm_legitimate_address_p (machine_mode, rtx, bool);
  74. extern int arm_legitimate_address_outer_p (machine_mode, rtx, RTX_CODE, int);
  75. extern int thumb_legitimate_offset_p (machine_mode, HOST_WIDE_INT);
  76. extern int thumb1_legitimate_address_p (machine_mode, rtx, int);
  77. extern bool ldm_stm_operation_p (rtx, bool, machine_mode mode,
  78. bool, bool);
  79. extern bool clear_operation_p (rtx, bool);
  80. extern int arm_const_double_rtx (rtx);
  81. extern int vfp3_const_double_rtx (rtx);
  82. extern int simd_immediate_valid_for_move (rtx, machine_mode, rtx *, int *);
  83. extern int neon_immediate_valid_for_logic (rtx, machine_mode, int, rtx *,
  84. int *);
  85. extern int neon_immediate_valid_for_shift (rtx, machine_mode, rtx *,
  86. int *, bool);
  87. extern char *neon_output_logic_immediate (const char *, rtx *,
  88. machine_mode, int, int);
  89. extern char *neon_output_shift_immediate (const char *, char, rtx *,
  90. machine_mode, int, bool);
  91. extern void neon_pairwise_reduce (rtx, rtx, machine_mode,
  92. rtx (*) (rtx, rtx, rtx));
  93. extern rtx neon_make_constant (rtx);
  94. extern tree arm_builtin_vectorized_function (unsigned int, tree, tree);
  95. extern void neon_expand_vector_init (rtx, rtx);
  96. extern void neon_lane_bounds (rtx, HOST_WIDE_INT, HOST_WIDE_INT, const_tree);
  97. extern void arm_const_bounds (rtx, HOST_WIDE_INT, HOST_WIDE_INT);
  98. extern HOST_WIDE_INT neon_element_bits (machine_mode);
  99. extern void neon_emit_pair_result_insn (machine_mode,
  100. rtx (*) (rtx, rtx, rtx, rtx),
  101. rtx, rtx, rtx);
  102. extern void neon_disambiguate_copy (rtx *, rtx *, rtx *, unsigned int);
  103. extern void neon_split_vcombine (rtx op[3]);
  104. extern enum reg_class coproc_secondary_reload_class (machine_mode, rtx,
  105. bool);
  106. extern bool arm_tls_referenced_p (rtx);
  107. extern int arm_coproc_mem_operand (rtx, bool);
  108. extern int arm_coproc_mem_operand_no_writeback (rtx);
  109. extern int arm_coproc_mem_operand_wb (rtx, int);
  110. extern int neon_vector_mem_operand (rtx, int, bool);
  111. extern int mve_vector_mem_operand (machine_mode, rtx, bool);
  112. extern int neon_struct_mem_operand (rtx);
  113. extern rtx *neon_vcmla_lane_prepare_operands (rtx *);
  114. extern int tls_mentioned_p (rtx);
  115. extern int symbol_mentioned_p (rtx);
  116. extern int label_mentioned_p (rtx);
  117. extern RTX_CODE minmax_code (rtx);
  118. extern bool arm_sat_operator_match (rtx, rtx, int *, bool *);
  119. extern int adjacent_mem_locations (rtx, rtx);
  120. extern bool gen_ldm_seq (rtx *, int, bool);
  121. extern bool gen_stm_seq (rtx *, int);
  122. extern bool gen_const_stm_seq (rtx *, int);
  123. extern rtx arm_gen_load_multiple (int *, int, rtx, int, rtx, HOST_WIDE_INT *);
  124. extern rtx arm_gen_store_multiple (int *, int, rtx, int, rtx, HOST_WIDE_INT *);
  125. extern bool offset_ok_for_ldrd_strd (HOST_WIDE_INT);
  126. extern bool operands_ok_ldrd_strd (rtx, rtx, rtx, HOST_WIDE_INT, bool, bool);
  127. extern bool gen_operands_ldrd_strd (rtx *, bool, bool, bool);
  128. extern bool valid_operands_ldrd_strd (rtx *, bool);
  129. extern int arm_gen_cpymemqi (rtx *);
  130. extern bool gen_cpymem_ldrd_strd (rtx *);
  131. extern machine_mode arm_select_cc_mode (RTX_CODE, rtx, rtx);
  132. extern machine_mode arm_select_dominance_cc_mode (rtx, rtx,
  133. HOST_WIDE_INT);
  134. extern rtx arm_gen_compare_reg (RTX_CODE, rtx, rtx, rtx);
  135. extern rtx arm_gen_return_addr_mask (void);
  136. extern void arm_reload_in_hi (rtx *);
  137. extern void arm_reload_out_hi (rtx *);
  138. extern int arm_max_const_double_inline_cost (void);
  139. extern int arm_const_double_inline_cost (rtx);
  140. extern bool arm_const_double_by_parts (rtx);
  141. extern bool arm_const_double_by_immediates (rtx);
  142. extern rtx arm_load_function_descriptor (rtx funcdesc);
  143. extern void arm_emit_call_insn (rtx, rtx, bool);
  144. bool detect_cmse_nonsecure_call (tree);
  145. extern const char *output_call (rtx *);
  146. void arm_emit_movpair (rtx, rtx);
  147. extern const char *output_mov_long_double_arm_from_arm (rtx *);
  148. extern const char *output_move_double (rtx *, bool, int *count);
  149. extern const char *output_move_quad (rtx *);
  150. extern int arm_count_output_move_double_insns (rtx *);
  151. extern int arm_count_ldrdstrd_insns (rtx *, bool);
  152. extern const char *output_move_vfp (rtx *operands);
  153. extern const char *output_move_neon (rtx *operands);
  154. extern int arm_attr_length_move_neon (rtx_insn *);
  155. extern int arm_address_offset_is_imm (rtx_insn *);
  156. extern const char *output_add_immediate (rtx *);
  157. extern const char *arithmetic_instr (rtx, int);
  158. extern void output_ascii_pseudo_op (FILE *, const unsigned char *, int);
  159. extern const char *output_return_instruction (rtx, bool, bool, bool);
  160. extern const char *output_probe_stack_range (rtx, rtx);
  161. extern void arm_poke_function_name (FILE *, const char *);
  162. extern void arm_final_prescan_insn (rtx_insn *);
  163. extern int arm_debugger_arg_offset (int, rtx);
  164. extern bool arm_is_long_call_p (tree);
  165. extern int arm_emit_vector_const (FILE *, rtx);
  166. extern void arm_emit_fp16_const (rtx c);
  167. extern const char * arm_output_load_gr (rtx *);
  168. extern const char *vfp_output_vstmd (rtx *);
  169. extern void arm_output_multireg_pop (rtx *, bool, rtx, bool, bool);
  170. extern void arm_set_return_address (rtx, rtx);
  171. extern int arm_eliminable_register (rtx);
  172. extern const char *arm_output_shift(rtx *, int);
  173. extern const char *arm_output_iwmmxt_shift_immediate (const char *, rtx *, bool);
  174. extern const char *arm_output_iwmmxt_tinsr (rtx *);
  175. extern unsigned int arm_sync_loop_insns (rtx , rtx *);
  176. extern int arm_attr_length_push_multi(rtx, rtx);
  177. extern int arm_attr_length_pop_multi(rtx *, bool, bool);
  178. extern void arm_expand_compare_and_swap (rtx op[]);
  179. extern void arm_split_compare_and_swap (rtx op[]);
  180. extern void arm_split_atomic_op (enum rtx_code, rtx, rtx, rtx, rtx, rtx, rtx);
  181. extern rtx arm_load_tp (rtx);
  182. extern bool arm_coproc_builtin_available (enum unspecv);
  183. extern bool arm_coproc_ldc_stc_legitimate_address (rtx);
  184. #if defined TREE_CODE
  185. extern void arm_init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree);
  186. extern bool arm_pad_reg_upward (machine_mode, tree, int);
  187. #endif
  188. extern int arm_apply_result_size (void);
  189. #endif /* RTX_CODE */
  190. /* Thumb functions. */
  191. extern void arm_init_expanders (void);
  192. extern const char *thumb1_unexpanded_epilogue (void);
  193. extern void thumb1_expand_prologue (void);
  194. extern void thumb1_expand_epilogue (void);
  195. extern const char *thumb1_output_interwork (void);
  196. extern int thumb_shiftable_const (unsigned HOST_WIDE_INT);
  197. #ifdef RTX_CODE
  198. extern enum arm_cond_code maybe_get_arm_condition_code (rtx);
  199. extern void thumb1_final_prescan_insn (rtx_insn *);
  200. extern void thumb2_final_prescan_insn (rtx_insn *);
  201. extern const char *thumb_load_double_from_address (rtx *);
  202. extern const char *thumb_output_move_mem_multiple (int, rtx *);
  203. extern const char *thumb_call_via_reg (rtx);
  204. extern void thumb_expand_cpymemqi (rtx *);
  205. extern rtx arm_return_addr (int, rtx);
  206. extern void thumb_reload_out_hi (rtx *);
  207. extern void thumb_set_return_address (rtx, rtx);
  208. extern const char *thumb1_output_casesi (rtx *);
  209. extern const char *thumb2_output_casesi (rtx *);
  210. #endif
  211. /* Defined in pe.c. */
  212. extern int arm_dllexport_name_p (const char *);
  213. extern int arm_dllimport_name_p (const char *);
  214. #ifdef TREE_CODE
  215. extern void arm_pe_unique_section (tree, int);
  216. extern void arm_pe_encode_section_info (tree, rtx, int);
  217. extern int arm_dllexport_p (tree);
  218. extern int arm_dllimport_p (tree);
  219. extern void arm_mark_dllexport (tree);
  220. extern void arm_mark_dllimport (tree);
  221. extern bool arm_change_mode_p (tree);
  222. #endif
  223. extern tree arm_valid_target_attribute_tree (tree, struct gcc_options *,
  224. struct gcc_options *);
  225. extern void arm_configure_build_target (struct arm_build_target *,
  226. struct cl_target_option *,
  227. struct gcc_options *, bool);
  228. extern void arm_option_reconfigure_globals (void);
  229. extern void arm_options_perform_arch_sanity_checks (void);
  230. extern void arm_pr_long_calls (struct cpp_reader *);
  231. extern void arm_pr_no_long_calls (struct cpp_reader *);
  232. extern void arm_pr_long_calls_off (struct cpp_reader *);
  233. extern const char *arm_mangle_type (const_tree);
  234. extern const char *arm_mangle_builtin_type (const_tree);
  235. extern void arm_order_regs_for_local_alloc (void);
  236. extern int arm_max_conditional_execute ();
  237. /* Vectorizer cost model implementation. */
  238. struct cpu_vec_costs {
  239. const int scalar_stmt_cost; /* Cost of any scalar operation, excluding
  240. load and store. */
  241. const int scalar_load_cost; /* Cost of scalar load. */
  242. const int scalar_store_cost; /* Cost of scalar store. */
  243. const int vec_stmt_cost; /* Cost of any vector operation, excluding
  244. load, store, vector-to-scalar and
  245. scalar-to-vector operation. */
  246. const int vec_to_scalar_cost; /* Cost of vect-to-scalar operation. */
  247. const int scalar_to_vec_cost; /* Cost of scalar-to-vector operation. */
  248. const int vec_align_load_cost; /* Cost of aligned vector load. */
  249. const int vec_unalign_load_cost; /* Cost of unaligned vector load. */
  250. const int vec_unalign_store_cost; /* Cost of unaligned vector load. */
  251. const int vec_store_cost; /* Cost of vector store. */
  252. const int cond_taken_branch_cost; /* Cost of taken branch for vectorizer
  253. cost model. */
  254. const int cond_not_taken_branch_cost;/* Cost of not taken branch for
  255. vectorizer cost model. */
  256. };
  257. #ifdef RTX_CODE
  258. /* This needs to be here because we need RTX_CODE and similar. */
  259. struct cpu_cost_table;
  260. /* Addressing mode operations. Used to index tables in struct
  261. addr_mode_cost_table. */
  262. enum arm_addr_mode_op
  263. {
  264. AMO_DEFAULT,
  265. AMO_NO_WB, /* Offset with no writeback. */
  266. AMO_WB, /* Offset with writeback. */
  267. AMO_MAX /* For array size. */
  268. };
  269. /* Table of additional costs in units of COSTS_N_INSNS() when using
  270. addressing modes for each access type. */
  271. struct addr_mode_cost_table
  272. {
  273. const int integer[AMO_MAX];
  274. const int fp[AMO_MAX];
  275. const int vector[AMO_MAX];
  276. };
  277. /* Dump function ARM_PRINT_TUNE_INFO should be updated whenever this
  278. structure is modified. */
  279. struct tune_params
  280. {
  281. const struct cpu_cost_table *insn_extra_cost;
  282. const struct addr_mode_cost_table *addr_mode_costs;
  283. bool (*sched_adjust_cost) (rtx_insn *, int, rtx_insn *, int *);
  284. int (*branch_cost) (bool, bool);
  285. /* Vectorizer costs. */
  286. const struct cpu_vec_costs* vec_costs;
  287. int constant_limit;
  288. /* Maximum number of instructions to conditionalise. */
  289. int max_insns_skipped;
  290. /* Maximum number of instructions to inline calls to memset. */
  291. int max_insns_inline_memset;
  292. /* Issue rate of the processor. */
  293. unsigned int issue_rate;
  294. /* Explicit prefetch data. */
  295. struct
  296. {
  297. int num_slots;
  298. int l1_cache_size;
  299. int l1_cache_line_size;
  300. } prefetch;
  301. enum {PREF_CONST_POOL_FALSE, PREF_CONST_POOL_TRUE}
  302. prefer_constant_pool: 1;
  303. /* Prefer STRD/LDRD instructions over PUSH/POP/LDM/STM. */
  304. enum {PREF_LDRD_FALSE, PREF_LDRD_TRUE} prefer_ldrd_strd: 1;
  305. /* The preference for non short cirtcuit operation when optimizing for
  306. performance. The first element covers Thumb state and the second one
  307. is for ARM state. */
  308. enum log_op_non_short_circuit {LOG_OP_NON_SHORT_CIRCUIT_FALSE,
  309. LOG_OP_NON_SHORT_CIRCUIT_TRUE};
  310. log_op_non_short_circuit logical_op_non_short_circuit_thumb: 1;
  311. log_op_non_short_circuit logical_op_non_short_circuit_arm: 1;
  312. /* Prefer 32-bit encoding instead of flag-setting 16-bit encoding. */
  313. enum {DISPARAGE_FLAGS_NEITHER, DISPARAGE_FLAGS_PARTIAL, DISPARAGE_FLAGS_ALL}
  314. disparage_flag_setting_t16_encodings: 2;
  315. /* Prefer to inline string operations like memset by using Neon. */
  316. enum {PREF_NEON_STRINGOPS_FALSE, PREF_NEON_STRINGOPS_TRUE}
  317. string_ops_prefer_neon: 1;
  318. /* Bitfield encoding the fusible pairs of instructions. Use FUSE_OPS
  319. in an initializer if multiple fusion operations are supported on a
  320. target. */
  321. enum fuse_ops
  322. {
  323. FUSE_NOTHING = 0,
  324. FUSE_MOVW_MOVT = 1 << 0,
  325. FUSE_AES_AESMC = 1 << 1
  326. } fusible_ops: 2;
  327. /* Depth of scheduling queue to check for L2 autoprefetcher. */
  328. enum {SCHED_AUTOPREF_OFF, SCHED_AUTOPREF_RANK, SCHED_AUTOPREF_FULL}
  329. sched_autopref: 2;
  330. };
  331. /* Smash multiple fusion operations into a type that can be used for an
  332. initializer. */
  333. #define FUSE_OPS(x) ((tune_params::fuse_ops) (x))
  334. extern const struct tune_params *current_tune;
  335. extern int vfp3_const_double_for_fract_bits (rtx);
  336. /* return power of two from operand, otherwise 0. */
  337. extern int vfp3_const_double_for_bits (rtx);
  338. extern void arm_emit_coreregs_64bit_shift (enum rtx_code, rtx, rtx, rtx, rtx,
  339. rtx);
  340. extern bool arm_fusion_enabled_p (tune_params::fuse_ops);
  341. extern bool arm_valid_symbolic_address_p (rtx);
  342. extern bool arm_validize_comparison (rtx *, rtx *, rtx *);
  343. #endif /* RTX_CODE */
  344. extern bool arm_gen_setmem (rtx *);
  345. extern void arm_expand_vec_perm (rtx target, rtx op0, rtx op1, rtx sel);
  346. extern bool arm_autoinc_modes_ok_p (machine_mode, enum arm_auto_incmodes);
  347. extern void arm_emit_eabi_attribute (const char *, int, int);
  348. extern void arm_reset_previous_fndecl (void);
  349. extern void save_restore_target_globals (tree);
  350. /* Defined in gcc/common/config/arm-common.c. */
  351. extern const char *arm_rewrite_selected_cpu (const char *name);
  352. /* Defined in gcc/common/config/arm-c.c. */
  353. extern void arm_lang_object_attributes_init (void);
  354. extern void arm_register_target_pragmas (void);
  355. extern void arm_cpu_cpp_builtins (struct cpp_reader *);
  356. /* Defined in arm-d.c */
  357. extern void arm_d_target_versions (void);
  358. extern bool arm_is_constant_pool_ref (rtx);
  359. /* The bits in this mask specify which instruction scheduling options should
  360. be used. */
  361. extern unsigned int tune_flags;
  362. /* Nonzero if this chip supports the ARM Architecture 4 extensions. */
  363. extern int arm_arch4;
  364. /* Nonzero if this chip supports the ARM Architecture 4t extensions. */
  365. extern int arm_arch4t;
  366. /* Nonzero if this chip supports the ARM Architecture 5t extensions. */
  367. extern int arm_arch5t;
  368. /* Nonzero if this chip supports the ARM Architecture 5te extensions. */
  369. extern int arm_arch5te;
  370. /* Nonzero if this chip supports the ARM Architecture 6 extensions. */
  371. extern int arm_arch6;
  372. /* Nonzero if this chip supports the ARM 6K extensions. */
  373. extern int arm_arch6k;
  374. /* Nonzero if this chip supports the ARM 6KZ extensions. */
  375. extern int arm_arch6kz;
  376. /* Nonzero if instructions present in ARMv6-M can be used. */
  377. extern int arm_arch6m;
  378. /* Nonzero if this chip supports the ARM 7 extensions. */
  379. extern int arm_arch7;
  380. /* Nonzero if this chip supports the Large Physical Address Extension. */
  381. extern int arm_arch_lpae;
  382. /* Nonzero if instructions not present in the 'M' profile can be used. */
  383. extern int arm_arch_notm;
  384. /* Nonzero if instructions present in ARMv7E-M can be used. */
  385. extern int arm_arch7em;
  386. /* Nonzero if instructions present in ARMv8 can be used. */
  387. extern int arm_arch8;
  388. /* Nonzero if this chip can benefit from load scheduling. */
  389. extern int arm_ld_sched;
  390. /* Nonzero if this chip is a StrongARM. */
  391. extern int arm_tune_strongarm;
  392. /* Nonzero if this chip supports Intel Wireless MMX technology. */
  393. extern int arm_arch_iwmmxt;
  394. /* Nonzero if this chip supports Intel Wireless MMX2 technology. */
  395. extern int arm_arch_iwmmxt2;
  396. /* Nonzero if this chip is an XScale. */
  397. extern int arm_arch_xscale;
  398. /* Nonzero if tuning for XScale */
  399. extern int arm_tune_xscale;
  400. /* Nonzero if we want to tune for stores that access the write-buffer.
  401. This typically means an ARM6 or ARM7 with MMU or MPU. */
  402. extern int arm_tune_wbuf;
  403. /* Nonzero if tuning for Cortex-A9. */
  404. extern int arm_tune_cortex_a9;
  405. /* Nonzero if we should define __THUMB_INTERWORK__ in the
  406. preprocessor.
  407. XXX This is a bit of a hack, it's intended to help work around
  408. problems in GLD which doesn't understand that armv5t code is
  409. interworking clean. */
  410. extern int arm_cpp_interwork;
  411. /* Nonzero if chip supports Thumb 1. */
  412. extern int arm_arch_thumb1;
  413. /* Nonzero if chip supports Thumb 2. */
  414. extern int arm_arch_thumb2;
  415. /* Nonzero if chip supports integer division instruction. */
  416. extern int arm_arch_arm_hwdiv;
  417. extern int arm_arch_thumb_hwdiv;
  418. /* Nonzero if chip disallows volatile memory access in IT block. */
  419. extern int arm_arch_no_volatile_ce;
  420. /* Structure defining the current overall architectural target and tuning. */
  421. struct arm_build_target
  422. {
  423. /* Name of the target CPU, if known, or NULL if the target CPU was not
  424. specified by the user (and inferred from the -march option). */
  425. const char *core_name;
  426. /* Name of the target ARCH. NULL if there is a selected CPU. */
  427. const char *arch_name;
  428. /* Preprocessor substring (never NULL). */
  429. const char *arch_pp_name;
  430. /* The base architecture value. */
  431. enum base_architecture base_arch;
  432. /* The profile letter for the architecture, upper case by convention. */
  433. char profile;
  434. /* Bitmap encapsulating the isa_bits for the target environment. */
  435. sbitmap isa;
  436. /* Flags used for tuning. Long term, these move into tune_params. */
  437. unsigned int tune_flags;
  438. /* Tables with more detailed tuning information. */
  439. const struct tune_params *tune;
  440. /* CPU identifier for the tuning target. */
  441. enum processor_type tune_core;
  442. };
  443. extern struct arm_build_target arm_active_target;
  444. /* Table entry for a CPU alias. */
  445. struct cpu_alias
  446. {
  447. /* The alias name. */
  448. const char *const name;
  449. /* True if the name should be displayed in help text listing cpu names. */
  450. bool visible;
  451. };
  452. /* Table entry for an architectural feature extension. */
  453. struct cpu_arch_extension
  454. {
  455. /* Feature name. */
  456. const char *const name;
  457. /* True if the option is negative (removes extensions). */
  458. bool remove;
  459. /* True if the option is an alias for another option with identical effect;
  460. the option will be ignored for canonicalization. */
  461. bool alias;
  462. /* The modifier bits. */
  463. const enum isa_feature isa_bits[isa_num_bits];
  464. };
  465. /* Common elements of both CPU and architectural options. */
  466. struct cpu_arch_option
  467. {
  468. /* Name for this option. */
  469. const char *name;
  470. /* List of feature extensions permitted. */
  471. const struct cpu_arch_extension *extensions;
  472. /* Standard feature bits. */
  473. enum isa_feature isa_bits[isa_num_bits];
  474. };
  475. /* Table entry for an architecture entry. */
  476. struct arch_option
  477. {
  478. /* Common option fields. */
  479. cpu_arch_option common;
  480. /* Short string for this architecture. */
  481. const char *arch;
  482. /* Base architecture, from which this specific architecture is derived. */
  483. enum base_architecture base_arch;
  484. /* The profile letter for the architecture, upper case by convention. */
  485. const char profile;
  486. /* Default tune target (in the absence of any more specific data). */
  487. enum processor_type tune_id;
  488. };
  489. /* Table entry for a CPU entry. */
  490. struct cpu_option
  491. {
  492. /* Common option fields. */
  493. cpu_arch_option common;
  494. /* List of aliases for this CPU. */
  495. const struct cpu_alias *aliases;
  496. /* Architecture upon which this CPU is based. */
  497. enum arch_type arch;
  498. };
  499. extern const arch_option all_architectures[];
  500. extern const cpu_option all_cores[];
  501. const cpu_option *arm_parse_cpu_option_name (const cpu_option *, const char *,
  502. const char *, bool = true);
  503. const arch_option *arm_parse_arch_option_name (const arch_option *,
  504. const char *, const char *, bool = true);
  505. void arm_parse_option_features (sbitmap, const cpu_arch_option *,
  506. const char *);
  507. void arm_initialize_isa (sbitmap, const enum isa_feature *);
  508. const char * arm_gen_far_branch (rtx *, int, const char * , const char *);
  509. bool arm_mve_immediate_check(rtx, machine_mode, bool);
  510. #endif /* ! GCC_ARM_PROTOS_H */