1 |
38 |
julius |
/* Frv prototypes.
|
2 |
|
|
Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2007 Free Software Foundation,
|
3 |
|
|
Inc.
|
4 |
|
|
Contributed by Red Hat, Inc.
|
5 |
|
|
|
6 |
|
|
This file is part of GCC.
|
7 |
|
|
|
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
|
10 |
|
|
the Free Software Foundation; either version 3, or (at your option)
|
11 |
|
|
any later version.
|
12 |
|
|
|
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.
|
17 |
|
|
|
18 |
|
|
You should have received a copy of the GNU General Public License
|
19 |
|
|
along with GCC; see the file COPYING3. If not see
|
20 |
|
|
<http://www.gnu.org/licenses/>. */
|
21 |
|
|
|
22 |
|
|
/* CPU type. This must be identical to the cpu enumeration in frv.md. */
|
23 |
|
|
typedef enum frv_cpu
|
24 |
|
|
{
|
25 |
|
|
FRV_CPU_GENERIC,
|
26 |
|
|
FRV_CPU_FR550,
|
27 |
|
|
FRV_CPU_FR500,
|
28 |
|
|
FRV_CPU_FR450,
|
29 |
|
|
FRV_CPU_FR405,
|
30 |
|
|
FRV_CPU_FR400,
|
31 |
|
|
FRV_CPU_FR300,
|
32 |
|
|
FRV_CPU_SIMPLE,
|
33 |
|
|
FRV_CPU_TOMCAT
|
34 |
|
|
} frv_cpu_t;
|
35 |
|
|
|
36 |
|
|
extern frv_cpu_t frv_cpu_type; /* value of -mcpu= */
|
37 |
|
|
|
38 |
|
|
/* Define functions defined in frv.c */
|
39 |
|
|
extern void frv_expand_prologue (void);
|
40 |
|
|
extern void frv_expand_epilogue (bool);
|
41 |
|
|
extern void frv_override_options (void);
|
42 |
|
|
extern void frv_optimization_options (int, int);
|
43 |
|
|
extern void frv_conditional_register_usage (void);
|
44 |
|
|
extern frv_stack_t *frv_stack_info (void);
|
45 |
|
|
extern void frv_debug_stack (frv_stack_t *);
|
46 |
|
|
extern int frv_frame_pointer_required (void);
|
47 |
|
|
extern int frv_initial_elimination_offset (int, int);
|
48 |
|
|
|
49 |
|
|
#ifdef RTX_CODE
|
50 |
|
|
extern int frv_legitimate_address_p (enum machine_mode, rtx,
|
51 |
|
|
int, int, int);
|
52 |
|
|
extern rtx frv_legitimize_address (rtx, rtx, enum machine_mode);
|
53 |
|
|
extern rtx frv_find_base_term (rtx);
|
54 |
|
|
|
55 |
|
|
#ifdef TREE_CODE
|
56 |
|
|
extern void frv_init_cumulative_args (CUMULATIVE_ARGS *, tree,
|
57 |
|
|
rtx, tree, int);
|
58 |
|
|
|
59 |
|
|
extern int frv_function_arg_boundary (enum machine_mode, tree);
|
60 |
|
|
extern rtx frv_function_arg (CUMULATIVE_ARGS *,
|
61 |
|
|
enum machine_mode,
|
62 |
|
|
tree, int, int);
|
63 |
|
|
|
64 |
|
|
extern void frv_function_arg_advance (CUMULATIVE_ARGS *,
|
65 |
|
|
enum machine_mode,
|
66 |
|
|
tree, int);
|
67 |
|
|
|
68 |
|
|
extern void frv_expand_builtin_va_start (tree, rtx);
|
69 |
|
|
#endif /* TREE_CODE */
|
70 |
|
|
|
71 |
|
|
extern int frv_expand_block_move (rtx *);
|
72 |
|
|
extern int frv_expand_block_clear (rtx *);
|
73 |
|
|
extern rtx frv_dynamic_chain_address (rtx);
|
74 |
|
|
extern rtx frv_return_addr_rtx (int, rtx);
|
75 |
|
|
extern rtx frv_index_memory (rtx, enum machine_mode, int);
|
76 |
|
|
extern const char *frv_asm_output_opcode
|
77 |
|
|
(FILE *, const char *);
|
78 |
|
|
extern void frv_final_prescan_insn (rtx, rtx *, int);
|
79 |
|
|
extern void frv_print_operand (FILE *, rtx, int);
|
80 |
|
|
extern void frv_print_operand_address (FILE *, rtx);
|
81 |
|
|
extern void frv_emit_move (enum machine_mode, rtx, rtx);
|
82 |
|
|
extern int frv_emit_movsi (rtx, rtx);
|
83 |
|
|
extern const char *output_move_single (rtx *, rtx);
|
84 |
|
|
extern const char *output_move_double (rtx *, rtx);
|
85 |
|
|
extern const char *output_condmove_single
|
86 |
|
|
(rtx *, rtx);
|
87 |
|
|
extern int frv_emit_cond_branch (enum rtx_code, rtx);
|
88 |
|
|
extern int frv_emit_scc (enum rtx_code, rtx);
|
89 |
|
|
extern rtx frv_split_scc (rtx, rtx, rtx, rtx, HOST_WIDE_INT);
|
90 |
|
|
extern int frv_emit_cond_move (rtx, rtx, rtx, rtx);
|
91 |
|
|
extern rtx frv_split_cond_move (rtx *);
|
92 |
|
|
extern rtx frv_split_minmax (rtx *);
|
93 |
|
|
extern rtx frv_split_abs (rtx *);
|
94 |
|
|
extern void frv_split_double_load (rtx, rtx);
|
95 |
|
|
extern void frv_split_double_store (rtx, rtx);
|
96 |
|
|
#ifdef BB_HEAD
|
97 |
|
|
extern void frv_ifcvt_init_extra_fields (ce_if_block_t *);
|
98 |
|
|
extern void frv_ifcvt_modify_tests (ce_if_block_t *, rtx *, rtx *);
|
99 |
|
|
extern void frv_ifcvt_modify_multiple_tests
|
100 |
|
|
(ce_if_block_t *, basic_block,
|
101 |
|
|
rtx *, rtx *);
|
102 |
|
|
extern rtx frv_ifcvt_modify_insn (ce_if_block_t *, rtx, rtx);
|
103 |
|
|
extern void frv_ifcvt_modify_final (ce_if_block_t *);
|
104 |
|
|
extern void frv_ifcvt_modify_cancel (ce_if_block_t *);
|
105 |
|
|
#endif
|
106 |
|
|
extern int frv_trampoline_size (void);
|
107 |
|
|
extern void frv_initialize_trampoline (rtx, rtx, rtx);
|
108 |
|
|
extern enum reg_class frv_secondary_reload_class
|
109 |
|
|
(enum reg_class class,
|
110 |
|
|
enum machine_mode mode,
|
111 |
|
|
rtx x, int);
|
112 |
|
|
extern int frv_class_likely_spilled_p (enum reg_class class);
|
113 |
|
|
extern int frv_hard_regno_mode_ok (int, enum machine_mode);
|
114 |
|
|
extern int frv_hard_regno_nregs (int, enum machine_mode);
|
115 |
|
|
extern int frv_class_max_nregs (enum reg_class class,
|
116 |
|
|
enum machine_mode mode);
|
117 |
|
|
extern int frv_legitimate_constant_p (rtx);
|
118 |
|
|
extern enum machine_mode frv_select_cc_mode (enum rtx_code, rtx, rtx);
|
119 |
|
|
#endif /* RTX_CODE */
|
120 |
|
|
|
121 |
|
|
extern int direct_return_p (void);
|
122 |
|
|
extern int frv_register_move_cost (enum reg_class, enum reg_class);
|
123 |
|
|
extern int frv_issue_rate (void);
|
124 |
|
|
extern int frv_acc_group (rtx);
|
125 |
|
|
|
126 |
|
|
#ifdef TREE_CODE
|
127 |
|
|
extern int frv_adjust_field_align (tree, int);
|
128 |
|
|
#endif
|
129 |
|
|
|
130 |
|
|
#ifdef RTX_CODE
|
131 |
|
|
extern int integer_register_operand (rtx, enum machine_mode);
|
132 |
|
|
extern int frv_load_operand (rtx, enum machine_mode);
|
133 |
|
|
extern int gpr_or_fpr_operand (rtx, enum machine_mode);
|
134 |
|
|
extern int gpr_no_subreg_operand (rtx, enum machine_mode);
|
135 |
|
|
extern int gpr_or_int6_operand (rtx, enum machine_mode);
|
136 |
|
|
extern int fpr_or_int6_operand (rtx, enum machine_mode);
|
137 |
|
|
extern int gpr_or_int_operand (rtx, enum machine_mode);
|
138 |
|
|
extern int gpr_or_int12_operand (rtx, enum machine_mode);
|
139 |
|
|
extern int gpr_fpr_or_int12_operand (rtx, enum machine_mode);
|
140 |
|
|
extern int gpr_or_int10_operand (rtx, enum machine_mode);
|
141 |
|
|
extern int move_source_operand (rtx, enum machine_mode);
|
142 |
|
|
extern int move_destination_operand (rtx, enum machine_mode);
|
143 |
|
|
extern int condexec_source_operand (rtx, enum machine_mode);
|
144 |
|
|
extern int condexec_dest_operand (rtx, enum machine_mode);
|
145 |
|
|
extern int lr_operand (rtx, enum machine_mode);
|
146 |
|
|
extern int gpr_or_memory_operand (rtx, enum machine_mode);
|
147 |
|
|
extern int fpr_or_memory_operand (rtx, enum machine_mode);
|
148 |
|
|
extern int reg_or_0_operand (rtx, enum machine_mode);
|
149 |
|
|
extern int fcc_operand (rtx, enum machine_mode);
|
150 |
|
|
extern int icc_operand (rtx, enum machine_mode);
|
151 |
|
|
extern int cc_operand (rtx, enum machine_mode);
|
152 |
|
|
extern int fcr_operand (rtx, enum machine_mode);
|
153 |
|
|
extern int icr_operand (rtx, enum machine_mode);
|
154 |
|
|
extern int cr_operand (rtx, enum machine_mode);
|
155 |
|
|
extern int call_operand (rtx, enum machine_mode);
|
156 |
|
|
extern int fpr_operand (rtx, enum machine_mode);
|
157 |
|
|
extern int even_reg_operand (rtx, enum machine_mode);
|
158 |
|
|
extern int odd_reg_operand (rtx, enum machine_mode);
|
159 |
|
|
extern int even_gpr_operand (rtx, enum machine_mode);
|
160 |
|
|
extern int odd_gpr_operand (rtx, enum machine_mode);
|
161 |
|
|
extern int quad_fpr_operand (rtx, enum machine_mode);
|
162 |
|
|
extern int even_fpr_operand (rtx, enum machine_mode);
|
163 |
|
|
extern int odd_fpr_operand (rtx, enum machine_mode);
|
164 |
|
|
extern int dbl_memory_one_insn_operand (rtx, enum machine_mode);
|
165 |
|
|
extern int dbl_memory_two_insn_operand (rtx, enum machine_mode);
|
166 |
|
|
extern int int12_operand (rtx, enum machine_mode);
|
167 |
|
|
extern int int6_operand (rtx, enum machine_mode);
|
168 |
|
|
extern int int5_operand (rtx, enum machine_mode);
|
169 |
|
|
extern int uint5_operand (rtx, enum machine_mode);
|
170 |
|
|
extern int uint4_operand (rtx, enum machine_mode);
|
171 |
|
|
extern int uint1_operand (rtx, enum machine_mode);
|
172 |
|
|
extern int int_2word_operand (rtx, enum machine_mode);
|
173 |
|
|
extern int pic_register_operand (rtx, enum machine_mode);
|
174 |
|
|
extern int pic_symbolic_operand (rtx, enum machine_mode);
|
175 |
|
|
extern int small_data_register_operand (rtx, enum machine_mode);
|
176 |
|
|
extern int small_data_symbolic_operand (rtx, enum machine_mode);
|
177 |
|
|
extern int upper_int16_operand (rtx, enum machine_mode);
|
178 |
|
|
extern int uint16_operand (rtx, enum machine_mode);
|
179 |
|
|
extern int symbolic_operand (rtx, enum machine_mode);
|
180 |
|
|
extern int relational_operator (rtx, enum machine_mode);
|
181 |
|
|
extern int signed_relational_operator (rtx, enum machine_mode);
|
182 |
|
|
extern int unsigned_relational_operator (rtx, enum machine_mode);
|
183 |
|
|
extern int float_relational_operator (rtx, enum machine_mode);
|
184 |
|
|
extern int ccr_eqne_operator (rtx, enum machine_mode);
|
185 |
|
|
extern int minmax_operator (rtx, enum machine_mode);
|
186 |
|
|
extern int condexec_si_binary_operator (rtx, enum machine_mode);
|
187 |
|
|
extern int condexec_si_media_operator (rtx, enum machine_mode);
|
188 |
|
|
extern int condexec_si_divide_operator (rtx, enum machine_mode);
|
189 |
|
|
extern int condexec_si_unary_operator (rtx, enum machine_mode);
|
190 |
|
|
extern int condexec_sf_conv_operator (rtx, enum machine_mode);
|
191 |
|
|
extern int condexec_sf_add_operator (rtx, enum machine_mode);
|
192 |
|
|
extern int condexec_memory_operand (rtx, enum machine_mode);
|
193 |
|
|
extern int intop_compare_operator (rtx, enum machine_mode);
|
194 |
|
|
extern int acc_operand (rtx, enum machine_mode);
|
195 |
|
|
extern int even_acc_operand (rtx, enum machine_mode);
|
196 |
|
|
extern int quad_acc_operand (rtx, enum machine_mode);
|
197 |
|
|
extern int accg_operand (rtx, enum machine_mode);
|
198 |
|
|
extern rtx frv_matching_accg_for_acc (rtx);
|
199 |
|
|
extern void frv_expand_fdpic_call (rtx *, bool, bool);
|
200 |
|
|
extern rtx frv_gen_GPsym2reg (rtx, rtx);
|
201 |
|
|
extern int frv_legitimate_memory_operand (rtx, enum machine_mode, int);
|
202 |
|
|
|
203 |
|
|
/* Information about a relocation unspec. SYMBOL is the relocation symbol
|
204 |
|
|
(a SYMBOL_REF or LABEL_REF), RELOC is the type of relocation and OFFSET
|
205 |
|
|
is the constant addend. */
|
206 |
|
|
struct frv_unspec {
|
207 |
|
|
rtx symbol;
|
208 |
|
|
int reloc;
|
209 |
|
|
HOST_WIDE_INT offset;
|
210 |
|
|
};
|
211 |
|
|
|
212 |
|
|
extern bool frv_const_unspec_p (rtx, struct frv_unspec *);
|
213 |
|
|
|
214 |
|
|
#endif
|
215 |
|
|
|