1 /* Definitions of target machine for GNU compiler. TMS320C[34]x
2 Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2003, 2004, 2005,
3 2007 Free Software Foundation, Inc.
5 Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz)
6 and Herman Ten Brugge (Haj.Ten.Brugge@net.HCC.nl).
8 This file is part of GCC.
10 GCC is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3, or (at your option)
15 GCC is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with GCC; see the file COPYING3. If not see
22 <http://www.gnu.org/licenses/>. */
24 #ifndef GCC_C4X_PROTOS_H
25 #define GCC_C4X_PROTOS_H
27 extern void c4x_override_options (void);
29 extern void c4x_optimization_options (int, int);
31 extern void c4x_output_ascii (FILE *, const char *, int);
33 extern int c4x_interrupt_function_p (void);
35 extern void c4x_expand_prologue (void);
37 extern void c4x_expand_epilogue (void);
39 extern int c4x_null_epilogue_p (void);
41 extern void c4x_global_label (const char *);
43 extern void c4x_external_ref (const char *);
46 extern void c4x_function_arg_advance (CUMULATIVE_ARGS
*,
47 enum machine_mode
, tree
, int);
49 extern struct rtx_def
*c4x_function_arg (CUMULATIVE_ARGS
*,
50 enum machine_mode
, tree
, int);
52 #endif /* TREE_CODE */
55 #if defined(RTX_CODE) && defined(TREE_CODE)
56 extern void c4x_init_cumulative_args (CUMULATIVE_ARGS
*c
, tree
, rtx
);
58 extern rtx
c4x_expand_builtin (tree
, rtx
, rtx
, enum machine_mode
, int);
60 extern void c4x_init_builtins (void);
62 #endif /* TREE_CODE and RTX_CODE*/
66 extern struct rtx_def
*c4x_gen_compare_reg (enum rtx_code
, rtx
, rtx
);
68 extern int c4x_legitimate_address_p (enum machine_mode
, rtx
, int);
70 extern int c4x_hard_regno_mode_ok (unsigned int, enum machine_mode
);
72 extern int c4x_hard_regno_rename_ok (unsigned int, unsigned int);
74 extern struct rtx_def
*c4x_legitimize_address (rtx
, enum machine_mode
);
76 extern void c4x_print_operand (FILE *, rtx
, int);
78 extern void c4x_print_operand_address (FILE *, rtx
);
80 extern enum reg_class
c4x_preferred_reload_class (rtx
, enum reg_class
);
82 extern struct rtx_def
*c4x_operand_subword (rtx
, int, int, enum machine_mode
);
84 extern char *c4x_output_cbranch (const char *, rtx
);
86 extern int c4x_label_conflict (rtx
, rtx
, rtx
);
88 extern int c4x_address_conflict (rtx
, rtx
, int, int);
90 extern void c4x_rptb_insert (rtx insn
);
92 extern int c4x_rptb_nop_p (rtx
);
94 extern int c4x_rptb_rpts_p (rtx
, rtx
);
96 extern int c4x_check_laj_p (rtx
);
98 extern int c4x_autoinc_operand (rtx
, enum machine_mode
);
100 extern int reg_or_const_operand (rtx
, enum machine_mode
);
102 extern int mixed_subreg_operand (rtx
, enum machine_mode
);
104 extern int reg_imm_operand (rtx
, enum machine_mode
);
106 extern int ar0_reg_operand (rtx
, enum machine_mode
);
108 extern int ar0_mem_operand (rtx
, enum machine_mode
);
110 extern int ar1_reg_operand (rtx
, enum machine_mode
);
112 extern int ar1_mem_operand (rtx
, enum machine_mode
);
114 extern int ar2_reg_operand (rtx
, enum machine_mode
);
116 extern int ar2_mem_operand (rtx
, enum machine_mode
);
118 extern int ar3_reg_operand (rtx
, enum machine_mode
);
120 extern int ar3_mem_operand (rtx
, enum machine_mode
);
122 extern int ar4_reg_operand (rtx
, enum machine_mode
);
124 extern int ar4_mem_operand (rtx
, enum machine_mode
);
126 extern int ar5_reg_operand (rtx
, enum machine_mode
);
128 extern int ar5_mem_operand (rtx
, enum machine_mode
);
130 extern int ar6_reg_operand (rtx
, enum machine_mode
);
132 extern int ar6_mem_operand (rtx
, enum machine_mode
);
134 extern int ar7_reg_operand (rtx
, enum machine_mode
);
136 extern int ar7_mem_operand (rtx
, enum machine_mode
);
138 extern int ir0_reg_operand (rtx
, enum machine_mode
);
140 extern int ir0_mem_operand (rtx
, enum machine_mode
);
142 extern int ir1_reg_operand (rtx
, enum machine_mode
);
144 extern int ir1_mem_operand (rtx
, enum machine_mode
);
146 extern int group1_reg_operand (rtx
, enum machine_mode
);
148 extern int group1_mem_operand (rtx
, enum machine_mode
);
150 extern int arx_reg_operand (rtx
, enum machine_mode
);
152 extern int not_rc_reg (rtx
, enum machine_mode
);
154 extern int not_modify_reg (rtx
, enum machine_mode
);
156 extern int c4x_shiftable_constant (rtx
);
158 extern int c4x_immed_float_p (rtx
);
160 extern int c4x_a_register (rtx
);
162 extern int c4x_x_register (rtx
);
164 extern int c4x_H_constant (rtx
);
166 extern int c4x_I_constant (rtx
);
168 extern int c4x_J_constant (rtx
);
170 extern int c4x_K_constant (rtx
);
172 extern int c4x_L_constant (rtx
);
174 extern int c4x_N_constant (rtx
);
176 extern int c4x_O_constant (rtx
);
178 extern int c4x_Q_constraint (rtx
);
180 extern int c4x_R_constraint (rtx
);
182 extern int c4x_S_indirect (rtx
);
184 extern int c4x_S_constraint (rtx
);
186 extern int c4x_T_constraint (rtx
);
188 extern int c4x_U_constraint (rtx
);
190 extern void c4x_emit_libcall (rtx
, enum rtx_code
, enum machine_mode
,
191 enum machine_mode
, int, rtx
*);
193 extern void c4x_emit_libcall3 (rtx
, enum rtx_code
, enum machine_mode
, rtx
*);
195 extern void c4x_emit_libcall_mulhi (rtx
, enum rtx_code
,
196 enum machine_mode
, rtx
*);
198 extern int c4x_emit_move_sequence (rtx
*, enum machine_mode
);
200 extern int legitimize_operands (enum rtx_code
, rtx
*, enum machine_mode
);
202 extern int valid_operands (enum rtx_code
, rtx
*, enum machine_mode
);
204 extern int valid_parallel_load_store (rtx
*, enum machine_mode
);
206 extern int valid_parallel_operands_4 (rtx
*, enum machine_mode
);
208 extern int valid_parallel_operands_5 (rtx
*, enum machine_mode
);
210 extern int valid_parallel_operands_6 (rtx
*, enum machine_mode
);
212 extern GTY(()) rtx smulhi3_libfunc
;
213 extern GTY(()) rtx umulhi3_libfunc
;
214 extern GTY(()) rtx fix_truncqfhi2_libfunc
;
215 extern GTY(()) rtx fixuns_truncqfhi2_libfunc
;
216 extern GTY(()) rtx fix_trunchfhi2_libfunc
;
217 extern GTY(()) rtx fixuns_trunchfhi2_libfunc
;
218 extern GTY(()) rtx floathiqf2_libfunc
;
219 extern GTY(()) rtx floatunshiqf2_libfunc
;
220 extern GTY(()) rtx floathihf2_libfunc
;
221 extern GTY(()) rtx floatunshihf2_libfunc
;
223 extern GTY(()) rtx c4x_compare_op0
; /* Operand 0 for comparisons. */
224 extern GTY(()) rtx c4x_compare_op1
; /* Operand 1 for comparisons. */
226 #endif /* RTX_CODE */
228 /* Smallest class containing REGNO. */
229 extern enum reg_class c4x_regclass_map
[FIRST_PSEUDO_REGISTER
];
230 extern enum machine_mode c4x_caller_save_map
[FIRST_PSEUDO_REGISTER
];
232 extern void c4x_pr_CODE_SECTION (struct cpp_reader
*);
233 extern void c4x_pr_DATA_SECTION (struct cpp_reader
*);
234 extern void c4x_pr_FUNC_IS_PURE (struct cpp_reader
*);
235 extern void c4x_pr_FUNC_NEVER_RETURNS (struct cpp_reader
*);
236 extern void c4x_pr_INTERRUPT (struct cpp_reader
*);
237 extern void c4x_pr_ignored (struct cpp_reader
*);
238 extern void c4x_init_pragma (int (*) (tree
*));
240 extern GTY(()) tree code_tree
;
241 extern GTY(()) tree data_tree
;
242 extern GTY(()) tree pure_tree
;
243 extern GTY(()) tree noreturn_tree
;
244 extern GTY(()) tree interrupt_tree
;
246 #endif /* ! GCC_C4X_PROTOS_H */