Merge from mainline (160224:163495).
[official-gcc/graphite-test-results.git] / gcc / config / i386 / i386-protos.h
blobde6b961fd7b3245c943ce9bfa3c45825d2ade638
1 /* Definitions of target machine for GCC for IA-32.
2 Copyright (C) 1988, 1992, 1994, 1995, 1996, 1996, 1997, 1998, 1999,
3 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
4 Free Software Foundation, Inc.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
11 any later version.
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
22 /* Functions in i386.c */
23 extern void override_options (bool);
24 extern void optimization_options (int, int);
25 extern void ix86_conditional_register_usage (void);
27 extern bool ix86_target_stack_probe (void);
28 extern int ix86_can_use_return_insn_p (void);
29 extern void ix86_setup_frame_addresses (void);
31 extern HOST_WIDE_INT ix86_initial_elimination_offset (int, int);
32 extern void ix86_expand_prologue (void);
33 extern void ix86_expand_epilogue (int);
35 extern void ix86_output_addr_vec_elt (FILE *, int);
36 extern void ix86_output_addr_diff_elt (FILE *, int, int);
38 #ifdef RTX_CODE
39 extern int standard_80387_constant_p (rtx);
40 extern const char *standard_80387_constant_opcode (rtx);
41 extern rtx standard_80387_constant_rtx (int);
42 extern int standard_sse_constant_p (rtx);
43 extern const char *standard_sse_constant_opcode (rtx, rtx);
44 extern int symbolic_reference_mentioned_p (rtx);
45 extern bool extended_reg_mentioned_p (rtx);
46 extern bool x86_extended_QIreg_mentioned_p (rtx);
47 extern bool x86_extended_reg_mentioned_p (rtx);
48 extern bool x86_maybe_negate_const_int (rtx *, enum machine_mode);
49 extern enum machine_mode ix86_cc_mode (enum rtx_code, rtx, rtx);
51 extern int avx_vpermilp_parallel (rtx par, enum machine_mode mode);
52 extern int avx_vperm2f128_parallel (rtx par, enum machine_mode mode);
54 extern int ix86_expand_movmem (rtx, rtx, rtx, rtx, rtx, rtx);
55 extern int ix86_expand_setmem (rtx, rtx, rtx, rtx, rtx, rtx);
56 extern int ix86_expand_strlen (rtx, rtx, rtx, rtx);
58 extern bool legitimate_constant_p (rtx);
59 extern bool constant_address_p (rtx);
60 extern bool legitimate_pic_operand_p (rtx);
61 extern int legitimate_pic_address_disp_p (rtx);
63 extern void print_reg (rtx, int, FILE*);
64 extern void ix86_print_operand (FILE *, rtx, int);
66 extern void split_di (rtx[], int, rtx[], rtx[]);
67 extern void split_ti (rtx[], int, rtx[], rtx[]);
69 extern const char *output_set_got (rtx, rtx);
70 extern const char *output_387_binary_op (rtx, rtx*);
71 extern const char *output_387_reg_move (rtx, rtx*);
72 extern const char *output_fix_trunc (rtx, rtx*, int);
73 extern const char *output_fp_compare (rtx, rtx*, int, int);
74 extern const char *output_adjust_stack_and_probe (rtx);
75 extern const char *output_probe_stack_range (rtx, rtx);
77 extern void ix86_expand_clear (rtx);
78 extern void ix86_expand_move (enum machine_mode, rtx[]);
79 extern void ix86_expand_vector_move (enum machine_mode, rtx[]);
80 extern void ix86_expand_vector_move_misalign (enum machine_mode, rtx[]);
81 extern void ix86_expand_push (enum machine_mode, rtx);
82 extern rtx ix86_fixup_binary_operands (enum rtx_code,
83 enum machine_mode, rtx[]);
84 extern void ix86_fixup_binary_operands_no_copy (enum rtx_code,
85 enum machine_mode, rtx[]);
86 extern void ix86_expand_binary_operator (enum rtx_code,
87 enum machine_mode, rtx[]);
88 extern int ix86_binary_operator_ok (enum rtx_code, enum machine_mode, rtx[]);
89 extern bool ix86_lea_for_add_ok (rtx, rtx[]);
90 extern bool ix86_vec_interleave_v2df_operator_ok (rtx operands[3], bool high);
91 extern bool ix86_dep_by_shift_count (const_rtx set_insn, const_rtx use_insn);
92 extern bool ix86_agi_dependent (rtx set_insn, rtx use_insn);
93 extern void ix86_expand_unary_operator (enum rtx_code, enum machine_mode,
94 rtx[]);
95 extern rtx ix86_build_const_vector (enum machine_mode, bool, rtx);
96 extern rtx ix86_build_signbit_mask (enum machine_mode, bool, bool);
97 extern void ix86_split_convert_uns_si_sse (rtx[]);
98 extern void ix86_expand_convert_uns_didf_sse (rtx, rtx);
99 extern void ix86_expand_convert_uns_sixf_sse (rtx, rtx);
100 extern void ix86_expand_convert_uns_sidf_sse (rtx, rtx);
101 extern void ix86_expand_convert_uns_sisf_sse (rtx, rtx);
102 extern void ix86_expand_convert_sign_didf_sse (rtx, rtx);
103 extern enum ix86_fpcmp_strategy ix86_fp_comparison_strategy (enum rtx_code);
104 extern void ix86_expand_fp_absneg_operator (enum rtx_code, enum machine_mode,
105 rtx[]);
106 extern void ix86_expand_copysign (rtx []);
107 extern void ix86_split_copysign_const (rtx []);
108 extern void ix86_split_copysign_var (rtx []);
109 extern int ix86_unary_operator_ok (enum rtx_code, enum machine_mode, rtx[]);
110 extern int ix86_match_ccmode (rtx, enum machine_mode);
111 extern int ix86_use_fcomi_compare (enum rtx_code);
112 extern void ix86_expand_branch (enum rtx_code, rtx, rtx, rtx);
113 extern void ix86_expand_setcc (rtx, enum rtx_code, rtx, rtx);
114 extern int ix86_expand_int_movcc (rtx[]);
115 extern int ix86_expand_fp_movcc (rtx[]);
116 extern bool ix86_expand_fp_vcond (rtx[]);
117 extern bool ix86_expand_int_vcond (rtx[]);
118 extern void ix86_expand_sse_unpack (rtx[], bool, bool);
119 extern void ix86_expand_sse4_unpack (rtx[], bool, bool);
120 extern int ix86_expand_int_addcc (rtx[]);
121 extern void ix86_expand_call (rtx, rtx, rtx, rtx, rtx, int);
122 extern void x86_initialize_trampoline (rtx, rtx, rtx);
123 extern rtx ix86_zero_extend_to_Pmode (rtx);
124 extern void ix86_split_long_move (rtx[]);
125 extern void ix86_split_ashl (rtx *, rtx, enum machine_mode);
126 extern void ix86_split_ashr (rtx *, rtx, enum machine_mode);
127 extern void ix86_split_lshr (rtx *, rtx, enum machine_mode);
128 extern rtx ix86_find_base_term (rtx);
129 extern int ix86_check_movabs (rtx, int);
131 extern rtx assign_386_stack_local (enum machine_mode, enum ix86_stack_slot);
132 extern int ix86_attr_length_immediate_default (rtx, int);
133 extern int ix86_attr_length_address_default (rtx);
134 extern int ix86_attr_length_vex_default (rtx, int, int);
136 extern enum machine_mode ix86_fp_compare_mode (enum rtx_code);
138 extern rtx ix86_libcall_value (enum machine_mode);
139 extern bool ix86_function_arg_regno_p (int);
140 extern void ix86_asm_output_function_label (FILE *, const char *, tree);
141 extern int ix86_function_arg_boundary (enum machine_mode, const_tree);
142 extern bool ix86_solaris_return_in_memory (const_tree, const_tree);
143 extern rtx ix86_force_to_memory (enum machine_mode, rtx);
144 extern void ix86_free_from_memory (enum machine_mode);
145 extern enum calling_abi ix86_cfun_abi (void);
146 extern enum calling_abi ix86_function_type_abi (const_tree);
147 extern void ix86_call_abi_override (const_tree);
148 extern int ix86_reg_parm_stack_space (const_tree);
150 extern void ix86_split_fp_branch (enum rtx_code code, rtx, rtx,
151 rtx, rtx, rtx, rtx);
152 extern bool ix86_hard_regno_mode_ok (int, enum machine_mode);
153 extern bool ix86_modes_tieable_p (enum machine_mode, enum machine_mode);
154 extern int ix86_secondary_memory_needed (enum reg_class, enum reg_class,
155 enum machine_mode, int);
156 extern bool ix86_cannot_change_mode_class (enum machine_mode,
157 enum machine_mode, enum reg_class);
158 extern enum reg_class ix86_preferred_reload_class (rtx, enum reg_class);
159 extern enum reg_class ix86_preferred_output_reload_class (rtx, enum reg_class);
160 extern int ix86_mode_needed (int, rtx);
161 extern void emit_i387_cw_initialization (int);
162 extern void x86_order_regs_for_local_alloc (void);
163 extern void x86_function_profiler (FILE *, int);
164 extern void x86_emit_floatuns (rtx [2]);
165 extern void ix86_emit_fp_unordered_jump (rtx);
167 extern void ix86_emit_i387_log1p (rtx, rtx);
168 extern void ix86_emit_swdivsf (rtx, rtx, rtx, enum machine_mode);
169 extern void ix86_emit_swsqrtsf (rtx, rtx, enum machine_mode, bool);
171 extern enum rtx_code ix86_reverse_condition (enum rtx_code, enum machine_mode);
173 extern void ix86_expand_lround (rtx, rtx);
174 extern void ix86_expand_lfloorceil (rtx, rtx, bool);
175 extern void ix86_expand_rint (rtx, rtx);
176 extern void ix86_expand_floorceil (rtx, rtx, bool);
177 extern void ix86_expand_floorceildf_32 (rtx, rtx, bool);
178 extern void ix86_expand_round (rtx, rtx);
179 extern void ix86_expand_rounddf_32 (rtx, rtx);
180 extern void ix86_expand_trunc (rtx, rtx);
181 extern void ix86_expand_truncdf_32 (rtx, rtx);
183 #ifdef TREE_CODE
184 extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree);
185 #endif /* TREE_CODE */
187 #endif /* RTX_CODE */
189 #ifdef TREE_CODE
190 extern int ix86_data_alignment (tree, int);
191 extern unsigned int ix86_local_alignment (tree, enum machine_mode,
192 unsigned int);
193 extern unsigned int ix86_minimum_alignment (tree, enum machine_mode,
194 unsigned int);
195 extern int ix86_constant_alignment (tree, int);
196 extern tree ix86_handle_shared_attribute (tree *, tree, tree, int, bool *);
197 extern tree ix86_handle_selectany_attribute (tree *, tree, tree, int, bool *);
198 extern int x86_field_alignment (tree, int);
199 extern tree ix86_valid_target_attribute_tree (tree);
200 #endif
202 extern rtx ix86_tls_get_addr (void);
203 extern rtx ix86_tls_module_base (void);
205 extern void ix86_expand_vector_init (bool, rtx, rtx);
206 extern void ix86_expand_vector_set (bool, rtx, rtx, int);
207 extern void ix86_expand_vector_extract (bool, rtx, rtx, int);
208 extern void ix86_expand_reduc_v4sf (rtx (*)(rtx, rtx, rtx), rtx, rtx);
210 extern void ix86_expand_vec_extract_even_odd (rtx, rtx, rtx, unsigned);
212 /* In i386-c.c */
213 extern void ix86_target_macros (void);
214 extern void ix86_register_pragmas (void);
216 /* In winnt.c */
217 extern void i386_pe_unique_section (tree, int);
218 extern void i386_pe_declare_function_type (FILE *, const char *, int);
219 extern void i386_pe_record_external_function (tree, const char *);
220 extern void i386_pe_maybe_record_exported_symbol (tree, const char *, int);
221 extern void i386_pe_encode_section_info (tree, rtx, int);
222 extern bool i386_pe_binds_local_p (const_tree);
223 extern const char *i386_pe_strip_name_encoding_full (const char *);
224 extern bool i386_pe_valid_dllimport_attribute_p (const_tree);
225 extern unsigned int i386_pe_section_type_flags (tree, const char *, int);
226 extern void i386_pe_asm_named_section (const char *, unsigned int, tree);
227 extern void i386_pe_asm_output_aligned_decl_common (FILE *, tree,
228 const char *,
229 HOST_WIDE_INT,
230 HOST_WIDE_INT);
231 extern void i386_pe_file_end (void);
232 extern tree i386_pe_mangle_decl_assembler_name (tree, tree);
234 /* In winnt-cxx.c and winnt-stubs.c */
235 extern void i386_pe_adjust_class_at_definition (tree);
236 extern bool i386_pe_type_dllimport_p (tree);
237 extern bool i386_pe_type_dllexport_p (tree);
239 extern rtx maybe_get_pool_constant (rtx);
241 extern char internal_label_prefix[16];
242 extern int internal_label_prefix_len;
244 enum ix86_address_seg { SEG_DEFAULT, SEG_FS, SEG_GS };
245 struct ix86_address
247 rtx base, index, disp;
248 HOST_WIDE_INT scale;
249 enum ix86_address_seg seg;
252 extern int ix86_decompose_address (rtx, struct ix86_address *);
253 extern int memory_address_length (rtx addr);
254 extern void x86_output_aligned_bss (FILE *, tree, const char *,
255 unsigned HOST_WIDE_INT, int);
256 extern void x86_elf_aligned_common (FILE *, const char *,
257 unsigned HOST_WIDE_INT, int);
259 #ifdef RTX_CODE
260 extern void ix86_fp_comparison_codes (enum rtx_code code, enum rtx_code *,
261 enum rtx_code *, enum rtx_code *);
262 extern enum rtx_code ix86_fp_compare_code_to_integer (enum rtx_code);
263 extern rtx construct_plt_address (rtx);
264 #endif
265 extern int asm_preferred_eh_data_format (int, int);
267 #ifdef HAVE_ATTR_cpu
268 extern enum attr_cpu ix86_schedule;
269 #endif