| 1 |
/* Definitions of target machine for GNU compiler, Synopsys DesignWare ARC cpu. |
| 2 |
Copyright (C) 2000-2025 Free Software Foundation, Inc. |
| 3 |
|
| 4 |
This file is part of GCC. |
| 5 |
|
| 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 |
|
| 11 |
GCC is distributed in the hope that it will be useful, |
| 12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
GNU General Public License for more details. |
| 15 |
|
| 16 |
You should have received a copy of the GNU General Public License |
| 17 |
along with GCC; see the file COPYING3. If not see |
| 18 |
<http://www.gnu.org/licenses/>. */ |
| 19 |
|
| 20 |
#ifdef RTX_CODE |
| 21 |
|
| 22 |
extern machine_mode arc_select_cc_mode (enum rtx_code, rtx, rtx); |
| 23 |
|
| 24 |
/* Define the function that build the compare insn for scc, bcc and mov*cc. */ |
| 25 |
extern struct rtx_def *gen_compare_reg (rtx, machine_mode); |
| 26 |
|
| 27 |
/* Declarations for various fns used in the .md file. */ |
| 28 |
extern const char *output_shift_loop (enum rtx_code, rtx *); |
| 29 |
extern void arc_split_ashl (rtx *); |
| 30 |
extern void arc_split_ashr (rtx *); |
| 31 |
extern void arc_split_lshr (rtx *); |
| 32 |
extern void arc_split_rotl (rtx *); |
| 33 |
extern void arc_split_rotr (rtx *); |
| 34 |
extern bool compact_sda_memory_operand (rtx, machine_mode, bool); |
| 35 |
extern bool arc_double_limm_p (rtx); |
| 36 |
extern void arc_print_operand (FILE *, rtx, int); |
| 37 |
extern void arc_print_operand_address (FILE *, rtx); |
| 38 |
extern void arc_final_prescan_insn (rtx_insn *, rtx *, int); |
| 39 |
extern const char *arc_output_libcall (const char *); |
| 40 |
extern int arc_output_commutative_cond_exec (rtx *operands, bool); |
| 41 |
extern bool arc_expand_cpymem (rtx *operands); |
| 42 |
extern bool prepare_move_operands (rtx *operands, machine_mode mode); |
| 43 |
extern bool arc_pre_reload_split (void); |
| 44 |
extern void arc_expand_atomic_op (enum rtx_code, rtx, rtx, rtx, rtx, rtx); |
| 45 |
extern void arc_split_compare_and_swap (rtx *); |
| 46 |
extern void arc_expand_compare_and_swap (rtx *); |
| 47 |
extern bool compact_memory_operand_p (rtx, machine_mode, bool, bool); |
| 48 |
extern bool arc_is_uncached_mem_p (rtx); |
| 49 |
extern bool gen_operands_ldd_std (rtx *operands, bool load, bool commute); |
| 50 |
extern bool arc_check_multi (rtx, bool); |
| 51 |
extern void arc_adjust_reg_alloc_order (void); |
| 52 |
extern bool arc_check_ior_const (HOST_WIDE_INT ); |
| 53 |
extern void arc_split_ior (rtx *); |
| 54 |
extern bool arc_check_mov_const (HOST_WIDE_INT ); |
| 55 |
extern bool arc_split_mov_const (rtx *); |
| 56 |
extern bool arc_can_use_return_insn (void); |
| 57 |
extern bool arc_split_move_p (rtx *); |
| 58 |
#endif /* RTX_CODE */ |
| 59 |
|
| 60 |
|
| 61 |
void arc_asm_output_aligned_decl_local (FILE *, tree, const char *, |
| 62 |
unsigned HOST_WIDE_INT, |
| 63 |
unsigned HOST_WIDE_INT, |
| 64 |
unsigned HOST_WIDE_INT); |
| 65 |
extern rtx arc_return_addr_rtx (int , rtx); |
| 66 |
extern bool check_if_valid_regno_const (rtx *, int); |
| 67 |
extern bool arc_legitimate_constant_p (machine_mode, rtx); |
| 68 |
extern bool arc_legitimate_pic_addr_p (rtx); |
| 69 |
extern bool arc_raw_symbolic_reference_mentioned_p (rtx, bool); |
| 70 |
extern bool arc_is_longcall_p (rtx); |
| 71 |
extern bool arc_is_shortcall_p (rtx); |
| 72 |
extern bool valid_brcc_with_delay_p (rtx *); |
| 73 |
extern rtx disi_highpart (rtx); |
| 74 |
extern int arc_adjust_insn_length (rtx_insn *, int, bool); |
| 75 |
extern int arc_corereg_hazard (rtx, rtx); |
| 76 |
extern int arc_hazard (rtx_insn *, rtx_insn *); |
| 77 |
extern int arc_write_ext_corereg (rtx); |
| 78 |
extern rtx gen_acc1 (void); |
| 79 |
extern rtx gen_acc2 (void); |
| 80 |
extern bool arc_branch_size_unknown_p (void); |
| 81 |
extern void arc_expand_prologue (void); |
| 82 |
extern void arc_expand_epilogue (int); |
| 83 |
extern void arc_init_expanders (void); |
| 84 |
extern int arc_check_millicode (rtx op, int offset, int load_p); |
| 85 |
extern void split_subsi (rtx *); |
| 86 |
extern void arc_split_move (rtx *); |
| 87 |
extern const char *arc_short_long (rtx_insn *insn, const char *, const char *); |
| 88 |
extern rtx arc_regno_use_in (unsigned int, rtx); |
| 89 |
extern int arc_label_align (rtx_insn *label); |
| 90 |
extern bool arc_text_label (rtx_insn *insn); |
| 91 |
|
| 92 |
extern bool arc_short_comparison_p (rtx, int); |
| 93 |
extern bool arc_epilogue_uses (int regno); |
| 94 |
extern bool arc_eh_uses (int regno); |
| 95 |
/* insn-attrtab.cc doesn't include reload.h, which declares regno_clobbered_p. */ |
| 96 |
extern int regno_clobbered_p (unsigned int, rtx_insn *, machine_mode, int); |
| 97 |
extern bool arc_legitimize_reload_address (rtx *, machine_mode, int, int); |
| 98 |
extern void arc_secondary_reload_conv (rtx, rtx, rtx, bool); |
| 99 |
extern void arc_cpu_cpp_builtins (cpp_reader *); |
| 100 |
extern bool arc_store_addr_hazard_p (rtx_insn *, rtx_insn *); |
| 101 |
extern void arc_eh_return_address_location (rtx); |
| 102 |
extern bool arc_is_jli_call_p (rtx); |
| 103 |
extern void arc_file_end (void); |
| 104 |
extern bool arc_is_secure_call_p (rtx); |
| 105 |
|
| 106 |
rtl_opt_pass * make_pass_arc_predicate_delay_insns (gcc::context *ctxt); |