rs6000-protos.h revision 96263
1124395Srwatson/* Definitions of target machine for GNU compiler, for IBM RS/6000.
2124395Srwatson   Copyright (C) 2000, 2001 Free Software Foundation, Inc.
3124395Srwatson   Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu)
4124395Srwatson
5124395SrwatsonThis file is part of GNU CC.
6124395Srwatson
7124395SrwatsonGNU CC is free software; you can redistribute it and/or modify
8124395Srwatsonit under the terms of the GNU General Public License as published by
9124395Srwatsonthe Free Software Foundation; either version 2, or (at your option)
10124395Srwatsonany later version.
11124395Srwatson
12124395SrwatsonGNU CC is distributed in the hope that it will be useful,
13124395Srwatsonbut WITHOUT ANY WARRANTY; without even the implied warranty of
14124395SrwatsonMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15124395SrwatsonGNU General Public License for more details.
16124395Srwatson
17124395SrwatsonYou should have received a copy of the GNU General Public License
18124395Srwatsonalong with GNU CC; see the file COPYING.  If not, write to
19124395Srwatsonthe Free Software Foundation, 59 Temple Place - Suite 330,
20124395SrwatsonBoston, MA 02111-1307, USA.  */
21124395Srwatson
22124395Srwatson/* Declare functions in rs6000.c */
23124395Srwatson
24124395Srwatson#ifdef RTX_CODE
25124395Srwatson
26124395Srwatson#ifdef TREE_CODE
27124395Srwatsonextern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx, int));
28124395Srwatsonextern void rs6000_va_start PARAMS ((int, tree, rtx));
29124395Srwatson#endif /* TREE_CODE */
30185224Shrs
31124395Srwatsonextern struct rtx_def *rs6000_got_register PARAMS ((rtx));
32124395Srwatsonextern struct rtx_def *find_addr_reg PARAMS ((rtx));
33124395Srwatsonextern int any_operand PARAMS ((rtx, enum machine_mode));
34124395Srwatsonextern int short_cint_operand PARAMS ((rtx, enum machine_mode));
35131684Sruextern int u_short_cint_operand PARAMS ((rtx, enum machine_mode));
36124395Srwatsonextern int non_short_cint_operand PARAMS ((rtx, enum machine_mode));
37124395Srwatsonextern int exact_log2_cint_operand PARAMS ((rtx, enum machine_mode));
38124395Srwatsonextern int gpc_reg_operand PARAMS ((rtx, enum machine_mode));
39124395Srwatsonextern int cc_reg_operand PARAMS ((rtx, enum machine_mode));
40131684Sruextern int cc_reg_not_cr0_operand PARAMS ((rtx, enum machine_mode));
41131684Sruextern int reg_or_short_operand PARAMS ((rtx, enum machine_mode));
42131684Sruextern int reg_or_neg_short_operand PARAMS ((rtx, enum machine_mode));
43124395Srwatsonextern int reg_or_aligned_short_operand PARAMS ((rtx, enum machine_mode));
44124395Srwatsonextern int reg_or_u_short_operand PARAMS ((rtx, enum machine_mode));
45131684Sruextern int reg_or_cint_operand PARAMS ((rtx, enum machine_mode));
46131684Sruextern int reg_or_arith_cint_operand PARAMS ((rtx, enum machine_mode));
47131684Sruextern int reg_or_add_cint64_operand PARAMS ((rtx, enum machine_mode));
48131684Sruextern int reg_or_sub_cint64_operand PARAMS ((rtx, enum machine_mode));
49185224Shrsextern int reg_or_logical_cint_operand PARAMS ((rtx, enum machine_mode));
50124395Srwatsonextern int got_operand PARAMS ((rtx, enum machine_mode));
51131684Sruextern int got_no_const_operand PARAMS ((rtx, enum machine_mode));
52131684Sruextern int num_insns_constant PARAMS ((rtx, enum machine_mode));
53131684Sruextern int easy_fp_constant PARAMS ((rtx, enum machine_mode));
54124397Srwatsonextern int zero_fp_constant PARAMS ((rtx, enum machine_mode));
55124395Srwatsonextern int zero_constant PARAMS ((rtx, enum machine_mode));
56124395Srwatsonextern int volatile_mem_operand PARAMS ((rtx, enum machine_mode));
57124395Srwatsonextern int offsettable_mem_operand PARAMS ((rtx, enum machine_mode));
58124395Srwatsonextern int mem_or_easy_const_operand PARAMS ((rtx, enum machine_mode));
59124395Srwatsonextern int add_operand PARAMS ((rtx, enum machine_mode));
60131684Sruextern int non_add_cint_operand PARAMS ((rtx, enum machine_mode));
61124395Srwatsonextern int non_logical_cint_operand PARAMS ((rtx, enum machine_mode));
62124395Srwatsonextern int logical_operand PARAMS ((rtx, enum machine_mode));
63124395Srwatsonextern int mask_operand PARAMS ((rtx, enum machine_mode));
64124395Srwatsonextern int mask64_operand PARAMS ((rtx, enum machine_mode));
65124395Srwatsonextern int and64_operand PARAMS ((rtx, enum machine_mode));
66124395Srwatsonextern int and_operand PARAMS ((rtx, enum machine_mode));
67124395Srwatsonextern int count_register_operand PARAMS ((rtx, enum machine_mode));
68124395Srwatsonextern int xer_operand PARAMS ((rtx, enum machine_mode));
69124395Srwatsonextern int reg_or_mem_operand PARAMS ((rtx, enum machine_mode));
70131684Sruextern int lwa_operand PARAMS ((rtx, enum machine_mode));
71124395Srwatsonextern int call_operand PARAMS ((rtx, enum machine_mode));
72124395Srwatsonextern int current_file_function_operand PARAMS ((rtx, enum machine_mode));
73124395Srwatsonextern int input_operand PARAMS ((rtx, enum machine_mode));
74124395Srwatsonextern int small_data_operand PARAMS ((rtx, enum machine_mode));
75124395Srwatsonextern int s8bit_cint_operand PARAMS ((rtx, enum machine_mode));
76301590Straszextern int constant_pool_expr_p PARAMS ((rtx));
77301590Straszextern int toc_relative_expr_p PARAMS ((rtx));
78124395Srwatsonextern int expand_block_move PARAMS ((rtx[]));
79131684Sruextern int load_multiple_operation PARAMS ((rtx, enum machine_mode));
80131684Sruextern int store_multiple_operation PARAMS ((rtx, enum machine_mode));
81131684Sruextern int branch_comparison_operator PARAMS ((rtx, enum machine_mode));
82131684Sruextern int branch_positive_comparison_operator
83131684Sru  PARAMS ((rtx, enum machine_mode));
84124395Srwatsonextern int scc_comparison_operator PARAMS ((rtx, enum machine_mode));
85124395Srwatsonextern int trap_comparison_operator PARAMS ((rtx, enum machine_mode));
86131684Sruextern int boolean_operator PARAMS ((rtx, enum machine_mode));
87131684Sruextern int boolean_or_operator PARAMS ((rtx, enum machine_mode));
88131684Sruextern int min_max_operator PARAMS ((rtx, enum machine_mode));
89131684Sruextern int includes_lshift_p PARAMS ((rtx, rtx));
90131684Sruextern int includes_rshift_p PARAMS ((rtx, rtx));
91124395Srwatsonextern int includes_rldic_lshift_p PARAMS ((rtx, rtx));
92124395Srwatsonextern int includes_rldicr_lshift_p PARAMS ((rtx, rtx));
93124395Srwatsonextern int registers_ok_for_quad_peep PARAMS ((rtx, rtx));
94124395Srwatsonextern int addrs_ok_for_quad_peep PARAMS ((rtx, rtx));
95131684Sruextern enum reg_class secondary_reload_class PARAMS ((enum reg_class,
96131684Sru						      enum machine_mode, rtx));
97131684Sruextern int ccr_bit PARAMS ((rtx, int));
98131684Sruextern void print_operand PARAMS ((FILE *, rtx, int));
99131684Sruextern void print_operand_address PARAMS ((FILE *, rtx));
100131684Sruextern enum rtx_code rs6000_reverse_condition PARAMS ((enum machine_mode,
101131684Sru						       enum rtx_code));
102124395Srwatsonextern void rs6000_emit_sCOND PARAMS ((enum rtx_code, rtx));
103131684Sruextern void rs6000_emit_cbranch PARAMS ((enum rtx_code, rtx));
104131684Sruextern char * output_cbranch PARAMS ((rtx, const char *, int, rtx));
105131684Sruextern rtx rs6000_emit_set_const PARAMS ((rtx, enum machine_mode, rtx, int));
106124395Srwatsonextern int rs6000_emit_cmove PARAMS ((rtx, rtx, rtx, rtx));
107131684Sruextern void rs6000_emit_minmax PARAMS ((rtx, enum rtx_code, rtx, rtx));
108124395Srwatsonextern void output_toc PARAMS ((FILE *, rtx, int, enum machine_mode));
109131684Sruextern void rs6000_initialize_trampoline PARAMS ((rtx, rtx, rtx));
110131684Sruextern struct rtx_def *rs6000_longcall_ref PARAMS ((rtx));
111131684Sruextern void rs6000_fatal_bad_address PARAMS ((rtx));
112131684Sruextern int stmw_operation PARAMS ((rtx, enum machine_mode));
113131684Sruextern int mtcrf_operation PARAMS ((rtx, enum machine_mode));
114131684Sruextern int lmw_operation PARAMS ((rtx, enum machine_mode));
115131684Sruextern struct rtx_def *create_TOC_reference PARAMS ((rtx));
116124395Srwatsonextern void rs6000_emit_eh_toc_restore PARAMS ((rtx));
117124395Srwatsonextern void rs6000_emit_move PARAMS ((rtx, rtx, enum machine_mode));
118124395Srwatsonextern rtx rs6000_legitimize_address PARAMS ((rtx, rtx, enum machine_mode));
119124395Srwatsonextern rtx rs6000_legitimize_reload_address PARAMS ((rtx, enum machine_mode,
120124395Srwatson			    int, int, int, int *));
121124395Srwatsonextern int rs6000_legitimate_address PARAMS ((enum machine_mode, rtx, int));
122124395Srwatsonextern void rs6000_select_rtx_section PARAMS ((enum machine_mode, rtx));
123124395Srwatson
124124395Srwatsonextern rtx rs6000_return_addr PARAMS ((int, rtx));
125147647Shmpextern void rs6000_output_symbol_ref PARAMS ((FILE*, rtx));
126267936Sbapt
127extern rtx rs6000_machopic_legitimize_pic_address PARAMS ((rtx orig, enum machine_mode mode, rtx reg));
128
129#endif /* RTX_CODE */
130
131#ifdef TREE_CODE
132extern void function_arg_advance PARAMS ((CUMULATIVE_ARGS *, enum machine_mode,
133					  tree, int));
134extern int function_arg_boundary PARAMS ((enum machine_mode, tree));
135extern struct rtx_def *function_arg PARAMS ((CUMULATIVE_ARGS *,
136					     enum machine_mode, tree, int));
137extern int function_arg_partial_nregs PARAMS ((CUMULATIVE_ARGS *,
138					       enum machine_mode, tree, int));
139extern int function_arg_pass_by_reference PARAMS ((CUMULATIVE_ARGS *,
140						   enum machine_mode,
141						   tree, int));
142extern void setup_incoming_varargs PARAMS ((CUMULATIVE_ARGS *,
143					    enum machine_mode, tree,
144					    int *, int));
145extern struct rtx_def *rs6000_va_arg PARAMS ((tree, tree));
146extern void output_mi_thunk PARAMS ((FILE *, tree, int, tree));
147extern void rs6000_encode_section_info PARAMS ((tree));
148extern void rs6000_select_section PARAMS ((tree, int));
149extern void rs6000_unique_section PARAMS ((tree, int));
150#ifdef ARGS_SIZE_RTX
151/* expr.h defines ARGS_SIZE_RTX and `enum direction' */
152extern enum direction function_arg_padding PARAMS ((enum machine_mode, tree));
153#endif /* ARGS_SIZE_RTX */
154
155#endif /* TREE_CODE */
156
157extern void optimization_options PARAMS ((int, int));
158extern void rs6000_override_options PARAMS ((const char *));
159extern void rs6000_file_start PARAMS ((FILE *, const char *));
160extern struct rtx_def *rs6000_float_const PARAMS ((const char *,
161						   enum machine_mode));
162extern int direct_return PARAMS ((void));
163extern union tree_node *rs6000_build_va_list PARAMS ((void));
164extern int first_reg_to_save PARAMS ((void));
165extern int first_fp_reg_to_save PARAMS ((void));
166extern rs6000_stack_t *rs6000_stack_info PARAMS ((void));
167extern void output_ascii PARAMS ((FILE *, const char *, int));
168extern void rs6000_gen_section_name PARAMS ((char **, const char *,
169					     const char *));
170extern void output_function_profiler PARAMS ((FILE *, int));
171extern void output_profile_hook  PARAMS ((int));
172extern int rs6000_trampoline_size PARAMS ((void));
173extern void toc_section PARAMS ((void));
174extern void sdata_section PARAMS ((void));
175extern void sdata2_section PARAMS ((void));
176extern void sbss_section PARAMS ((void));
177extern void private_data_section PARAMS ((void));
178extern void read_only_data_section PARAMS ((void));
179extern void read_only_private_data_section PARAMS ((void));
180extern int get_TOC_alias_set PARAMS ((void));
181extern int uses_TOC PARAMS ((void));
182extern void rs6000_emit_prologue PARAMS ((void));
183extern void rs6000_emit_load_toc_table PARAMS ((int));
184extern void rs6000_aix_emit_builtin_unwind_init PARAMS ((void));
185extern void rs6000_emit_epilogue PARAMS ((int));
186extern void debug_stack_info PARAMS ((rs6000_stack_t *));
187
188extern void machopic_output_stub PARAMS ((FILE *, const char *, const char *));
189