]>
Commit | Line | Data |
---|---|---|
6baf1cc8 | 1 | /* Definitions of target machine for GNU compiler for IA-32. |
0e4970d7 RK |
2 | Copyright (C) 1988, 1992, 1994, 1995, 1996, 1996, 1997, 1998, 1999, |
3 | 2000, 2001 Free Software Foundation, Inc. | |
6baf1cc8 BS |
4 | |
5 | This file is part of GNU CC. | |
6 | ||
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. | |
11 | ||
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. | |
16 | ||
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. */ | |
21 | ||
22 | /* Functions in i386.c */ | |
f6da8bc3 | 23 | extern void override_options PARAMS ((void)); |
f6da8bc3 | 24 | extern void optimization_options PARAMS ((int, int)); |
6baf1cc8 | 25 | |
f6da8bc3 | 26 | extern int ix86_can_use_return_insn_p PARAMS ((void)); |
6fca22eb RH |
27 | extern int ix86_frame_pointer_required PARAMS ((void)); |
28 | extern void ix86_setup_frame_addresses PARAMS ((void)); | |
6baf1cc8 | 29 | |
4cf12e7e | 30 | extern void ix86_asm_file_end PARAMS ((FILE *)); |
f6da8bc3 | 31 | extern void load_pic_register PARAMS ((void)); |
0903fcab | 32 | extern HOST_WIDE_INT ix86_initial_elimination_offset PARAMS((int, int)); |
f6da8bc3 | 33 | extern void ix86_expand_prologue PARAMS ((void)); |
cbbf65e0 | 34 | extern void ix86_expand_epilogue PARAMS ((int)); |
6baf1cc8 | 35 | |
f6da8bc3 KG |
36 | extern void ix86_output_function_block_profiler PARAMS ((FILE *, int)); |
37 | extern void ix86_output_block_profiler PARAMS ((FILE *, int)); | |
6baf1cc8 BS |
38 | |
39 | #ifdef RTX_CODE | |
f6da8bc3 KG |
40 | extern int ix86_aligned_p PARAMS ((rtx)); |
41 | ||
42 | extern int standard_80387_constant_p PARAMS ((rtx)); | |
2b04e52b | 43 | extern int standard_sse_constant_p PARAMS ((rtx)); |
f6da8bc3 KG |
44 | extern int symbolic_reference_mentioned_p PARAMS ((rtx)); |
45 | ||
7dd4b4a3 JH |
46 | extern int x86_64_general_operand PARAMS ((rtx, enum machine_mode)); |
47 | extern int x86_64_szext_general_operand PARAMS ((rtx, enum machine_mode)); | |
48 | extern int x86_64_nonmemory_operand PARAMS ((rtx, enum machine_mode)); | |
49 | extern int x86_64_szext_nonmemory_operand PARAMS ((rtx, enum machine_mode)); | |
50 | extern int x86_64_immediate_operand PARAMS ((rtx, enum machine_mode)); | |
51 | extern int x86_64_zext_immediate_operand PARAMS ((rtx, enum machine_mode)); | |
8bad7136 | 52 | extern int const_int_1_operand PARAMS ((rtx, enum machine_mode)); |
f6da8bc3 KG |
53 | extern int symbolic_operand PARAMS ((rtx, enum machine_mode)); |
54 | extern int pic_symbolic_operand PARAMS ((rtx, enum machine_mode)); | |
55 | extern int call_insn_operand PARAMS ((rtx, enum machine_mode)); | |
f6da8bc3 KG |
56 | extern int constant_call_address_operand PARAMS ((rtx, enum machine_mode)); |
57 | extern int const0_operand PARAMS ((rtx, enum machine_mode)); | |
58 | extern int const1_operand PARAMS ((rtx, enum machine_mode)); | |
59 | extern int const248_operand PARAMS ((rtx, enum machine_mode)); | |
60 | extern int incdec_operand PARAMS ((rtx, enum machine_mode)); | |
61 | extern int reg_no_sp_operand PARAMS ((rtx, enum machine_mode)); | |
915119a5 | 62 | extern int mmx_reg_operand PARAMS ((rtx, enum machine_mode)); |
2c5a510c RH |
63 | extern int general_no_elim_operand PARAMS ((rtx, enum machine_mode)); |
64 | extern int nonmemory_no_elim_operand PARAMS ((rtx, enum machine_mode)); | |
f6da8bc3 KG |
65 | extern int q_regs_operand PARAMS ((rtx, enum machine_mode)); |
66 | extern int non_q_regs_operand PARAMS ((rtx, enum machine_mode)); | |
915119a5 | 67 | extern int sse_comparison_operator PARAMS ((rtx, enum machine_mode)); |
f6da8bc3 KG |
68 | extern int fcmov_comparison_operator PARAMS ((rtx, enum machine_mode)); |
69 | extern int cmp_fp_expander_operand PARAMS ((rtx, enum machine_mode)); | |
9076b9c1 | 70 | extern int ix86_comparison_operator PARAMS ((rtx, enum machine_mode)); |
f6da8bc3 KG |
71 | extern int ext_register_operand PARAMS ((rtx, enum machine_mode)); |
72 | extern int binary_fp_operator PARAMS ((rtx, enum machine_mode)); | |
73 | extern int mult_operator PARAMS ((rtx, enum machine_mode)); | |
74 | extern int div_operator PARAMS ((rtx, enum machine_mode)); | |
75 | extern int arith_or_logical_operator PARAMS ((rtx, enum machine_mode)); | |
76 | extern int promotable_binary_operator PARAMS ((rtx, enum machine_mode)); | |
77 | extern int memory_displacement_operand PARAMS ((rtx, enum machine_mode)); | |
78 | extern int cmpsi_operand PARAMS ((rtx, enum machine_mode)); | |
79 | extern int long_memory_operand PARAMS ((rtx, enum machine_mode)); | |
2247f6ed | 80 | extern int aligned_operand PARAMS ((rtx, enum machine_mode)); |
9076b9c1 | 81 | extern enum machine_mode ix86_cc_mode PARAMS ((enum rtx_code, rtx, rtx)); |
f6da8bc3 | 82 | |
0945b39d JH |
83 | extern int ix86_expand_movstr PARAMS ((rtx, rtx, rtx, rtx)); |
84 | extern int ix86_expand_clrstr PARAMS ((rtx, rtx, rtx)); | |
85 | extern int ix86_expand_strlen PARAMS ((rtx, rtx, rtx, rtx)); | |
f6da8bc3 KG |
86 | |
87 | extern int legitimate_pic_address_disp_p PARAMS ((rtx)); | |
88 | extern int legitimate_address_p PARAMS ((enum machine_mode, rtx, int)); | |
89 | extern rtx legitimize_pic_address PARAMS ((rtx, rtx)); | |
90 | extern rtx legitimize_address PARAMS ((rtx, rtx, enum machine_mode)); | |
91 | ||
92 | extern void print_reg PARAMS ((rtx, int, FILE*)); | |
93 | extern void print_operand PARAMS ((FILE*, rtx, int)); | |
94 | extern void print_operand_address PARAMS ((FILE*, rtx)); | |
95 | ||
96 | extern void split_di PARAMS ((rtx[], int, rtx[], rtx[])); | |
97 | ||
98 | extern const char *output_387_binary_op PARAMS ((rtx, rtx*)); | |
99 | extern const char *output_fix_trunc PARAMS ((rtx, rtx*)); | |
100 | extern const char *output_fp_compare PARAMS ((rtx, rtx*, int, int)); | |
101 | ||
1865dbb5 JM |
102 | extern void i386_dwarf_output_addr_const PARAMS ((FILE*, rtx)); |
103 | extern rtx i386_simplify_dwarf_addr PARAMS ((rtx)); | |
104 | ||
f6da8bc3 KG |
105 | extern void ix86_expand_move PARAMS ((enum machine_mode, rtx[])); |
106 | extern void ix86_expand_binary_operator PARAMS ((enum rtx_code, | |
6baf1cc8 | 107 | enum machine_mode, rtx[])); |
f6da8bc3 | 108 | extern int ix86_binary_operator_ok PARAMS ((enum rtx_code, enum machine_mode, |
6baf1cc8 | 109 | rtx[])); |
f6da8bc3 | 110 | extern void ix86_expand_unary_operator PARAMS ((enum rtx_code, enum machine_mode, |
9d81fc27 | 111 | rtx[])); |
f6da8bc3 | 112 | extern int ix86_unary_operator_ok PARAMS ((enum rtx_code, enum machine_mode, |
6baf1cc8 | 113 | rtx[])); |
16189740 | 114 | extern int ix86_match_ccmode PARAMS ((rtx, enum machine_mode)); |
a1b8572c | 115 | extern rtx ix86_expand_compare PARAMS ((enum rtx_code, rtx *, rtx *)); |
a940d8bd | 116 | extern int ix86_use_fcomi_compare PARAMS ((enum rtx_code)); |
3a3677ff RH |
117 | extern void ix86_expand_branch PARAMS ((enum rtx_code, rtx)); |
118 | extern int ix86_expand_setcc PARAMS ((enum rtx_code, rtx)); | |
f6da8bc3 KG |
119 | extern int ix86_expand_int_movcc PARAMS ((rtx[])); |
120 | extern int ix86_expand_fp_movcc PARAMS ((rtx[])); | |
39d04363 | 121 | extern void x86_initialize_trampoline PARAMS ((rtx, rtx, rtx)); |
26e5b205 | 122 | extern void ix86_split_long_move PARAMS ((rtx[])); |
f6da8bc3 KG |
123 | extern void ix86_split_ashldi PARAMS ((rtx *, rtx)); |
124 | extern void ix86_split_ashrdi PARAMS ((rtx *, rtx)); | |
125 | extern void ix86_split_lshrdi PARAMS ((rtx *, rtx)); | |
01329426 | 126 | extern int ix86_address_cost PARAMS ((rtx)); |
b949ea8b | 127 | extern rtx ix86_find_base_term PARAMS ((rtx)); |
f6da8bc3 KG |
128 | |
129 | extern rtx assign_386_stack_local PARAMS ((enum machine_mode, int)); | |
6ef67412 JH |
130 | extern int ix86_attr_length_immediate_default PARAMS ((rtx, int)); |
131 | extern int ix86_attr_length_address_default PARAMS ((rtx)); | |
f6da8bc3 KG |
132 | |
133 | extern int ix86_issue_rate PARAMS ((void)); | |
134 | extern int ix86_adjust_cost PARAMS ((rtx, rtx, rtx, int)); | |
135 | extern void ix86_sched_init PARAMS ((FILE *, int)); | |
136 | extern int ix86_sched_reorder PARAMS ((FILE *, int, rtx *, int, int)); | |
137 | extern int ix86_variable_issue PARAMS ((FILE *, int, rtx, int)); | |
b1cdafbb | 138 | extern enum machine_mode ix86_fp_compare_mode PARAMS ((enum rtx_code)); |
6baf1cc8 | 139 | |
fa9f36a1 JH |
140 | extern int x86_64_sign_extended_value PARAMS ((rtx)); |
141 | extern int x86_64_zero_extended_value PARAMS ((rtx)); | |
142 | ||
4211a8fb JH |
143 | extern rtx ix86_force_to_memory PARAMS ((enum machine_mode, rtx)); |
144 | extern void ix86_free_from_memory PARAMS ((enum machine_mode)); | |
9e7adcb3 | 145 | extern void ix86_split_fp_branch PARAMS ((rtx, rtx, rtx, rtx, rtx, rtx)); |
a946dd00 | 146 | extern int ix86_hard_regno_mode_ok PARAMS ((int, enum machine_mode)); |
c26a370f | 147 | extern int ix86_register_move_cost PARAMS ((enum machine_mode, enum reg_class, |
e76d65d2 JH |
148 | enum reg_class)); |
149 | extern int ix86_secondary_memory_needed PARAMS ((enum reg_class, | |
150 | enum reg_class, | |
151 | enum machine_mode, int)); | |
152 | extern enum reg_class ix86_preferred_reload_class PARAMS ((rtx, | |
153 | enum reg_class)); | |
fa79946e JH |
154 | extern int ix86_memory_move_cost PARAMS ((enum machine_mode, enum reg_class, |
155 | int)); | |
397be6cf | 156 | extern void ix86_set_move_mem_attrs PARAMS ((rtx, rtx, rtx, rtx, rtx)); |
7a2e09f4 | 157 | extern void emit_i387_cw_initialization PARAMS ((rtx, rtx)); |
397be6cf | 158 | |
4211a8fb | 159 | |
6baf1cc8 | 160 | #ifdef TREE_CODE |
f6da8bc3 KG |
161 | extern void init_cumulative_args PARAMS ((CUMULATIVE_ARGS *, tree, rtx)); |
162 | extern rtx function_arg PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, tree, int)); | |
163 | extern void function_arg_advance PARAMS ((CUMULATIVE_ARGS *, enum machine_mode, | |
6baf1cc8 | 164 | tree, int)); |
bd793c65 BS |
165 | extern void ix86_init_builtins PARAMS ((void)); |
166 | extern rtx ix86_expand_builtin PARAMS ((tree, rtx, rtx, enum machine_mode, int)); | |
6baf1cc8 BS |
167 | #endif |
168 | ||
169 | #endif | |
170 | ||
171 | #ifdef TREE_CODE | |
f6da8bc3 | 172 | extern int ix86_return_pops_args PARAMS ((tree, tree, int)); |
a7180f70 BS |
173 | |
174 | extern int ix86_data_alignment PARAMS ((tree, int)); | |
175 | extern int ix86_local_alignment PARAMS ((tree, int)); | |
176 | extern int ix86_constant_alignment PARAMS ((tree, int)); | |
9959db6d | 177 | extern int ix86_valid_type_attribute_p PARAMS ((tree, tree, tree, tree)); |
f5f4be42 NB |
178 | extern int i386_pe_valid_decl_attribute_p PARAMS ((tree, tree, tree, tree)); |
179 | extern int i386_pe_valid_type_attribute_p PARAMS ((tree, tree, tree, tree)); | |
6baf1cc8 | 180 | #endif |