]>
Commit | Line | Data |
---|---|---|
9ebbca7d | 1 | /* Definitions of target machine for GNU compiler, for IBM RS/6000. |
5624e564 | 2 | Copyright (C) 2000-2015 Free Software Foundation, Inc. |
9ebbca7d GK |
3 | Contributed by Richard Kenner (kenner@vlsi1.ultra.nyu.edu) |
4 | ||
5de601cf | 5 | This file is part of GCC. |
9ebbca7d | 6 | |
5de601cf NC |
7 | GCC is free software; you can redistribute it and/or modify it |
8 | under the terms of the GNU General Public License as published | |
2f83c7d6 | 9 | by the Free Software Foundation; either version 3, or (at your |
5de601cf | 10 | option) any later version. |
9ebbca7d | 11 | |
5de601cf NC |
12 | GCC is distributed in the hope that it will be useful, but WITHOUT |
13 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
14 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public | |
15 | License for more details. | |
9ebbca7d | 16 | |
5de601cf | 17 | You should have received a copy of the GNU General Public License |
2f83c7d6 NC |
18 | along with GCC; see the file COPYING3. If not see |
19 | <http://www.gnu.org/licenses/>. */ | |
9ebbca7d | 20 | |
a5c76ee6 ZW |
21 | #ifndef GCC_RS6000_PROTOS_H |
22 | #define GCC_RS6000_PROTOS_H | |
23 | ||
9ebbca7d GK |
24 | /* Declare functions in rs6000.c */ |
25 | ||
26 | #ifdef RTX_CODE | |
27 | ||
28 | #ifdef TREE_CODE | |
617718f7 | 29 | extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, int, int, int, |
ef4bddc2 | 30 | tree, machine_mode); |
9ebbca7d GK |
31 | #endif /* TREE_CODE */ |
32 | ||
ef4bddc2 | 33 | extern bool easy_altivec_constant (rtx, machine_mode); |
683be46f | 34 | extern int vspltis_shifted (rtx); |
847535b6 | 35 | extern HOST_WIDE_INT const_vector_elt_as_int (rtx, unsigned int); |
ef4bddc2 RS |
36 | extern bool macho_lo_sum_memory_operand (rtx, machine_mode); |
37 | extern int num_insns_constant (rtx, machine_mode); | |
48d72335 | 38 | extern int num_insns_constant_wide (HOST_WIDE_INT); |
ef4bddc2 RS |
39 | extern int small_data_operand (rtx, machine_mode); |
40 | extern bool mem_operand_gpr (rtx, machine_mode); | |
8afc3636 | 41 | extern bool toc_relative_expr_p (const_rtx, bool); |
ef4bddc2 RS |
42 | extern bool invalid_e500_subreg (rtx, machine_mode); |
43 | extern void validate_condition_mode (enum rtx_code, machine_mode); | |
44 | extern bool legitimate_constant_pool_address_p (const_rtx, machine_mode, | |
77b0791e | 45 | bool); |
48d72335 | 46 | extern bool legitimate_indirect_address_p (rtx, int); |
6fb5fa3c | 47 | extern bool legitimate_indexed_address_p (rtx, int); |
ef4bddc2 | 48 | extern bool avoiding_indexed_address_p (machine_mode); |
48d72335 | 49 | |
9390387d AM |
50 | extern rtx rs6000_got_register (rtx); |
51 | extern rtx find_addr_reg (rtx); | |
66180ff3 | 52 | extern rtx gen_easy_altivec_constant (rtx); |
a2369ed3 | 53 | extern const char *output_vec_const_move (rtx *); |
19be72ab | 54 | extern const char *rs6000_output_move_128bit (rtx *); |
a16a872d MM |
55 | extern bool rs6000_move_128bit_ok_p (rtx []); |
56 | extern bool rs6000_split_128bit_ok_p (rtx []); | |
526303ec | 57 | extern void rs6000_expand_float128_convert (rtx, rtx, bool); |
dd551aa1 MM |
58 | extern void convert_float128_to_int (rtx *, enum rtx_code); |
59 | extern void convert_int_to_float128 (rtx *, enum rtx_code); | |
7a4eca66 | 60 | extern void rs6000_expand_vector_init (rtx, rtx); |
f5027409 | 61 | extern void paired_expand_vector_init (rtx, rtx); |
7a4eca66 DE |
62 | extern void rs6000_expand_vector_set (rtx, rtx, int); |
63 | extern void rs6000_expand_vector_extract (rtx, rtx, int); | |
5aebfdad | 64 | extern bool altivec_expand_vec_perm_const (rtx op[4]); |
f200869a | 65 | extern void altivec_expand_vec_perm_le (rtx op[4]); |
5aebfdad | 66 | extern bool rs6000_expand_vec_perm_const (rtx op[4]); |
ef4bddc2 RS |
67 | extern void altivec_expand_lvx_be (rtx, rtx, machine_mode, unsigned); |
68 | extern void altivec_expand_stvx_be (rtx, rtx, machine_mode, unsigned); | |
69 | extern void altivec_expand_stvex_be (rtx, rtx, machine_mode, unsigned); | |
5aebfdad RH |
70 | extern void rs6000_expand_extract_even (rtx, rtx, rtx); |
71 | extern void rs6000_expand_interleave (rtx, rtx, rtx, bool); | |
70f0f8b2 | 72 | extern void rs6000_scale_v2df (rtx, rtx, int); |
fba73eb1 | 73 | extern int expand_block_clear (rtx[]); |
a2369ed3 | 74 | extern int expand_block_move (rtx[]); |
a2369ed3 | 75 | extern const char * rs6000_output_load_multiple (rtx[]); |
7fc5cca3 SB |
76 | extern bool rs6000_is_valid_mask (rtx, int *, int *, machine_mode); |
77 | extern bool rs6000_is_valid_and_mask (rtx, machine_mode); | |
78 | extern bool rs6000_is_valid_shift_mask (rtx, rtx, machine_mode); | |
79 | extern bool rs6000_is_valid_insert_mask (rtx, rtx, machine_mode); | |
80 | extern const char *rs6000_insn_for_and_mask (machine_mode, rtx *, bool); | |
81 | extern const char *rs6000_insn_for_shift_mask (machine_mode, rtx *, bool); | |
82 | extern const char *rs6000_insn_for_insert_mask (machine_mode, rtx *, bool); | |
83 | extern bool rs6000_is_valid_2insn_and (rtx, machine_mode); | |
a34f4f64 | 84 | extern void rs6000_emit_2insn_and (machine_mode, rtx *, bool, int); |
a2369ed3 | 85 | extern int registers_ok_for_quad_peep (rtx, rtx); |
90f81f99 | 86 | extern int mems_ok_for_quad_peep (rtx, rtx); |
3a1f863f | 87 | extern bool gpr_or_gpr_p (rtx, rtx); |
19be72ab MM |
88 | extern bool direct_move_p (rtx, rtx); |
89 | extern bool quad_load_store_p (rtx, rtx); | |
3f99b061 | 90 | extern bool fusion_gpr_load_p (rtx, rtx, rtx, rtx); |
f758f299 | 91 | extern void expand_fusion_gpr_load (rtx *); |
0299bc72 MM |
92 | extern void emit_fusion_addis (rtx, rtx, const char *, const char *); |
93 | extern void emit_fusion_load_store (rtx, rtx, rtx, const char *); | |
3f99b061 | 94 | extern const char *emit_fusion_gpr_load (rtx, rtx); |
0299bc72 MM |
95 | extern bool fusion_p9_p (rtx, rtx, rtx, rtx); |
96 | extern void expand_fusion_p9_load (rtx *); | |
97 | extern void expand_fusion_p9_store (rtx *); | |
98 | extern const char *emit_fusion_p9_load (rtx, rtx, rtx); | |
99 | extern const char *emit_fusion_p9_store (rtx, rtx, rtx); | |
100 | extern rtx fusion_wrap_memory_address (rtx); | |
8beb65e3 MM |
101 | extern enum reg_class (*rs6000_preferred_reload_class_ptr) (rtx, |
102 | enum reg_class); | |
103 | extern enum reg_class (*rs6000_secondary_reload_class_ptr) (enum reg_class, | |
ef4bddc2 | 104 | machine_mode, |
8beb65e3 MM |
105 | rtx); |
106 | extern bool (*rs6000_secondary_memory_needed_ptr) (enum reg_class, | |
107 | enum reg_class, | |
ef4bddc2 RS |
108 | machine_mode); |
109 | extern bool (*rs6000_cannot_change_mode_class_ptr) (machine_mode, | |
110 | machine_mode, | |
8beb65e3 MM |
111 | enum reg_class); |
112 | extern void rs6000_secondary_reload_inner (rtx, rtx, rtx, bool); | |
d32d6b75 | 113 | extern void rs6000_secondary_reload_gpr (rtx, rtx, rtx, bool); |
e2e95f45 RE |
114 | extern int paired_emit_vector_cond_expr (rtx, rtx, rtx, |
115 | rtx, rtx, rtx); | |
116 | extern void paired_expand_vector_move (rtx operands[]); | |
117 | ||
118 | ||
a2369ed3 | 119 | extern int ccr_bit (rtx, int); |
85b776df | 120 | extern void rs6000_output_function_entry (FILE *, const char *); |
a2369ed3 DJ |
121 | extern void print_operand (FILE *, rtx, int); |
122 | extern void print_operand_address (FILE *, rtx); | |
ef4bddc2 | 123 | extern enum rtx_code rs6000_reverse_condition (machine_mode, |
3a1f863f | 124 | enum rtx_code); |
a935964d | 125 | extern rtx rs6000_emit_eqne (machine_mode, rtx, rtx, rtx); |
ef4bddc2 RS |
126 | extern void rs6000_emit_sISEL (machine_mode, rtx[]); |
127 | extern void rs6000_emit_sCOND (machine_mode, rtx[]); | |
128 | extern void rs6000_emit_cbranch (machine_mode, rtx[]); | |
e64e631b | 129 | extern char * output_cbranch (rtx, const char *, int, rtx_insn *); |
64022b5d | 130 | extern char * output_e500_flip_gt_bit (rtx, rtx); |
39acb18f | 131 | extern const char * output_probe_stack_range (rtx, rtx); |
bfe51f42 | 132 | extern bool rs6000_emit_set_const (rtx, rtx); |
a2369ed3 | 133 | extern int rs6000_emit_cmove (rtx, rtx, rtx, rtx); |
21213b4c | 134 | extern int rs6000_emit_vector_cond_expr (rtx, rtx, rtx, rtx, rtx, rtx); |
a2369ed3 | 135 | extern void rs6000_emit_minmax (rtx, enum rtx_code, rtx, rtx); |
2747a046 RH |
136 | extern void rs6000_expand_atomic_compare_and_swap (rtx op[]); |
137 | extern void rs6000_expand_atomic_exchange (rtx op[]); | |
138 | extern void rs6000_expand_atomic_op (enum rtx_code, rtx, rtx, rtx, rtx, rtx); | |
92902797 | 139 | extern void rs6000_emit_swdiv (rtx, rtx, rtx, bool); |
4f0055bd | 140 | extern void rs6000_emit_swsqrt (rtx, rtx, bool); |
ef4bddc2 | 141 | extern void output_toc (FILE *, rtx, int, machine_mode); |
9390387d | 142 | extern rtx rs6000_longcall_ref (rtx); |
a2369ed3 | 143 | extern void rs6000_fatal_bad_address (rtx); |
070b27da | 144 | extern rtx create_TOC_reference (rtx, rtx); |
a9baceb1 | 145 | extern void rs6000_split_multireg_move (rtx, rtx); |
ef4bddc2 RS |
146 | extern void rs6000_emit_le_vsx_move (rtx, rtx, machine_mode); |
147 | extern void rs6000_emit_move (rtx, rtx, machine_mode); | |
148 | extern rtx rs6000_secondary_memory_needed_rtx (machine_mode); | |
2c83faf8 | 149 | extern machine_mode rs6000_secondary_memory_needed_mode (machine_mode); |
ef4bddc2 | 150 | extern rtx (*rs6000_legitimize_reload_address_ptr) (rtx, machine_mode, |
8beb65e3 | 151 | int, int, int, int *); |
ef4bddc2 | 152 | extern bool rs6000_legitimate_offset_address_p (machine_mode, rtx, |
d32d6b75 | 153 | bool, bool); |
944258eb | 154 | extern rtx rs6000_find_base_term (rtx); |
a2369ed3 DJ |
155 | extern rtx rs6000_return_addr (int, rtx); |
156 | extern void rs6000_output_symbol_ref (FILE*, rtx); | |
d1d0c603 | 157 | extern HOST_WIDE_INT rs6000_initial_elimination_offset (int, int); |
565ef4ba RS |
158 | extern void rs6000_emit_popcount (rtx, rtx); |
159 | extern void rs6000_emit_parity (rtx, rtx); | |
a2369ed3 | 160 | |
ef4bddc2 | 161 | extern rtx rs6000_machopic_legitimize_pic_address (rtx, machine_mode, |
fa5b0972 | 162 | rtx); |
7042fe5e | 163 | extern rtx rs6000_address_for_fpconvert (rtx); |
c9485473 | 164 | extern rtx rs6000_address_for_altivec (rtx); |
ef4bddc2 | 165 | extern rtx rs6000_allocate_stack_temp (machine_mode, bool, bool); |
58082ff6 | 166 | extern int rs6000_loop_align (rtx); |
44c3a8bb | 167 | extern void rs6000_split_logical (rtx [], enum rtx_code, bool, bool, bool); |
9ebbca7d GK |
168 | #endif /* RTX_CODE */ |
169 | ||
170 | #ifdef TREE_CODE | |
69eff9da | 171 | extern unsigned int rs6000_data_alignment (tree, unsigned int, enum data_align); |
98326512 | 172 | extern bool rs6000_special_adjust_field_align_p (tree, unsigned int); |
fa5b0972 AM |
173 | extern unsigned int rs6000_special_round_type_align (tree, unsigned int, |
174 | unsigned int); | |
58182de3 GK |
175 | extern unsigned int darwin_rs6000_special_round_type_align (tree, unsigned int, |
176 | unsigned int); | |
4b29c5e5 | 177 | extern tree altivec_resolve_overloaded_builtin (location_t, tree, void *); |
ef4bddc2 | 178 | extern rtx rs6000_libcall_value (machine_mode); |
9390387d | 179 | extern rtx rs6000_va_arg (tree, tree); |
a2369ed3 | 180 | extern int function_ok_for_sibcall (tree); |
ddbb449f | 181 | extern int rs6000_reg_parm_stack_space (tree, bool); |
b36e833f | 182 | extern void rs6000_xcoff_declare_function_name (FILE *, const char *, tree); |
9af46873 | 183 | extern void rs6000_xcoff_declare_object_name (FILE *, const char *, tree); |
a2369ed3 | 184 | extern void rs6000_elf_declare_function_name (FILE *, const char *, tree); |
3101faab | 185 | extern bool rs6000_elf_in_small_data_p (const_tree); |
9ebbca7d GK |
186 | #ifdef ARGS_SIZE_RTX |
187 | /* expr.h defines ARGS_SIZE_RTX and `enum direction' */ | |
ef4bddc2 | 188 | extern enum direction function_arg_padding (machine_mode, const_tree); |
9ebbca7d | 189 | #endif /* ARGS_SIZE_RTX */ |
ee890fe2 | 190 | |
9ebbca7d GK |
191 | #endif /* TREE_CODE */ |
192 | ||
a2369ed3 | 193 | extern int direct_return (void); |
a2369ed3 DJ |
194 | extern int first_reg_to_save (void); |
195 | extern int first_fp_reg_to_save (void); | |
a2369ed3 DJ |
196 | extern void output_ascii (FILE *, const char *, int); |
197 | extern void rs6000_gen_section_name (char **, const char *, const char *); | |
198 | extern void output_function_profiler (FILE *, int); | |
199 | extern void output_profile_hook (int); | |
200 | extern int rs6000_trampoline_size (void); | |
4862826d | 201 | extern alias_set_type get_TOC_alias_set (void); |
a2369ed3 DJ |
202 | extern void rs6000_emit_prologue (void); |
203 | extern void rs6000_emit_load_toc_table (int); | |
3d36d470 | 204 | extern unsigned int rs6000_dbx_register_number (unsigned int, unsigned int); |
a2369ed3 | 205 | extern void rs6000_emit_epilogue (int); |
0f0fd745 AM |
206 | extern void rs6000_expand_split_stack_prologue (void); |
207 | extern void rs6000_split_stack_space_check (rtx, rtx); | |
d1d0c603 | 208 | extern void rs6000_emit_eh_reg_restore (rtx, rtx); |
a2369ed3 | 209 | extern const char * output_isel (rtx *); |
f90f960c UW |
210 | extern void rs6000_call_aix (rtx, rtx, rtx, rtx); |
211 | extern void rs6000_sibcall_aix (rtx, rtx, rtx, rtx); | |
7e49a4b3 | 212 | extern void rs6000_aix_asm_output_dwarf_table_ref (char *); |
be26142a | 213 | extern void get_ppc476_thunk_name (char name[32]); |
7fa14a01 | 214 | extern bool rs6000_overloaded_builtin_p (enum rs6000_builtins); |
b85aed95 | 215 | extern HOST_WIDE_INT rs6000_builtin_mask_calculate (void); |
e707a2dd AD |
216 | extern void rs6000_asm_output_dwarf_pcrel (FILE *file, int size, |
217 | const char *label); | |
218 | extern void rs6000_asm_output_dwarf_datarel (FILE *file, int size, | |
219 | const char *label); | |
7e49a4b3 | 220 | |
4c4eb375 GK |
221 | /* Declare functions in rs6000-c.c */ |
222 | ||
a2369ed3 DJ |
223 | extern void rs6000_pragma_longcall (struct cpp_reader *); |
224 | extern void rs6000_cpu_cpp_builtins (struct cpp_reader *); | |
fd438373 MM |
225 | #ifdef TREE_CODE |
226 | extern bool rs6000_pragma_target_parse (tree, tree); | |
227 | #endif | |
b85aed95 MM |
228 | extern void rs6000_target_modify_macros (bool, HOST_WIDE_INT, HOST_WIDE_INT); |
229 | extern void (*rs6000_target_modify_macros_ptr) (bool, HOST_WIDE_INT, | |
230 | HOST_WIDE_INT); | |
a5c76ee6 | 231 | |
efdba735 | 232 | #if TARGET_MACHO |
a1950df3 | 233 | char *output_call (rtx_insn *, rtx *, int, int); |
efdba735 SH |
234 | #endif |
235 | ||
ee06c6a5 DE |
236 | #ifdef NO_DOLLAR_IN_LABEL |
237 | const char * rs6000_xcoff_strip_dollar (const char *); | |
238 | #endif | |
239 | ||
e64e631b | 240 | void rs6000_final_prescan_insn (rtx_insn *, rtx *operand, int num_operands); |
c921bad8 | 241 | |
0d1fbc8c | 242 | extern bool rs6000_hard_regno_mode_ok_p[][FIRST_PSEUDO_REGISTER]; |
cacf1ca8 MM |
243 | extern unsigned char rs6000_class_max_nregs[][LIM_REG_CLASSES]; |
244 | extern unsigned char rs6000_hard_regno_nregs[][FIRST_PSEUDO_REGISTER]; | |
9193fb05 JM |
245 | |
246 | extern bool rs6000_linux_float_exceptions_rounding_supported_p (void); | |
a5c76ee6 | 247 | #endif /* rs6000-protos.h */ |