2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
3 Contributed by Red Hat, Inc.
5 This file is part of GNU CC.
7 GNU CC 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 2, or (at your option)
12 GNU CC 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.
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 /* Define the information needed to generate branch and scc insns. This is
23 stored from the compare operation. Note that we can't use "rtx" here
24 since it hasn't been defined! */
26 /* Define global data defined in frv.c */
27 extern const char *frv_branch_cost_string
; /* -mbranch-cost option */
28 extern int frv_branch_cost_int
; /* value of -mbranch_cost */
30 extern const char *frv_cpu_string
; /* -mcpu= option */
32 extern const char *frv_condexec_insns_str
; /* -mcond-exec-insns= option */
33 extern int frv_condexec_insns
; /* value of -mcond-exec-insns */
35 extern const char *frv_condexec_temps_str
; /* -mcond-exec-temps= option */
36 extern int frv_condexec_temps
; /* value of -mcond-exec-temps */
38 extern const char *frv_sched_lookahead_str
; /* -msched-lookahead= option */
39 extern int frv_sched_lookahead
; /* value -msched-lookahead= */
41 /* CPU type. This must be identical to the cpu enumeration in frv.md. */
52 extern frv_cpu_t frv_cpu_type
; /* value of -mcpu= */
54 /* Define functions defined in frv.c */
55 extern void frv_expand_prologue
PARAMS ((void));
56 extern void frv_expand_epilogue
PARAMS ((int));
57 extern void frv_override_options
PARAMS ((void));
58 extern void frv_optimization_options
PARAMS ((int, int));
59 extern void frv_conditional_register_usage
PARAMS ((void));
60 extern frv_stack_t
*frv_stack_info
PARAMS ((void));
61 extern void frv_debug_stack
PARAMS ((frv_stack_t
*));
62 extern int frv_frame_pointer_required
PARAMS ((void));
63 extern int frv_initial_elimination_offset
PARAMS ((int, int));
66 extern int frv_legitimate_address_p
PARAMS ((enum machine_mode
, rtx
,
68 extern rtx frv_legitimize_address
PARAMS ((rtx
, rtx
,
72 extern void frv_init_cumulative_args
PARAMS ((CUMULATIVE_ARGS
*, tree
,
75 extern int frv_function_arg_boundary
PARAMS ((enum machine_mode
, tree
));
76 extern rtx frv_function_arg
PARAMS ((CUMULATIVE_ARGS
*,
80 extern void frv_function_arg_advance
PARAMS ((CUMULATIVE_ARGS
*,
84 extern int frv_function_arg_partial_nregs
PARAMS ((CUMULATIVE_ARGS
*,
88 extern int frv_function_arg_pass_by_reference
PARAMS ((CUMULATIVE_ARGS
*,
92 extern int frv_function_arg_callee_copies
PARAMS ((CUMULATIVE_ARGS
*,
96 extern int frv_function_arg_keep_as_reference
PARAMS ((CUMULATIVE_ARGS
*,
100 extern rtx frv_expand_builtin_saveregs
PARAMS ((void));
101 extern void frv_setup_incoming_varargs
PARAMS ((CUMULATIVE_ARGS
*,
105 extern void frv_expand_builtin_va_start
PARAMS ((tree
, rtx
));
106 extern rtx frv_expand_builtin_va_arg
PARAMS ((tree
, tree
));
107 #endif /* TREE_CODE */
109 extern int frv_expand_block_move
PARAMS ((rtx
*));
110 extern int frv_expand_block_clear
PARAMS ((rtx
*));
111 extern rtx frv_dynamic_chain_address
PARAMS ((rtx
));
112 extern rtx frv_return_addr_rtx
PARAMS ((int, rtx
));
113 extern rtx frv_index_memory
PARAMS ((rtx
,
118 extern void frv_asm_output_mi_thunk
PARAMS ((FILE *, tree
, long,
120 #endif /* TREE_CODE */
122 extern const char *frv_asm_output_opcode
123 PARAMS ((FILE *, const char *));
124 extern void frv_final_prescan_insn
PARAMS ((rtx
, rtx
*, int));
125 extern void frv_print_operand
PARAMS ((FILE *, rtx
, int));
126 extern void frv_print_operand_address
PARAMS ((FILE *, rtx
));
127 extern int frv_emit_movsi
PARAMS ((rtx
, rtx
));
128 extern const char *output_move_single
PARAMS ((rtx
*, rtx
));
129 extern const char *output_move_double
PARAMS ((rtx
*, rtx
));
130 extern const char *output_condmove_single
131 PARAMS ((rtx
*, rtx
));
132 extern int frv_emit_cond_branch
PARAMS ((enum rtx_code
, rtx
));
133 extern int frv_emit_scc
PARAMS ((enum rtx_code
, rtx
));
134 extern rtx frv_split_scc
PARAMS ((rtx
, rtx
, rtx
, rtx
,
136 extern int frv_emit_cond_move
PARAMS ((rtx
, rtx
, rtx
, rtx
));
137 extern rtx frv_split_cond_move
PARAMS ((rtx
*));
138 extern rtx frv_split_minmax
PARAMS ((rtx
*));
139 extern rtx frv_split_abs
PARAMS ((rtx
*));
140 extern void frv_split_double_load
PARAMS ((rtx
, rtx
));
141 extern void frv_split_double_store
PARAMS ((rtx
, rtx
));
143 extern void frv_ifcvt_init_extra_fields
PARAMS ((ce_if_block_t
*));
144 extern void frv_ifcvt_modify_tests
PARAMS ((ce_if_block_t
*,
146 extern void frv_ifcvt_modify_multiple_tests
147 PARAMS ((ce_if_block_t
*,
150 extern rtx frv_ifcvt_modify_insn
PARAMS ((ce_if_block_t
*,
152 extern void frv_ifcvt_modify_final
PARAMS ((ce_if_block_t
*));
153 extern void frv_ifcvt_modify_cancel
PARAMS ((ce_if_block_t
*));
155 extern int frv_trampoline_size
PARAMS ((void));
156 extern void frv_initialize_trampoline
PARAMS ((rtx
, rtx
, rtx
));
157 extern enum reg_class frv_secondary_reload_class
158 PARAMS ((enum reg_class
class,
159 enum machine_mode mode
,
161 extern int frv_class_likely_spilled_p
PARAMS ((enum reg_class
class));
162 extern int frv_hard_regno_mode_ok
PARAMS ((int, enum machine_mode
));
163 extern int frv_hard_regno_nregs
PARAMS ((int, enum machine_mode
));
164 extern int frv_class_max_nregs
PARAMS ((enum reg_class
class,
165 enum machine_mode mode
));
166 extern int frv_legitimate_constant_p
PARAMS ((rtx
));
167 #endif /* RTX_CODE */
169 extern int direct_return_p
PARAMS ((void));
170 extern int frv_register_move_cost
PARAMS ((enum reg_class
, enum reg_class
));
173 extern int frv_adjust_field_align
PARAMS ((tree
, int));
176 extern void fixup_section
PARAMS ((void));
177 extern void sdata_section
PARAMS ((void));
178 extern void sbss_section
PARAMS ((void));
179 extern void const_section
PARAMS ((void));
180 extern void data_section
PARAMS ((void));
183 extern int integer_register_operand
PARAMS ((rtx
, enum machine_mode
));
184 extern int frv_load_operand
PARAMS ((rtx
, enum machine_mode
));
185 extern int gpr_or_fpr_operand
PARAMS ((rtx
, enum machine_mode
));
186 extern int gpr_no_subreg_operand
PARAMS ((rtx
, enum machine_mode
));
187 extern int gpr_or_int6_operand
PARAMS ((rtx
, enum machine_mode
));
188 extern int fpr_or_int6_operand
PARAMS ((rtx
, enum machine_mode
));
189 extern int gpr_or_int_operand
PARAMS ((rtx
, enum machine_mode
));
190 extern int gpr_or_int12_operand
PARAMS ((rtx
, enum machine_mode
));
191 extern int gpr_fpr_or_int12_operand
PARAMS ((rtx
, enum machine_mode
));
192 extern int gpr_or_int10_operand
PARAMS ((rtx
, enum machine_mode
));
193 extern int move_source_operand
PARAMS ((rtx
, enum machine_mode
));
194 extern int move_destination_operand
PARAMS ((rtx
, enum machine_mode
));
195 extern int condexec_source_operand
PARAMS ((rtx
, enum machine_mode
));
196 extern int condexec_dest_operand
PARAMS ((rtx
, enum machine_mode
));
197 extern int lr_operand
PARAMS ((rtx
, enum machine_mode
));
198 extern int gpr_or_memory_operand
PARAMS ((rtx
, enum machine_mode
));
199 extern int fpr_or_memory_operand
PARAMS ((rtx
, enum machine_mode
));
200 extern int reg_or_0_operand
PARAMS ((rtx
, enum machine_mode
));
201 extern int fcc_operand
PARAMS ((rtx
, enum machine_mode
));
202 extern int icc_operand
PARAMS ((rtx
, enum machine_mode
));
203 extern int cc_operand
PARAMS ((rtx
, enum machine_mode
));
204 extern int fcr_operand
PARAMS ((rtx
, enum machine_mode
));
205 extern int icr_operand
PARAMS ((rtx
, enum machine_mode
));
206 extern int cr_operand
PARAMS ((rtx
, enum machine_mode
));
207 extern int call_operand
PARAMS ((rtx
, enum machine_mode
));
208 extern int fpr_operand
PARAMS ((rtx
, enum machine_mode
));
209 extern int even_reg_operand
PARAMS ((rtx
, enum machine_mode
));
210 extern int odd_reg_operand
PARAMS ((rtx
, enum machine_mode
));
211 extern int even_gpr_operand
PARAMS ((rtx
, enum machine_mode
));
212 extern int odd_gpr_operand
PARAMS ((rtx
, enum machine_mode
));
213 extern int quad_fpr_operand
PARAMS ((rtx
, enum machine_mode
));
214 extern int even_fpr_operand
PARAMS ((rtx
, enum machine_mode
));
215 extern int odd_fpr_operand
PARAMS ((rtx
, enum machine_mode
));
216 extern int dbl_memory_one_insn_operand
PARAMS ((rtx
, enum machine_mode
));
217 extern int dbl_memory_two_insn_operand
PARAMS ((rtx
, enum machine_mode
));
218 extern int int12_operand
PARAMS ((rtx
, enum machine_mode
));
219 extern int int6_operand
PARAMS ((rtx
, enum machine_mode
));
220 extern int int5_operand
PARAMS ((rtx
, enum machine_mode
));
221 extern int uint5_operand
PARAMS ((rtx
, enum machine_mode
));
222 extern int uint4_operand
PARAMS ((rtx
, enum machine_mode
));
223 extern int uint1_operand
PARAMS ((rtx
, enum machine_mode
));
224 extern int int_2word_operand
PARAMS ((rtx
, enum machine_mode
));
225 extern int pic_register_operand
PARAMS ((rtx
, enum machine_mode
));
226 extern int pic_symbolic_operand
PARAMS ((rtx
, enum machine_mode
));
227 extern int small_data_register_operand
PARAMS ((rtx
, enum machine_mode
));
228 extern int small_data_symbolic_operand
PARAMS ((rtx
, enum machine_mode
));
229 extern int upper_int16_operand
PARAMS ((rtx
, enum machine_mode
));
230 extern int uint16_operand
PARAMS ((rtx
, enum machine_mode
));
231 extern int relational_operator
PARAMS ((rtx
, enum machine_mode
));
232 extern int signed_relational_operator
PARAMS ((rtx
, enum machine_mode
));
233 extern int unsigned_relational_operator
PARAMS ((rtx
, enum machine_mode
));
234 extern int float_relational_operator
PARAMS ((rtx
, enum machine_mode
));
235 extern int ccr_eqne_operator
PARAMS ((rtx
, enum machine_mode
));
236 extern int minmax_operator
PARAMS ((rtx
, enum machine_mode
));
237 extern int condexec_si_binary_operator
PARAMS ((rtx
, enum machine_mode
));
238 extern int condexec_si_media_operator
PARAMS ((rtx
, enum machine_mode
));
239 extern int condexec_si_divide_operator
PARAMS ((rtx
, enum machine_mode
));
240 extern int condexec_si_unary_operator
PARAMS ((rtx
, enum machine_mode
));
241 extern int condexec_sf_conv_operator
PARAMS ((rtx
, enum machine_mode
));
242 extern int condexec_sf_add_operator
PARAMS ((rtx
, enum machine_mode
));
243 extern int condexec_memory_operand
PARAMS ((rtx
, enum machine_mode
));
244 extern int intop_compare_operator
PARAMS ((rtx
, enum machine_mode
));
245 extern int condexec_intop_cmp_operator
PARAMS ((rtx
, enum machine_mode
));
246 extern int acc_operand
PARAMS ((rtx
, enum machine_mode
));
247 extern int even_acc_operand
PARAMS ((rtx
, enum machine_mode
));
248 extern int quad_acc_operand
PARAMS ((rtx
, enum machine_mode
));
249 extern int accg_operand
PARAMS ((rtx
, enum machine_mode
));
250 extern rtx frv_matching_accg_for_acc
PARAMS ((rtx
));
251 extern void frv_machine_dependent_reorg
PARAMS ((rtx
));