FSF GCC merge 02/23/03
[official-gcc.git] / gcc / config / rs6000 / rs6000-protos.h
blob8dcfd8766f541cac16a6e286828f7680ed18f1ff
1 /* Definitions of target machine for GNU compiler, for IBM RS/6000.
2 Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
3 Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
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)
10 any later version.
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 #ifndef GCC_RS6000_PROTOS_H
23 #define GCC_RS6000_PROTOS_H
25 /* Declare functions in rs6000.c */
27 #ifdef RTX_CODE
29 #ifdef TREE_CODE
30 extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx, int));
31 extern void rs6000_va_start PARAMS ((tree, rtx));
32 #endif /* TREE_CODE */
34 extern struct rtx_def *rs6000_got_register PARAMS ((rtx));
35 extern struct rtx_def *find_addr_reg PARAMS ((rtx));
36 extern int any_operand PARAMS ((rtx, enum machine_mode));
37 extern int short_cint_operand PARAMS ((rtx, enum machine_mode));
38 extern int u_short_cint_operand PARAMS ((rtx, enum machine_mode));
39 extern int non_short_cint_operand PARAMS ((rtx, enum machine_mode));
40 extern int exact_log2_cint_operand PARAMS ((rtx, enum machine_mode));
41 extern int gpc_reg_operand PARAMS ((rtx, enum machine_mode));
42 extern int cc_reg_operand PARAMS ((rtx, enum machine_mode));
43 extern int cc_reg_not_cr0_operand PARAMS ((rtx, enum machine_mode));
44 extern int reg_or_short_operand PARAMS ((rtx, enum machine_mode));
45 extern int reg_or_neg_short_operand PARAMS ((rtx, enum machine_mode));
46 extern int reg_or_aligned_short_operand PARAMS ((rtx, enum machine_mode));
47 extern int reg_or_u_short_operand PARAMS ((rtx, enum machine_mode));
48 extern int reg_or_cint_operand PARAMS ((rtx, enum machine_mode));
49 extern int reg_or_arith_cint_operand PARAMS ((rtx, enum machine_mode));
50 extern int reg_or_add_cint64_operand PARAMS ((rtx, enum machine_mode));
51 extern int reg_or_sub_cint64_operand PARAMS ((rtx, enum machine_mode));
52 extern int reg_or_logical_cint_operand PARAMS ((rtx, enum machine_mode));
53 extern int got_operand PARAMS ((rtx, enum machine_mode));
54 extern int got_no_const_operand PARAMS ((rtx, enum machine_mode));
55 extern int num_insns_constant PARAMS ((rtx, enum machine_mode));
56 extern int easy_fp_constant PARAMS ((rtx, enum machine_mode));
57 extern int zero_fp_constant PARAMS ((rtx, enum machine_mode));
58 extern int zero_constant PARAMS ((rtx, enum machine_mode));
59 extern int volatile_mem_operand PARAMS ((rtx, enum machine_mode));
60 extern int offsettable_mem_operand PARAMS ((rtx, enum machine_mode));
61 extern int mem_or_easy_const_operand PARAMS ((rtx, enum machine_mode));
62 extern int add_operand PARAMS ((rtx, enum machine_mode));
63 extern int non_add_cint_operand PARAMS ((rtx, enum machine_mode));
64 extern int non_logical_cint_operand PARAMS ((rtx, enum machine_mode));
65 extern int logical_operand PARAMS ((rtx, enum machine_mode));
66 extern int mask_operand PARAMS ((rtx, enum machine_mode));
67 extern int mask_operand_wrap PARAMS ((rtx, enum machine_mode));
68 extern int mask64_operand PARAMS ((rtx, enum machine_mode));
69 extern int mask64_2_operand PARAMS ((rtx, enum machine_mode));
70 extern void build_mask64_2_operands PARAMS ((rtx, rtx *));
71 extern int and64_operand PARAMS ((rtx, enum machine_mode));
72 extern int and64_2_operand PARAMS ((rtx, enum machine_mode));
73 extern int and_operand PARAMS ((rtx, enum machine_mode));
74 extern int count_register_operand PARAMS ((rtx, enum machine_mode));
75 extern int xer_operand PARAMS ((rtx, enum machine_mode));
76 extern int reg_or_mem_operand PARAMS ((rtx, enum machine_mode));
77 extern int lwa_operand PARAMS ((rtx, enum machine_mode));
78 extern int call_operand PARAMS ((rtx, enum machine_mode));
79 extern int current_file_function_operand PARAMS ((rtx, enum machine_mode));
80 extern int input_operand PARAMS ((rtx, enum machine_mode));
81 extern int small_data_operand PARAMS ((rtx, enum machine_mode));
82 extern int s8bit_cint_operand PARAMS ((rtx, enum machine_mode));
83 extern int constant_pool_expr_p PARAMS ((rtx));
84 extern int toc_relative_expr_p PARAMS ((rtx));
85 extern int expand_block_move PARAMS ((rtx[]));
86 extern int load_multiple_operation PARAMS ((rtx, enum machine_mode));
87 extern const char * rs6000_output_load_multiple PARAMS ((rtx[]));
88 extern int store_multiple_operation PARAMS ((rtx, enum machine_mode));
89 extern int branch_comparison_operator PARAMS ((rtx, enum machine_mode));
90 extern int branch_positive_comparison_operator
91 PARAMS ((rtx, enum machine_mode));
92 extern int scc_comparison_operator PARAMS ((rtx, enum machine_mode));
93 extern int trap_comparison_operator PARAMS ((rtx, enum machine_mode));
94 extern int boolean_operator PARAMS ((rtx, enum machine_mode));
95 extern int boolean_or_operator PARAMS ((rtx, enum machine_mode));
96 extern int min_max_operator PARAMS ((rtx, enum machine_mode));
97 extern int includes_lshift_p PARAMS ((rtx, rtx));
98 extern int includes_rshift_p PARAMS ((rtx, rtx));
99 extern int includes_rldic_lshift_p PARAMS ((rtx, rtx));
100 extern int includes_rldicr_lshift_p PARAMS ((rtx, rtx));
101 extern int registers_ok_for_quad_peep PARAMS ((rtx, rtx));
102 extern int addrs_ok_for_quad_peep PARAMS ((rtx, rtx));
103 extern enum reg_class secondary_reload_class PARAMS ((enum reg_class,
104 enum machine_mode, rtx));
105 extern int ccr_bit PARAMS ((rtx, int));
106 extern int extract_MB PARAMS ((rtx));
107 extern int extract_ME PARAMS ((rtx));
108 extern void print_operand PARAMS ((FILE *, rtx, int));
109 extern void print_operand_address PARAMS ((FILE *, rtx));
110 extern enum rtx_code rs6000_reverse_condition PARAMS ((enum machine_mode,
111 enum rtx_code));
112 extern void rs6000_emit_sCOND PARAMS ((enum rtx_code, rtx));
113 extern void rs6000_emit_cbranch PARAMS ((enum rtx_code, rtx));
114 extern char * output_cbranch PARAMS ((rtx, const char *, int, rtx));
115 extern rtx rs6000_emit_set_const PARAMS ((rtx, enum machine_mode, rtx, int));
116 extern int rs6000_emit_cmove PARAMS ((rtx, rtx, rtx, rtx));
117 extern void rs6000_emit_minmax PARAMS ((rtx, enum rtx_code, rtx, rtx));
118 extern void output_toc PARAMS ((FILE *, rtx, int, enum machine_mode));
119 extern void rs6000_initialize_trampoline PARAMS ((rtx, rtx, rtx));
120 extern struct rtx_def *rs6000_longcall_ref PARAMS ((rtx));
121 extern void rs6000_fatal_bad_address PARAMS ((rtx));
122 extern int stmw_operation PARAMS ((rtx, enum machine_mode));
123 extern int mtcrf_operation PARAMS ((rtx, enum machine_mode));
124 extern int lmw_operation PARAMS ((rtx, enum machine_mode));
125 extern struct rtx_def *create_TOC_reference PARAMS ((rtx));
126 extern void rs6000_emit_eh_toc_restore PARAMS ((rtx));
127 extern void rs6000_emit_move PARAMS ((rtx, rtx, enum machine_mode));
128 extern rtx rs6000_legitimize_address PARAMS ((rtx, rtx, enum machine_mode));
129 extern rtx rs6000_legitimize_reload_address PARAMS ((rtx, enum machine_mode,
130 int, int, int, int *));
131 extern int rs6000_legitimate_address PARAMS ((enum machine_mode, rtx, int));
132 extern rtx rs6000_return_addr PARAMS ((int, rtx));
133 extern void rs6000_output_symbol_ref PARAMS ((FILE*, rtx));
135 extern rtx rs6000_machopic_legitimize_pic_address PARAMS ((rtx orig, enum machine_mode mode, rtx reg));
137 #endif /* RTX_CODE */
139 #ifdef TREE_CODE
140 extern void function_arg_advance PARAMS ((CUMULATIVE_ARGS *, enum machine_mode,
141 tree, int));
142 extern int function_arg_boundary PARAMS ((enum machine_mode, tree));
143 extern struct rtx_def *function_arg PARAMS ((CUMULATIVE_ARGS *,
144 enum machine_mode, tree, int));
145 extern int function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS *,
146 enum machine_mode, tree, int));
147 extern int function_arg_pass_by_reference PARAMS ((CUMULATIVE_ARGS *,
148 enum machine_mode,
149 tree, int));
150 extern void setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *,
151 enum machine_mode, tree,
152 int *, int));
153 extern struct rtx_def *rs6000_va_arg PARAMS ((tree, tree));
154 extern int function_ok_for_sibcall PARAMS ((tree));
155 #ifdef ARGS_SIZE_RTX
156 /* expr.h defines ARGS_SIZE_RTX and `enum direction' */
157 extern enum direction function_arg_padding PARAMS ((enum machine_mode, tree));
158 #endif /* ARGS_SIZE_RTX */
160 #endif /* TREE_CODE */
162 extern void optimization_options PARAMS ((int, int));
163 extern void rs6000_override_options PARAMS ((const char *));
164 extern void rs6000_file_start PARAMS ((FILE *, const char *));
165 extern int direct_return PARAMS ((void));
166 extern union tree_node *rs6000_build_va_list PARAMS ((void));
167 extern int first_reg_to_save PARAMS ((void));
168 extern int first_fp_reg_to_save PARAMS ((void));
169 extern rs6000_stack_t *rs6000_stack_info PARAMS ((void));
170 extern void output_ascii PARAMS ((FILE *, const char *, int));
171 extern void rs6000_gen_section_name PARAMS ((char **, const char *,
172 const char *));
173 extern void output_function_profiler PARAMS ((FILE *, int));
174 extern void output_profile_hook PARAMS ((int));
175 extern int rs6000_trampoline_size PARAMS ((void));
176 extern void toc_section PARAMS ((void));
177 extern void sdata_section PARAMS ((void));
178 extern void sdata2_section PARAMS ((void));
179 extern void sbss_section PARAMS ((void));
180 extern void private_data_section PARAMS ((void));
181 extern void read_only_data_section PARAMS ((void));
182 extern void read_only_private_data_section PARAMS ((void));
183 extern int get_TOC_alias_set PARAMS ((void));
184 extern int uses_TOC PARAMS ((void));
185 extern void rs6000_emit_prologue PARAMS ((void));
186 extern void rs6000_emit_load_toc_table PARAMS ((int));
187 extern void rs6000_aix_emit_builtin_unwind_init PARAMS ((void));
188 extern void rs6000_emit_epilogue PARAMS ((int));
189 extern void debug_stack_info PARAMS ((rs6000_stack_t *));
190 extern const char * output_isel PARAMS ((rtx *));
191 extern int vrsave_operation PARAMS ((rtx, enum machine_mode));
192 extern int rs6000_register_move_cost PARAMS ((enum machine_mode,
193 enum reg_class, enum reg_class));
194 extern int rs6000_memory_move_cost PARAMS ((enum machine_mode,
195 enum reg_class, int));
197 /* Declare functions in rs6000-c.c */
199 extern void rs6000_pragma_longcall PARAMS ((struct cpp_reader *));
200 extern void rs6000_cpu_cpp_builtins PARAMS ((struct cpp_reader *));
202 #endif /* rs6000-protos.h */