| 1 |
/* Frv prototypes. |
| 2 |
Copyright (C) 1999-2025 Free Software Foundation, Inc. |
| 3 |
Contributed by Red Hat, Inc. |
| 4 |
|
| 5 |
This file is part of GCC. |
| 6 |
|
| 7 |
GCC is free software; you can redistribute it and/or modify |
| 8 |
it under the terms of the GNU General Public License as published by |
| 9 |
the Free Software Foundation; either version 3, or (at your option) |
| 10 |
any later version. |
| 11 |
|
| 12 |
GCC is distributed in the hope that it will be useful, |
| 13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
GNU General Public License for more details. |
| 16 |
|
| 17 |
You should have received a copy of the GNU General Public License |
| 18 |
along with GCC; see the file COPYING3. If not see |
| 19 |
<http://www.gnu.org/licenses/>. */ |
| 20 |
|
| 21 |
/* Define functions defined in frv.cc */ |
| 22 |
extern void frv_expand_prologue (void); |
| 23 |
extern void frv_expand_epilogue (bool); |
| 24 |
extern frv_stack_t *frv_stack_info (void); |
| 25 |
extern void frv_debug_stack (frv_stack_t *); |
| 26 |
extern int frv_initial_elimination_offset (int, int); |
| 27 |
extern void frv_ifcvt_machdep_init (void *); |
| 28 |
|
| 29 |
#ifdef RTX_CODE |
| 30 |
extern int frv_legitimate_address_p_1 (machine_mode, rtx, |
| 31 |
int, int, int); |
| 32 |
extern rtx frv_find_base_term (rtx); |
| 33 |
|
| 34 |
#ifdef TREE_CODE |
| 35 |
extern void frv_init_cumulative_args (CUMULATIVE_ARGS *, tree, |
| 36 |
rtx, tree, int); |
| 37 |
|
| 38 |
extern bool frv_function_value_regno_p (const unsigned int); |
| 39 |
#endif /* TREE_CODE */ |
| 40 |
|
| 41 |
extern int frv_expand_block_move (rtx *); |
| 42 |
extern int frv_expand_block_clear (rtx *); |
| 43 |
extern rtx frv_dynamic_chain_address (rtx); |
| 44 |
extern rtx frv_return_addr_rtx (int, rtx); |
| 45 |
extern rtx frv_index_memory (rtx, machine_mode, int); |
| 46 |
extern const char *frv_asm_output_opcode |
| 47 |
(FILE *, const char *); |
| 48 |
extern void frv_final_prescan_insn (rtx_insn *, rtx *, int); |
| 49 |
extern void frv_emit_move (machine_mode, rtx, rtx); |
| 50 |
extern int frv_emit_movsi (rtx, rtx); |
| 51 |
extern const char *output_move_single (rtx *, rtx); |
| 52 |
extern const char *output_move_double (rtx *, rtx); |
| 53 |
extern const char *output_condmove_single |
| 54 |
(rtx *, rtx); |
| 55 |
extern int frv_emit_cond_branch (rtx *); |
| 56 |
extern int frv_emit_scc (rtx *); |
| 57 |
extern rtx frv_split_scc (rtx, rtx, rtx, rtx, HOST_WIDE_INT); |
| 58 |
extern int frv_emit_cond_move (rtx, rtx, rtx, rtx); |
| 59 |
extern rtx frv_split_cond_move (rtx *); |
| 60 |
extern rtx frv_split_minmax (rtx *); |
| 61 |
extern rtx frv_split_abs (rtx *); |
| 62 |
extern void frv_split_double_load (rtx, rtx); |
| 63 |
extern void frv_split_double_store (rtx, rtx); |
| 64 |
#ifdef BB_HEAD |
| 65 |
extern void frv_ifcvt_init_extra_fields (struct ce_if_block *); |
| 66 |
extern void frv_ifcvt_modify_tests (struct ce_if_block *, rtx *, rtx *); |
| 67 |
extern void frv_ifcvt_modify_multiple_tests |
| 68 |
(struct ce_if_block *, basic_block, |
| 69 |
rtx *, rtx *); |
| 70 |
extern rtx frv_ifcvt_modify_insn (struct ce_if_block *, rtx, rtx_insn *); |
| 71 |
extern void frv_ifcvt_modify_final (struct ce_if_block *); |
| 72 |
extern void frv_ifcvt_modify_cancel (struct ce_if_block *); |
| 73 |
#endif |
| 74 |
extern enum reg_class frv_secondary_reload_class |
| 75 |
(enum reg_class, |
| 76 |
machine_mode, rtx); |
| 77 |
extern int frv_class_max_nregs (enum reg_class rclass, |
| 78 |
machine_mode mode); |
| 79 |
extern machine_mode frv_select_cc_mode (enum rtx_code, rtx, rtx); |
| 80 |
#endif /* RTX_CODE */ |
| 81 |
|
| 82 |
extern int frv_trampoline_size (void); |
| 83 |
extern int direct_return_p (void); |
| 84 |
extern int frv_issue_rate (void); |
| 85 |
extern int frv_acc_group (rtx); |
| 86 |
|
| 87 |
#ifdef TREE_CODE |
| 88 |
extern int frv_adjust_field_align (tree, int); |
| 89 |
#endif |
| 90 |
|
| 91 |
#ifdef RTX_CODE |
| 92 |
extern bool integer_register_operand (rtx, machine_mode); |
| 93 |
extern bool frv_load_operand (rtx, machine_mode); |
| 94 |
extern bool gpr_or_fpr_operand (rtx, machine_mode); |
| 95 |
extern bool gpr_no_subreg_operand (rtx, machine_mode); |
| 96 |
extern int gpr_or_int6_operand (rtx, machine_mode); |
| 97 |
extern bool fpr_or_int6_operand (rtx, machine_mode); |
| 98 |
extern bool gpr_or_int_operand (rtx, machine_mode); |
| 99 |
extern bool gpr_or_int12_operand (rtx, machine_mode); |
| 100 |
extern bool gpr_fpr_or_int12_operand (rtx, machine_mode); |
| 101 |
extern bool gpr_or_int10_operand (rtx, machine_mode); |
| 102 |
extern bool move_source_operand (rtx, machine_mode); |
| 103 |
extern bool move_destination_operand (rtx, machine_mode); |
| 104 |
extern bool condexec_source_operand (rtx, machine_mode); |
| 105 |
extern bool condexec_dest_operand (rtx, machine_mode); |
| 106 |
extern bool lr_operand (rtx, machine_mode); |
| 107 |
extern bool gpr_or_memory_operand (rtx, machine_mode); |
| 108 |
extern bool fpr_or_memory_operand (rtx, machine_mode); |
| 109 |
extern bool reg_or_0_operand (rtx, machine_mode); |
| 110 |
extern bool fcc_operand (rtx, machine_mode); |
| 111 |
extern bool icc_operand (rtx, machine_mode); |
| 112 |
extern bool cc_operand (rtx, machine_mode); |
| 113 |
extern bool fcr_operand (rtx, machine_mode); |
| 114 |
extern bool icr_operand (rtx, machine_mode); |
| 115 |
extern bool cr_operand (rtx, machine_mode); |
| 116 |
extern bool call_operand (rtx, machine_mode); |
| 117 |
extern bool fpr_operand (rtx, machine_mode); |
| 118 |
extern bool even_reg_operand (rtx, machine_mode); |
| 119 |
extern bool odd_reg_operand (rtx, machine_mode); |
| 120 |
extern bool even_gpr_operand (rtx, machine_mode); |
| 121 |
extern bool odd_gpr_operand (rtx, machine_mode); |
| 122 |
extern bool quad_fpr_operand (rtx, machine_mode); |
| 123 |
extern bool even_fpr_operand (rtx, machine_mode); |
| 124 |
extern bool odd_fpr_operand (rtx, machine_mode); |
| 125 |
extern bool dbl_memory_one_insn_operand (rtx, machine_mode); |
| 126 |
extern bool dbl_memory_two_insn_operand (rtx, machine_mode); |
| 127 |
extern bool int12_operand (rtx, machine_mode); |
| 128 |
extern bool int6_operand (rtx, machine_mode); |
| 129 |
extern bool int5_operand (rtx, machine_mode); |
| 130 |
extern bool uint5_operand (rtx, machine_mode); |
| 131 |
extern bool uint4_operand (rtx, machine_mode); |
| 132 |
extern bool uint1_operand (rtx, machine_mode); |
| 133 |
extern bool int_2word_operand (rtx, machine_mode); |
| 134 |
extern int pic_register_operand (rtx, machine_mode); |
| 135 |
extern int pic_symbolic_operand (rtx, machine_mode); |
| 136 |
extern int small_data_register_operand (rtx, machine_mode); |
| 137 |
extern int small_data_symbolic_operand (rtx, machine_mode); |
| 138 |
extern bool upper_int16_operand (rtx, machine_mode); |
| 139 |
extern bool uint16_operand (rtx, machine_mode); |
| 140 |
extern bool symbolic_operand (rtx, machine_mode); |
| 141 |
extern bool relational_operator (rtx, machine_mode); |
| 142 |
extern int signed_relational_operator (rtx, machine_mode); |
| 143 |
extern int unsigned_relational_operator (rtx, machine_mode); |
| 144 |
extern bool float_relational_operator (rtx, machine_mode); |
| 145 |
extern bool ccr_eqne_operator (rtx, machine_mode); |
| 146 |
extern bool minmax_operator (rtx, machine_mode); |
| 147 |
extern bool condexec_si_binary_operator (rtx, machine_mode); |
| 148 |
extern bool condexec_si_media_operator (rtx, machine_mode); |
| 149 |
extern bool condexec_si_divide_operator (rtx, machine_mode); |
| 150 |
extern bool condexec_si_unary_operator (rtx, machine_mode); |
| 151 |
extern bool condexec_sf_conv_operator (rtx, machine_mode); |
| 152 |
extern bool condexec_sf_add_operator (rtx, machine_mode); |
| 153 |
extern int condexec_memory_operand (rtx, machine_mode); |
| 154 |
extern bool intop_compare_operator (rtx, machine_mode); |
| 155 |
extern bool acc_operand (rtx, machine_mode); |
| 156 |
extern bool even_acc_operand (rtx, machine_mode); |
| 157 |
extern bool quad_acc_operand (rtx, machine_mode); |
| 158 |
extern bool accg_operand (rtx, machine_mode); |
| 159 |
extern rtx frv_matching_accg_for_acc (rtx); |
| 160 |
extern void frv_expand_fdpic_call (rtx *, bool, bool); |
| 161 |
extern rtx frv_gen_GPsym2reg (rtx, rtx); |
| 162 |
extern int frv_legitimate_memory_operand (rtx, machine_mode, int); |
| 163 |
|
| 164 |
/* Information about a relocation unspec. SYMBOL is the relocation symbol |
| 165 |
(a SYMBOL_REF or LABEL_REF), RELOC is the type of relocation and OFFSET |
| 166 |
is the constant addend. */ |
| 167 |
struct frv_unspec { |
| 168 |
rtx symbol; |
| 169 |
int reloc; |
| 170 |
HOST_WIDE_INT offset; |
| 171 |
}; |
| 172 |
|
| 173 |
extern bool frv_const_unspec_p (rtx, struct frv_unspec *); |
| 174 |
|
| 175 |
#endif |
| 176 |
|