1 /* Definitions of target machine for GNU compiler for IA-32.
2 Copyright (C) 1988, 1992, 1994, 1995, 1996, 1996, 1997, 1998, 1999,
3 2000, 2001 Free Software Foundation, Inc.
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)
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 /* Functions in i386.c */
23 extern void override_options
PARAMS ((void));
24 extern void optimization_options
PARAMS ((int, int));
26 extern int ix86_can_use_return_insn_p
PARAMS ((void));
27 extern int ix86_frame_pointer_required
PARAMS ((void));
28 extern void ix86_setup_frame_addresses
PARAMS ((void));
30 extern void ix86_asm_file_end
PARAMS ((FILE *));
31 extern HOST_WIDE_INT ix86_initial_elimination_offset
PARAMS((int, int));
32 extern void ix86_expand_prologue
PARAMS ((void));
33 extern void ix86_expand_epilogue
PARAMS ((int));
35 extern void ix86_output_addr_vec_elt
PARAMS ((FILE *, int));
36 extern void ix86_output_addr_diff_elt
PARAMS ((FILE *, int, int));
39 extern int ix86_aligned_p
PARAMS ((rtx
));
41 extern int standard_80387_constant_p
PARAMS ((rtx
));
42 extern int standard_sse_constant_p
PARAMS ((rtx
));
43 extern int symbolic_reference_mentioned_p
PARAMS ((rtx
));
45 extern int x86_64_general_operand
PARAMS ((rtx
, enum machine_mode
));
46 extern int x86_64_szext_general_operand
PARAMS ((rtx
, enum machine_mode
));
47 extern int x86_64_nonmemory_operand
PARAMS ((rtx
, enum machine_mode
));
48 extern int x86_64_szext_nonmemory_operand
PARAMS ((rtx
, enum machine_mode
));
49 extern int x86_64_immediate_operand
PARAMS ((rtx
, enum machine_mode
));
50 extern int x86_64_zext_immediate_operand
PARAMS ((rtx
, enum machine_mode
));
51 extern int const_int_1_operand
PARAMS ((rtx
, enum machine_mode
));
52 extern int symbolic_operand
PARAMS ((rtx
, enum machine_mode
));
53 extern int tls_symbolic_operand
PARAMS ((rtx
, enum machine_mode
));
54 extern int global_dynamic_symbolic_operand
PARAMS ((rtx
, enum machine_mode
));
55 extern int local_dynamic_symbolic_operand
PARAMS ((rtx
, enum machine_mode
));
56 extern int initial_exec_symbolic_operand
PARAMS ((rtx
, enum machine_mode
));
57 extern int local_exec_symbolic_operand
PARAMS ((rtx
, enum machine_mode
));
58 extern int pic_symbolic_operand
PARAMS ((rtx
, enum machine_mode
));
59 extern int call_insn_operand
PARAMS ((rtx
, enum machine_mode
));
60 extern int constant_call_address_operand
PARAMS ((rtx
, enum machine_mode
));
61 extern int const0_operand
PARAMS ((rtx
, enum machine_mode
));
62 extern int const1_operand
PARAMS ((rtx
, enum machine_mode
));
63 extern int const248_operand
PARAMS ((rtx
, enum machine_mode
));
64 extern int incdec_operand
PARAMS ((rtx
, enum machine_mode
));
65 extern int reg_no_sp_operand
PARAMS ((rtx
, enum machine_mode
));
66 extern int mmx_reg_operand
PARAMS ((rtx
, enum machine_mode
));
67 extern int general_no_elim_operand
PARAMS ((rtx
, enum machine_mode
));
68 extern int nonmemory_no_elim_operand
PARAMS ((rtx
, enum machine_mode
));
69 extern int q_regs_operand
PARAMS ((rtx
, enum machine_mode
));
70 extern int non_q_regs_operand
PARAMS ((rtx
, enum machine_mode
));
71 extern int sse_comparison_operator
PARAMS ((rtx
, enum machine_mode
));
72 extern int fcmov_comparison_operator
PARAMS ((rtx
, enum machine_mode
));
73 extern int cmp_fp_expander_operand
PARAMS ((rtx
, enum machine_mode
));
74 extern int ix86_comparison_operator
PARAMS ((rtx
, enum machine_mode
));
75 extern int ext_register_operand
PARAMS ((rtx
, enum machine_mode
));
76 extern int binary_fp_operator
PARAMS ((rtx
, enum machine_mode
));
77 extern int mult_operator
PARAMS ((rtx
, enum machine_mode
));
78 extern int div_operator
PARAMS ((rtx
, enum machine_mode
));
79 extern int arith_or_logical_operator
PARAMS ((rtx
, enum machine_mode
));
80 extern int promotable_binary_operator
PARAMS ((rtx
, enum machine_mode
));
81 extern int memory_displacement_operand
PARAMS ((rtx
, enum machine_mode
));
82 extern int cmpsi_operand
PARAMS ((rtx
, enum machine_mode
));
83 extern int long_memory_operand
PARAMS ((rtx
, enum machine_mode
));
84 extern int aligned_operand
PARAMS ((rtx
, enum machine_mode
));
85 extern enum machine_mode ix86_cc_mode
PARAMS ((enum rtx_code
, rtx
, rtx
));
87 extern int ix86_expand_movstr
PARAMS ((rtx
, rtx
, rtx
, rtx
));
88 extern int ix86_expand_clrstr
PARAMS ((rtx
, rtx
, rtx
));
89 extern int ix86_expand_strlen
PARAMS ((rtx
, rtx
, rtx
, rtx
));
91 extern bool legitimate_constant_p
PARAMS ((rtx
));
92 extern bool constant_address_p
PARAMS ((rtx
));
93 extern bool legitimate_pic_operand_p
PARAMS ((rtx
));
94 extern int legitimate_pic_address_disp_p
PARAMS ((rtx
));
95 extern int legitimate_address_p
PARAMS ((enum machine_mode
, rtx
, int));
96 extern rtx legitimize_pic_address
PARAMS ((rtx
, rtx
));
97 extern rtx legitimize_address
PARAMS ((rtx
, rtx
, enum machine_mode
));
99 extern void print_reg
PARAMS ((rtx
, int, FILE*));
100 extern void print_operand
PARAMS ((FILE*, rtx
, int));
101 extern void print_operand_address
PARAMS ((FILE*, rtx
));
102 extern bool output_addr_const_extra
PARAMS ((FILE*, rtx
));
104 extern void split_di
PARAMS ((rtx
[], int, rtx
[], rtx
[]));
105 extern void split_ti
PARAMS ((rtx
[], int, rtx
[], rtx
[]));
107 extern const char *output_set_got
PARAMS ((rtx
));
108 extern const char *output_387_binary_op
PARAMS ((rtx
, rtx
*));
109 extern const char *output_fix_trunc
PARAMS ((rtx
, rtx
*));
110 extern const char *output_fp_compare
PARAMS ((rtx
, rtx
*, int, int));
112 extern void i386_dwarf_output_addr_const
PARAMS ((FILE*, rtx
));
113 extern rtx i386_simplify_dwarf_addr
PARAMS ((rtx
));
115 extern void ix86_expand_clear
PARAMS ((rtx
));
116 extern void ix86_expand_move
PARAMS ((enum machine_mode
, rtx
[]));
117 extern void ix86_expand_vector_move
PARAMS ((enum machine_mode
, rtx
[]));
118 extern void ix86_expand_binary_operator
PARAMS ((enum rtx_code
,
119 enum machine_mode
, rtx
[]));
120 extern int ix86_binary_operator_ok
PARAMS ((enum rtx_code
, enum machine_mode
,
122 extern void ix86_expand_unary_operator
PARAMS ((enum rtx_code
, enum machine_mode
,
124 extern int ix86_unary_operator_ok
PARAMS ((enum rtx_code
, enum machine_mode
,
126 extern int ix86_match_ccmode
PARAMS ((rtx
, enum machine_mode
));
127 extern rtx ix86_expand_compare
PARAMS ((enum rtx_code
, rtx
*, rtx
*));
128 extern int ix86_use_fcomi_compare
PARAMS ((enum rtx_code
));
129 extern void ix86_expand_branch
PARAMS ((enum rtx_code
, rtx
));
130 extern int ix86_expand_setcc
PARAMS ((enum rtx_code
, rtx
));
131 extern int ix86_expand_int_movcc
PARAMS ((rtx
[]));
132 extern int ix86_expand_fp_movcc
PARAMS ((rtx
[]));
133 extern void ix86_expand_call
PARAMS ((rtx
, rtx
, rtx
, rtx
, rtx
));
134 extern void x86_initialize_trampoline
PARAMS ((rtx
, rtx
, rtx
));
135 extern rtx ix86_zero_extend_to_Pmode
PARAMS ((rtx
));
136 extern void ix86_split_long_move
PARAMS ((rtx
[]));
137 extern void ix86_split_ashldi
PARAMS ((rtx
*, rtx
));
138 extern void ix86_split_ashrdi
PARAMS ((rtx
*, rtx
));
139 extern void ix86_split_lshrdi
PARAMS ((rtx
*, rtx
));
140 extern int ix86_address_cost
PARAMS ((rtx
));
141 extern rtx ix86_find_base_term
PARAMS ((rtx
));
143 extern rtx assign_386_stack_local
PARAMS ((enum machine_mode
, int));
144 extern int ix86_attr_length_immediate_default
PARAMS ((rtx
, int));
145 extern int ix86_attr_length_address_default
PARAMS ((rtx
));
147 extern enum machine_mode ix86_fp_compare_mode
PARAMS ((enum rtx_code
));
149 extern int x86_64_sign_extended_value
PARAMS ((rtx
));
150 extern int x86_64_zero_extended_value
PARAMS ((rtx
));
151 extern rtx ix86_libcall_value
PARAMS ((enum machine_mode
));
152 extern bool ix86_function_value_regno_p
PARAMS ((int));
153 extern bool ix86_function_arg_regno_p
PARAMS ((int));
154 extern int ix86_function_arg_boundary
PARAMS ((enum machine_mode
, tree
));
155 extern int ix86_return_in_memory
PARAMS ((tree
));
156 extern void ix86_va_start
PARAMS ((tree
, rtx
));
157 extern rtx ix86_va_arg
PARAMS ((tree
, tree
));
158 extern void ix86_setup_incoming_varargs
PARAMS ((CUMULATIVE_ARGS
*,
162 extern rtx ix86_force_to_memory
PARAMS ((enum machine_mode
, rtx
));
163 extern void ix86_free_from_memory
PARAMS ((enum machine_mode
));
164 extern void ix86_split_fp_branch
PARAMS ((enum rtx_code code
, rtx
,
165 rtx
, rtx
, rtx
, rtx
));
166 extern int ix86_hard_regno_mode_ok
PARAMS ((int, enum machine_mode
));
167 extern int ix86_register_move_cost
PARAMS ((enum machine_mode
, enum reg_class
,
169 extern int ix86_secondary_memory_needed
PARAMS ((enum reg_class
,
171 enum machine_mode
, int));
172 extern enum reg_class ix86_preferred_reload_class
PARAMS ((rtx
,
174 extern int ix86_memory_move_cost
PARAMS ((enum machine_mode
, enum reg_class
,
176 extern void ix86_set_move_mem_attrs
PARAMS ((rtx
, rtx
, rtx
, rtx
, rtx
));
177 extern void emit_i387_cw_initialization
PARAMS ((rtx
, rtx
));
178 extern bool ix86_fp_jump_nontrivial_p
PARAMS ((enum rtx_code
));
179 extern void x86_order_regs_for_local_alloc
PARAMS ((void));
183 extern void init_cumulative_args
PARAMS ((CUMULATIVE_ARGS
*, tree
, rtx
));
184 extern rtx function_arg
PARAMS ((CUMULATIVE_ARGS
*, enum machine_mode
, tree
, int));
185 extern void function_arg_advance
PARAMS ((CUMULATIVE_ARGS
*, enum machine_mode
,
187 extern rtx ix86_function_value
PARAMS ((tree
));
188 extern void ix86_init_builtins
PARAMS ((void));
189 extern rtx ix86_expand_builtin
PARAMS ((tree
, rtx
, rtx
, enum machine_mode
, int));
195 extern int ix86_return_pops_args
PARAMS ((tree
, tree
, int));
196 extern tree ix86_build_va_list
PARAMS ((void));
198 extern int ix86_data_alignment
PARAMS ((tree
, int));
199 extern int ix86_local_alignment
PARAMS ((tree
, int));
200 extern int ix86_constant_alignment
PARAMS ((tree
, int));
201 extern tree ix86_handle_dll_attribute
PARAMS ((tree
*, tree
, tree
, int, bool *));
202 extern tree ix86_handle_shared_attribute
PARAMS ((tree
*, tree
, tree
, int, bool *));
204 extern unsigned int i386_pe_section_type_flags
PARAMS ((tree
, const char *,
206 extern void i386_pe_asm_named_section
PARAMS ((const char *, unsigned int));
207 extern void x86_output_mi_thunk
PARAMS ((FILE *, int, tree
));
208 extern int x86_field_alignment
PARAMS ((tree
, int));
211 extern rtx ix86_tls_get_addr
PARAMS ((void));
212 extern void x86_machine_dependent_reorg
PARAMS ((rtx
));
215 extern void i386_pe_encode_section_info
PARAMS ((tree
, int));
216 extern const char *i386_pe_strip_name_encoding
PARAMS ((const char *));
217 extern const char *i386_pe_strip_name_encoding_full
PARAMS ((const char *));