summaryrefslogtreecommitdiff
path: root/gcc/config/c4x/c4x-protos.h
blob: 5e79c1fd53a7971b5e2560f857ddd74bf85cd194 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
/* Definitions of target machine for GNU compiler.  TMS320C[34]x
   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2003, 2004
   Free Software Foundation, Inc.

   Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
              and Herman Ten Brugge (Haj.Ten.Brugge@net.HCC.nl).

   This file is part of GCC.

   GCC is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   GCC is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with GCC; see the file COPYING.  If not, write to
   the Free Software Foundation, 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.  */

#ifndef GCC_C4X_PROTOS_H
#define GCC_C4X_PROTOS_H

extern void c4x_override_options (void);

extern void c4x_optimization_options (int, int);

extern void c4x_output_ascii (FILE *, const char *, int);

extern int c4x_interrupt_function_p (void);

extern void c4x_expand_prologue (void);

extern void c4x_expand_epilogue (void);

extern int c4x_null_epilogue_p (void);

extern void c4x_global_label (const char *);

extern void c4x_external_ref (const char *);

#ifdef TREE_CODE
extern void c4x_function_arg_advance (CUMULATIVE_ARGS *, 
				      enum machine_mode, tree, int);

extern struct rtx_def *c4x_function_arg (CUMULATIVE_ARGS *,
					 enum machine_mode, tree, int);

#endif /* TREE_CODE */


#if defined(RTX_CODE) && defined(TREE_CODE)
extern void c4x_init_cumulative_args (CUMULATIVE_ARGS *c, tree, rtx);

extern struct rtx_def *c4x_va_arg (tree, tree);

extern rtx c4x_expand_builtin (tree, rtx, rtx, enum machine_mode, int);

extern void c4x_init_builtins (void);

#endif /* TREE_CODE and RTX_CODE*/


#ifdef RTX_CODE
extern struct rtx_def *c4x_gen_compare_reg (enum rtx_code, rtx, rtx);

extern int c4x_legitimate_address_p (enum machine_mode, rtx, int);

extern int c4x_hard_regno_mode_ok (unsigned int, enum machine_mode);

extern int c4x_hard_regno_rename_ok (unsigned int, unsigned int);

extern struct rtx_def *c4x_legitimize_address (rtx, enum machine_mode);

extern void c4x_print_operand (FILE *, rtx, int);

extern void c4x_print_operand_address (FILE *, rtx);

extern enum reg_class c4x_preferred_reload_class (rtx, enum reg_class);

extern struct rtx_def *c4x_operand_subword (rtx, int, int, enum machine_mode);

extern char *c4x_output_cbranch (const char *, rtx);

extern int c4x_label_conflict (rtx, rtx, rtx);

extern int c4x_address_conflict (rtx, rtx, int, int);

extern void c4x_rptb_insert (rtx insn);

extern int c4x_rptb_nop_p (rtx);

extern int c4x_rptb_rpts_p (rtx, rtx);

extern int c4x_check_laj_p (rtx);

extern int c4x_autoinc_operand (rtx, enum machine_mode);

extern int any_operand (rtx, enum machine_mode);

extern int fp_zero_operand (rtx, enum machine_mode);

extern int const_operand (rtx, enum machine_mode);

extern int stik_const_operand (rtx, enum machine_mode);

extern int not_const_operand (rtx, enum machine_mode);

extern int parallel_operand (rtx, enum machine_mode);

extern int reg_or_const_operand (rtx, enum machine_mode);

extern int reg_operand (rtx, enum machine_mode);

extern int mixed_subreg_operand (rtx, enum machine_mode);

extern int reg_imm_operand (rtx, enum machine_mode);

extern int r0r1_reg_operand (rtx, enum machine_mode);

extern int r2r3_reg_operand (rtx, enum machine_mode);

extern int ext_low_reg_operand (rtx, enum machine_mode);

extern int ext_reg_operand (rtx, enum machine_mode);

extern int std_reg_operand (rtx, enum machine_mode);

extern int std_or_reg_operand (rtx, enum machine_mode);

extern int dst_operand (rtx, enum machine_mode);

extern int src_operand (rtx, enum machine_mode);

extern int src_hi_operand (rtx, enum machine_mode);

extern int lsrc_operand (rtx, enum machine_mode);

extern int tsrc_operand (rtx, enum machine_mode);

extern int nonimmediate_src_operand (rtx, enum machine_mode);

extern int nonimmediate_lsrc_operand (rtx, enum machine_mode);

extern int addr_reg_operand (rtx, enum machine_mode);

extern int index_reg_operand (rtx, enum machine_mode);

extern int dp_reg_operand (rtx, enum machine_mode);

extern int sp_reg_operand (rtx, enum machine_mode);

extern int rc_reg_operand (rtx, enum machine_mode);

extern int st_reg_operand (rtx, enum machine_mode);

extern int symbolic_address_operand (rtx, enum machine_mode);

extern int ar0_reg_operand (rtx, enum machine_mode);

extern int ar0_mem_operand (rtx, enum machine_mode);

extern int ar1_reg_operand (rtx, enum machine_mode);

extern int ar1_mem_operand (rtx, enum machine_mode);

extern int ar2_reg_operand (rtx, enum machine_mode);

extern int ar2_mem_operand (rtx, enum machine_mode);

extern int ar3_reg_operand (rtx, enum machine_mode);

extern int ar3_mem_operand (rtx, enum machine_mode);

extern int ar4_reg_operand (rtx, enum machine_mode);

extern int ar4_mem_operand (rtx, enum machine_mode);

extern int ar5_reg_operand (rtx, enum machine_mode);

extern int ar5_mem_operand (rtx, enum machine_mode);

extern int ar6_reg_operand (rtx, enum machine_mode);

extern int ar6_mem_operand (rtx, enum machine_mode);

extern int ar7_reg_operand (rtx, enum machine_mode);

extern int ar7_mem_operand (rtx, enum machine_mode);

extern int ir0_reg_operand (rtx, enum machine_mode);

extern int ir0_mem_operand (rtx, enum machine_mode);

extern int ir1_reg_operand (rtx, enum machine_mode);

extern int ir1_mem_operand (rtx, enum machine_mode);

extern int group1_reg_operand (rtx, enum machine_mode);

extern int group1_mem_operand (rtx, enum machine_mode);

extern int arx_reg_operand (rtx, enum machine_mode);

extern int call_address_operand (rtx, enum machine_mode);

extern int par_ind_operand (rtx, enum machine_mode);

extern int not_rc_reg (rtx, enum machine_mode);

extern int not_modify_reg (rtx, enum machine_mode);

extern int c4x_shiftable_constant (rtx);

extern int c4x_H_constant (rtx);

extern int c4x_I_constant (rtx);

extern int c4x_J_constant (rtx);

extern int c4x_L_constant (rtx);

extern int c4x_Q_constraint (rtx);

extern int c4x_R_constraint (rtx);

extern int c4x_S_constraint (rtx);

extern int c4x_T_constraint (rtx);

extern int c4x_U_constraint (rtx);

extern void c4x_emit_libcall (rtx, enum rtx_code, enum machine_mode,
			      enum machine_mode, int, rtx *);

extern void c4x_emit_libcall3 (rtx, enum rtx_code, enum machine_mode, rtx *);

extern void c4x_emit_libcall_mulhi (rtx, enum rtx_code,
				    enum machine_mode, rtx *);

extern int c4x_emit_move_sequence (rtx *, enum machine_mode);

extern int legitimize_operands (enum rtx_code, rtx *, enum machine_mode);

extern int valid_operands (enum rtx_code, rtx *, enum machine_mode);

extern int valid_parallel_load_store (rtx *, enum machine_mode);

extern int valid_parallel_operands_4 (rtx *, enum machine_mode);

extern int valid_parallel_operands_5 (rtx *, enum machine_mode);

extern int valid_parallel_operands_6 (rtx *, enum machine_mode);

extern GTY(()) rtx smulhi3_libfunc;
extern GTY(()) rtx umulhi3_libfunc;
extern GTY(()) rtx fix_truncqfhi2_libfunc;
extern GTY(()) rtx fixuns_truncqfhi2_libfunc;
extern GTY(()) rtx fix_trunchfhi2_libfunc;
extern GTY(()) rtx fixuns_trunchfhi2_libfunc;
extern GTY(()) rtx floathiqf2_libfunc;
extern GTY(()) rtx floatunshiqf2_libfunc;
extern GTY(()) rtx floathihf2_libfunc;
extern GTY(()) rtx floatunshihf2_libfunc;

extern GTY(()) rtx c4x_compare_op0;	/* Operand 0 for comparisons.  */
extern GTY(()) rtx c4x_compare_op1;	/* Operand 1 for comparisons.  */

#endif /* RTX_CODE */

/* Smallest class containing REGNO.  */
extern enum reg_class c4x_regclass_map[FIRST_PSEUDO_REGISTER];
extern enum machine_mode c4x_caller_save_map[FIRST_PSEUDO_REGISTER];

extern int c4x_rpts_cycles;	        /* Max cycles for RPTS.  */
extern int c4x_cpu_version;		/* Cpu version C30/31/32/40/44.  */

extern void c4x_pr_CODE_SECTION (struct cpp_reader *);
extern void c4x_pr_DATA_SECTION (struct cpp_reader *);
extern void c4x_pr_FUNC_IS_PURE (struct cpp_reader *);
extern void c4x_pr_FUNC_NEVER_RETURNS (struct cpp_reader *);
extern void c4x_pr_INTERRUPT (struct cpp_reader *);
extern void c4x_pr_ignored (struct cpp_reader *);
extern void c4x_init_pragma (int (*) (tree *));

extern GTY(()) tree code_tree;
extern GTY(()) tree data_tree;
extern GTY(()) tree pure_tree;
extern GTY(()) tree noreturn_tree;
extern GTY(()) tree interrupt_tree;

#endif /* ! GCC_C4X_PROTOS_H */