1 /* Definitions of target machine for GNU compiler. TMS320C[34]x
2 Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2003, 2004, 2005
3 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 2, 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 COPYING. If not, write to
22 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
23 Boston, MA 02110-1301, USA. */
25 #ifndef GCC_C4X_PROTOS_H
26 #define GCC_C4X_PROTOS_H
28 extern void c4x_override_options (void);
30 extern void c4x_optimization_options (int, int);
32 extern void c4x_output_ascii (FILE *, const char *, int);
34 extern int c4x_interrupt_function_p (void);
36 extern void c4x_expand_prologue (void);
38 extern void c4x_expand_epilogue (void);
40 extern int c4x_null_epilogue_p (void);
42 extern void c4x_global_label (const char *);
44 extern void c4x_external_ref (const char *);
47 extern void c4x_function_arg_advance (CUMULATIVE_ARGS
*,
48 enum machine_mode
, tree
, int);
50 extern struct rtx_def
*c4x_function_arg (CUMULATIVE_ARGS
*,
51 enum machine_mode
, tree
, int);
53 #endif /* TREE_CODE */
56 #if defined(RTX_CODE) && defined(TREE_CODE)
57 extern void c4x_init_cumulative_args (CUMULATIVE_ARGS
*c
, tree
, rtx
);
59 extern rtx
c4x_expand_builtin (tree
, rtx
, rtx
, enum machine_mode
, int);
61 extern void c4x_init_builtins (void);
63 #endif /* TREE_CODE and RTX_CODE*/
67 extern struct rtx_def
*c4x_gen_compare_reg (enum rtx_code
, rtx
, rtx
);
69 extern int c4x_legitimate_address_p (enum machine_mode
, rtx
, int);
71 extern int c4x_hard_regno_mode_ok (unsigned int, enum machine_mode
);
73 extern int c4x_hard_regno_rename_ok (unsigned int, unsigned int);
75 extern struct rtx_def
*c4x_legitimize_address (rtx
, enum machine_mode
);
77 extern void c4x_print_operand (FILE *, rtx
, int);
79 extern void c4x_print_operand_address (FILE *, rtx
);
81 extern enum reg_class
c4x_preferred_reload_class (rtx
, enum reg_class
);
83 extern struct rtx_def
*c4x_operand_subword (rtx
, int, int, enum machine_mode
);
85 extern char *c4x_output_cbranch (const char *, rtx
);
87 extern int c4x_label_conflict (rtx
, rtx
, rtx
);
89 extern int c4x_address_conflict (rtx
, rtx
, int, int);
91 extern void c4x_rptb_insert (rtx insn
);
93 extern int c4x_rptb_nop_p (rtx
);
95 extern int c4x_rptb_rpts_p (rtx
, rtx
);
97 extern int c4x_check_laj_p (rtx
);
99 extern int c4x_autoinc_operand (rtx
, enum machine_mode
);
101 extern int reg_or_const_operand (rtx
, enum machine_mode
);
103 extern int mixed_subreg_operand (rtx
, enum machine_mode
);
105 extern int reg_imm_operand (rtx
, enum machine_mode
);
107 extern int ar0_reg_operand (rtx
, enum machine_mode
);
109 extern int ar0_mem_operand (rtx
, enum machine_mode
);
111 extern int ar1_reg_operand (rtx
, enum machine_mode
);
113 extern int ar1_mem_operand (rtx
, enum machine_mode
);
115 extern int ar2_reg_operand (rtx
, enum machine_mode
);
117 extern int ar2_mem_operand (rtx
, enum machine_mode
);
119 extern int ar3_reg_operand (rtx
, enum machine_mode
);
121 extern int ar3_mem_operand (rtx
, enum machine_mode
);
123 extern int ar4_reg_operand (rtx
, enum machine_mode
);
125 extern int ar4_mem_operand (rtx
, enum machine_mode
);
127 extern int ar5_reg_operand (rtx
, enum machine_mode
);
129 extern int ar5_mem_operand (rtx
, enum machine_mode
);
131 extern int ar6_reg_operand (rtx
, enum machine_mode
);
133 extern int ar6_mem_operand (rtx
, enum machine_mode
);
135 extern int ar7_reg_operand (rtx
, enum machine_mode
);
137 extern int ar7_mem_operand (rtx
, enum machine_mode
);
139 extern int ir0_reg_operand (rtx
, enum machine_mode
);
141 extern int ir0_mem_operand (rtx
, enum machine_mode
);
143 extern int ir1_reg_operand (rtx
, enum machine_mode
);
145 extern int ir1_mem_operand (rtx
, enum machine_mode
);
147 extern int group1_reg_operand (rtx
, enum machine_mode
);
149 extern int group1_mem_operand (rtx
, enum machine_mode
);
151 extern int arx_reg_operand (rtx
, enum machine_mode
);
153 extern int not_rc_reg (rtx
, enum machine_mode
);
155 extern int not_modify_reg (rtx
, enum machine_mode
);
157 extern int c4x_shiftable_constant (rtx
);
159 extern int c4x_immed_float_p (rtx
);
161 extern int c4x_a_register (rtx
);
163 extern int c4x_x_register (rtx
);
165 extern int c4x_H_constant (rtx
);
167 extern int c4x_I_constant (rtx
);
169 extern int c4x_J_constant (rtx
);
171 extern int c4x_K_constant (rtx
);
173 extern int c4x_L_constant (rtx
);
175 extern int c4x_N_constant (rtx
);
177 extern int c4x_O_constant (rtx
);
179 extern int c4x_Q_constraint (rtx
);
181 extern int c4x_R_constraint (rtx
);
183 extern int c4x_S_indirect (rtx
);
185 extern int c4x_S_constraint (rtx
);
187 extern int c4x_T_constraint (rtx
);
189 extern int c4x_U_constraint (rtx
);
191 extern void c4x_emit_libcall (rtx
, enum rtx_code
, enum machine_mode
,
192 enum machine_mode
, int, rtx
*);
194 extern void c4x_emit_libcall3 (rtx
, enum rtx_code
, enum machine_mode
, rtx
*);
196 extern void c4x_emit_libcall_mulhi (rtx
, enum rtx_code
,
197 enum machine_mode
, rtx
*);
199 extern int c4x_emit_move_sequence (rtx
*, enum machine_mode
);
201 extern int legitimize_operands (enum rtx_code
, rtx
*, enum machine_mode
);
203 extern int valid_operands (enum rtx_code
, rtx
*, enum machine_mode
);
205 extern int valid_parallel_load_store (rtx
*, enum machine_mode
);
207 extern int valid_parallel_operands_4 (rtx
*, enum machine_mode
);
209 extern int valid_parallel_operands_5 (rtx
*, enum machine_mode
);
211 extern int valid_parallel_operands_6 (rtx
*, enum machine_mode
);
213 extern GTY(()) rtx smulhi3_libfunc
;
214 extern GTY(()) rtx umulhi3_libfunc
;
215 extern GTY(()) rtx fix_truncqfhi2_libfunc
;
216 extern GTY(()) rtx fixuns_truncqfhi2_libfunc
;
217 extern GTY(()) rtx fix_trunchfhi2_libfunc
;
218 extern GTY(()) rtx fixuns_trunchfhi2_libfunc
;
219 extern GTY(()) rtx floathiqf2_libfunc
;
220 extern GTY(()) rtx floatunshiqf2_libfunc
;
221 extern GTY(()) rtx floathihf2_libfunc
;
222 extern GTY(()) rtx floatunshihf2_libfunc
;
224 extern GTY(()) rtx c4x_compare_op0
; /* Operand 0 for comparisons. */
225 extern GTY(()) rtx c4x_compare_op1
; /* Operand 1 for comparisons. */
227 #endif /* RTX_CODE */
229 /* Smallest class containing REGNO. */
230 extern enum reg_class c4x_regclass_map
[FIRST_PSEUDO_REGISTER
];
231 extern enum machine_mode c4x_caller_save_map
[FIRST_PSEUDO_REGISTER
];
233 extern void c4x_pr_CODE_SECTION (struct cpp_reader
*);
234 extern void c4x_pr_DATA_SECTION (struct cpp_reader
*);
235 extern void c4x_pr_FUNC_IS_PURE (struct cpp_reader
*);
236 extern void c4x_pr_FUNC_NEVER_RETURNS (struct cpp_reader
*);
237 extern void c4x_pr_INTERRUPT (struct cpp_reader
*);
238 extern void c4x_pr_ignored (struct cpp_reader
*);
239 extern void c4x_init_pragma (int (*) (tree
*));
241 extern GTY(()) tree code_tree
;
242 extern GTY(()) tree data_tree
;
243 extern GTY(()) tree pure_tree
;
244 extern GTY(()) tree noreturn_tree
;
245 extern GTY(()) tree interrupt_tree
;
247 #endif /* ! GCC_C4X_PROTOS_H */