]>
Commit | Line | Data |
---|---|---|
e8bbfc4e | 1 | /* Definitions for code generation pass of GNU compiler. |
ef58a523 JL |
2 | Copyright (C) 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, |
3 | 1999, 2000 Free Software Foundation, Inc. | |
e8bbfc4e RK |
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 | |
940d9d63 RK |
19 | the Free Software Foundation, 59 Temple Place - Suite 330, |
20 | Boston, MA 02111-1307, USA. */ | |
e8bbfc4e | 21 | |
e8bbfc4e RK |
22 | /* The default branch cost is 1. */ |
23 | #ifndef BRANCH_COST | |
24 | #define BRANCH_COST 1 | |
25 | #endif | |
26 | ||
27 | /* Macros to access the slots of a QUEUED rtx. | |
28 | Here rather than in rtl.h because only the expansion pass | |
29 | should ever encounter a QUEUED. */ | |
30 | ||
31 | /* The variable for which an increment is queued. */ | |
32 | #define QUEUED_VAR(P) XEXP (P, 0) | |
33 | /* If the increment has been emitted, this is the insn | |
41b083c4 R |
34 | that does the increment. It is zero before the increment is emitted. |
35 | If more than one insn is emitted, this is the first insn. */ | |
e8bbfc4e RK |
36 | #define QUEUED_INSN(P) XEXP (P, 1) |
37 | /* If a pre-increment copy has been generated, this is the copy | |
38 | (it is a temporary reg). Zero if no copy made yet. */ | |
39 | #define QUEUED_COPY(P) XEXP (P, 2) | |
40 | /* This is the body to use for the insn to do the increment. | |
41 | It is used to emit the increment. */ | |
42 | #define QUEUED_BODY(P) XEXP (P, 3) | |
43 | /* Next QUEUED in the queue. */ | |
44 | #define QUEUED_NEXT(P) XEXP (P, 4) | |
45 | ||
46 | /* This is the 4th arg to `expand_expr'. | |
47 | EXPAND_SUM means it is ok to return a PLUS rtx or MULT rtx. | |
48 | EXPAND_INITIALIZER is similar but also record any labels on forced_labels. | |
49 | EXPAND_CONST_ADDRESS means it is ok to return a MEM whose address | |
99b5da08 RK |
50 | is a constant that is not a legitimate address. |
51 | EXPAND_MEMORY_USE_* are explained below. */ | |
e8bbfc4e | 52 | enum expand_modifier {EXPAND_NORMAL, EXPAND_SUM, |
99b5da08 RK |
53 | EXPAND_CONST_ADDRESS, EXPAND_INITIALIZER, |
54 | EXPAND_MEMORY_USE_WO, EXPAND_MEMORY_USE_RW, | |
55 | EXPAND_MEMORY_USE_BAD, EXPAND_MEMORY_USE_DONT}; | |
56 | ||
57 | /* Argument for chkr_* functions. | |
58 | MEMORY_USE_RO: the pointer reads memory. | |
59 | MEMORY_USE_WO: the pointer writes to memory. | |
60 | MEMORY_USE_RW: the pointer modifies memory (ie it reads and writes). An | |
61 | example is (*ptr)++ | |
62 | MEMORY_USE_BAD: use this if you don't know the behavior of the pointer, or | |
63 | if you know there are no pointers. Using an INDIRECT_REF | |
64 | with MEMORY_USE_BAD will abort. | |
65 | MEMORY_USE_TW: just test for writing, without update. Special. | |
66 | MEMORY_USE_DONT: the memory is neither read nor written. This is used by | |
67 | '->' and '.'. */ | |
68 | enum memory_use_mode {MEMORY_USE_BAD = 0, MEMORY_USE_RO = 1, | |
69 | MEMORY_USE_WO = 2, MEMORY_USE_RW = 3, | |
70 | MEMORY_USE_TW = 6, MEMORY_USE_DONT = 99}; | |
e8bbfc4e | 71 | |
5c7a310f MM |
72 | /* Prevent the compiler from deferring stack pops. See |
73 | inhibit_defer_pop for more information. */ | |
74 | #define NO_DEFER_POP (inhibit_defer_pop += 1) | |
75 | ||
76 | /* Allow the compiler to defer stack pops. See inhibit_defer_pop for | |
77 | more information. */ | |
78 | #define OK_DEFER_POP (inhibit_defer_pop -= 1) | |
e8bbfc4e RK |
79 | \f |
80 | #ifdef TREE_CODE /* Don't lose if tree.h not included. */ | |
81 | /* Structure to record the size of a sequence of arguments | |
fed3cef0 RK |
82 | as the sum of a tree-expression and a constant. This structure is |
83 | also used to store offsets from the stack, which might be negative, | |
84 | so the variable part must be ssizetype, not sizetype. */ | |
e8bbfc4e RK |
85 | |
86 | struct args_size | |
87 | { | |
e5e809f4 | 88 | HOST_WIDE_INT constant; |
e8bbfc4e RK |
89 | tree var; |
90 | }; | |
91 | #endif | |
92 | ||
93 | /* Add the value of the tree INC to the `struct args_size' TO. */ | |
94 | ||
95 | #define ADD_PARM_SIZE(TO, INC) \ | |
96 | { tree inc = (INC); \ | |
3bdf5ad1 RK |
97 | if (host_integerp (inc, 0)) \ |
98 | (TO).constant += tree_low_cst (inc, 0); \ | |
e8bbfc4e RK |
99 | else if ((TO).var == 0) \ |
100 | (TO).var = inc; \ | |
101 | else \ | |
102 | (TO).var = size_binop (PLUS_EXPR, (TO).var, inc); } | |
103 | ||
104 | #define SUB_PARM_SIZE(TO, DEC) \ | |
105 | { tree dec = (DEC); \ | |
3bdf5ad1 RK |
106 | if (host_integerp (dec, 0)) \ |
107 | (TO).constant -= tree_low_cst (dec, 0); \ | |
e8bbfc4e | 108 | else if ((TO).var == 0) \ |
fed3cef0 | 109 | (TO).var = size_binop (MINUS_EXPR, ssize_int (0), dec); \ |
e8bbfc4e RK |
110 | else \ |
111 | (TO).var = size_binop (MINUS_EXPR, (TO).var, dec); } | |
112 | ||
fed3cef0 RK |
113 | /* Convert the implicit sum in a `struct args_size' into a tree |
114 | of type ssizetype. */ | |
115 | #define ARGS_SIZE_TREE(SIZE) \ | |
116 | ((SIZE).var == 0 ? ssize_int ((SIZE).constant) \ | |
117 | : size_binop (PLUS_EXPR, (SIZE).var, ssize_int ((SIZE).constant))) | |
118 | ||
e8bbfc4e | 119 | /* Convert the implicit sum in a `struct args_size' into an rtx. */ |
fed3cef0 RK |
120 | #define ARGS_SIZE_RTX(SIZE) \ |
121 | ((SIZE).var == 0 ? GEN_INT ((SIZE).constant) \ | |
122 | : expand_expr (ARGS_SIZE_TREE (SIZE), NULL_RTX, VOIDmode, \ | |
123 | EXPAND_MEMORY_USE_BAD)) | |
e8bbfc4e RK |
124 | |
125 | /* Supply a default definition for FUNCTION_ARG_PADDING: | |
355b2097 | 126 | usually pad upward, but pad short args downward on |
e8bbfc4e RK |
127 | big-endian machines. */ |
128 | ||
129 | enum direction {none, upward, downward}; /* Value has this type. */ | |
130 | ||
131 | #ifndef FUNCTION_ARG_PADDING | |
e8bbfc4e | 132 | #define FUNCTION_ARG_PADDING(MODE, TYPE) \ |
f76b9db2 ILT |
133 | (! BYTES_BIG_ENDIAN \ |
134 | ? upward \ | |
135 | : (((MODE) == BLKmode \ | |
136 | ? ((TYPE) && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \ | |
137 | && int_size_in_bytes (TYPE) < (PARM_BOUNDARY / BITS_PER_UNIT)) \ | |
138 | : GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY) \ | |
139 | ? downward : upward)) | |
e8bbfc4e RK |
140 | #endif |
141 | ||
142 | /* Supply a default definition for FUNCTION_ARG_BOUNDARY. Normally, we let | |
143 | FUNCTION_ARG_PADDING, which also pads the length, handle any needed | |
144 | alignment. */ | |
145 | ||
146 | #ifndef FUNCTION_ARG_BOUNDARY | |
147 | #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) PARM_BOUNDARY | |
148 | #endif | |
149 | ||
e5e809f4 JL |
150 | /* Provide a default value for STRICT_ARGUMENT_NAMING. */ |
151 | #ifndef STRICT_ARGUMENT_NAMING | |
152 | #define STRICT_ARGUMENT_NAMING 0 | |
153 | #endif | |
154 | ||
9ab70a9b R |
155 | /* Provide a default value for PRETEND_OUTGOING_VARARGS_NAMED. */ |
156 | #ifdef SETUP_INCOMING_VARARGS | |
157 | #ifndef PRETEND_OUTGOING_VARARGS_NAMED | |
158 | #define PRETEND_OUTGOING_VARARGS_NAMED 1 | |
159 | #endif | |
160 | #else | |
161 | /* It is an error to define PRETEND_OUTGOING_VARARGS_NAMED without | |
162 | defining SETUP_INCOMING_VARARGS. */ | |
163 | #define PRETEND_OUTGOING_VARARGS_NAMED 0 | |
164 | #endif | |
165 | ||
e8bbfc4e RK |
166 | /* Nonzero if we do not know how to pass TYPE solely in registers. |
167 | We cannot do so in the following cases: | |
168 | ||
169 | - if the type has variable size | |
170 | - if the type is marked as addressable (it is required to be constructed | |
171 | into the stack) | |
172 | - if the padding and mode of the type is such that a copy into a register | |
e7cf2d7e RK |
173 | would put it into the wrong part of the register. |
174 | ||
14a8d078 | 175 | Which padding can't be supported depends on the byte endianness. |
e8bbfc4e | 176 | |
e7cf2d7e | 177 | A value in a register is implicitly padded at the most significant end. |
e8bbfc4e RK |
178 | On a big-endian machine, that is the lower end in memory. |
179 | So a value padded in memory at the upper end can't go in a register. | |
180 | For a little-endian machine, the reverse is true. */ | |
181 | ||
d9a4ee00 | 182 | #ifndef MUST_PASS_IN_STACK |
e8bbfc4e RK |
183 | #define MUST_PASS_IN_STACK(MODE,TYPE) \ |
184 | ((TYPE) != 0 \ | |
185 | && (TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST \ | |
186 | || TREE_ADDRESSABLE (TYPE) \ | |
187 | || ((MODE) == BLKmode \ | |
6fb713ce RK |
188 | && ! ((TYPE) != 0 && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \ |
189 | && 0 == (int_size_in_bytes (TYPE) \ | |
190 | % (PARM_BOUNDARY / BITS_PER_UNIT))) \ | |
e8bbfc4e | 191 | && (FUNCTION_ARG_PADDING (MODE, TYPE) \ |
f76b9db2 | 192 | == (BYTES_BIG_ENDIAN ? upward : downward))))) |
d9a4ee00 | 193 | #endif |
e8bbfc4e | 194 | |
e14fa9c4 | 195 | /* Nonzero if type TYPE should be returned in memory. |
e8bbfc4e RK |
196 | Most machines can use the following default definition. */ |
197 | ||
198 | #ifndef RETURN_IN_MEMORY | |
e14fa9c4 | 199 | #define RETURN_IN_MEMORY(TYPE) (TYPE_MODE (TYPE) == BLKmode) |
e8bbfc4e | 200 | #endif |
f7761c9a | 201 | |
a260abc9 DE |
202 | /* Supply a default definition of STACK_SAVEAREA_MODE for emit_stack_save. |
203 | Normally move_insn, so Pmode stack pointer. */ | |
204 | ||
205 | #ifndef STACK_SAVEAREA_MODE | |
206 | #define STACK_SAVEAREA_MODE(LEVEL) Pmode | |
207 | #endif | |
208 | ||
39403d82 DE |
209 | /* Supply a default definition of STACK_SIZE_MODE for |
210 | allocate_dynamic_stack_space. Normally PLUS/MINUS, so word_mode. */ | |
211 | ||
212 | #ifndef STACK_SIZE_MODE | |
213 | #define STACK_SIZE_MODE word_mode | |
214 | #endif | |
215 | ||
f7761c9a RK |
216 | /* Provide default values for the macros controlling stack checking. */ |
217 | ||
218 | #ifndef STACK_CHECK_BUILTIN | |
219 | #define STACK_CHECK_BUILTIN 0 | |
220 | #endif | |
221 | ||
222 | /* The default interval is one page. */ | |
223 | #ifndef STACK_CHECK_PROBE_INTERVAL | |
224 | #define STACK_CHECK_PROBE_INTERVAL 4096 | |
225 | #endif | |
226 | ||
227 | /* The default is to do a store into the stack. */ | |
228 | #ifndef STACK_CHECK_PROBE_LOAD | |
229 | #define STACK_CHECK_PROBE_LOAD 0 | |
230 | #endif | |
231 | ||
232 | /* This value is arbitrary, but should be sufficient for most machines. */ | |
233 | #ifndef STACK_CHECK_PROTECT | |
234 | #define STACK_CHECK_PROTECT (75 * UNITS_PER_WORD) | |
235 | #endif | |
236 | ||
237 | /* Make the maximum frame size be the largest we can and still only need | |
238 | one probe per function. */ | |
239 | #ifndef STACK_CHECK_MAX_FRAME_SIZE | |
240 | #define STACK_CHECK_MAX_FRAME_SIZE \ | |
241 | (STACK_CHECK_PROBE_INTERVAL - UNITS_PER_WORD) | |
242 | #endif | |
243 | ||
244 | /* This is arbitrary, but should be large enough everywhere. */ | |
245 | #ifndef STACK_CHECK_FIXED_FRAME_SIZE | |
246 | #define STACK_CHECK_FIXED_FRAME_SIZE (4 * UNITS_PER_WORD) | |
247 | #endif | |
248 | ||
249 | /* Provide a reasonable default for the maximum size of an object to | |
250 | allocate in the fixed frame. We may need to be able to make this | |
251 | controllable by the user at some point. */ | |
252 | #ifndef STACK_CHECK_MAX_VAR_SIZE | |
253 | #define STACK_CHECK_MAX_VAR_SIZE (STACK_CHECK_MAX_FRAME_SIZE / 100) | |
254 | #endif | |
e8bbfc4e RK |
255 | \f |
256 | /* Optabs are tables saying how to generate insn bodies | |
257 | for various machine modes and numbers of operands. | |
258 | Each optab applies to one operation. | |
259 | For example, add_optab applies to addition. | |
260 | ||
261 | The insn_code slot is the enum insn_code that says how to | |
262 | generate an insn for this operation on a particular machine mode. | |
263 | It is CODE_FOR_nothing if there is no such insn on the target machine. | |
264 | ||
265 | The `lib_call' slot is the name of the library function that | |
266 | can be used to perform the operation. | |
267 | ||
268 | A few optabs, such as move_optab and cmp_optab, are used | |
269 | by special code. */ | |
270 | ||
271 | /* Everything that uses expr.h needs to define enum insn_code | |
272 | but we don't list it in the Makefile dependencies just for that. */ | |
273 | #include "insn-codes.h" | |
274 | ||
275 | typedef struct optab | |
276 | { | |
277 | enum rtx_code code; | |
278 | struct { | |
279 | enum insn_code insn_code; | |
280 | rtx libfunc; | |
281 | } handlers [NUM_MACHINE_MODES]; | |
282 | } * optab; | |
283 | ||
284 | /* Given an enum insn_code, access the function to construct | |
285 | the body of that kind of insn. */ | |
286 | #ifdef FUNCTION_CONVERSION_BUG | |
287 | /* Some compilers fail to convert a function properly to a | |
288 | pointer-to-function when used as an argument. | |
289 | So produce the pointer-to-function directly. | |
290 | Luckily, these compilers seem to work properly when you | |
291 | call the pointer-to-function. */ | |
a995e389 | 292 | #define GEN_FCN(CODE) (insn_data[(int) (CODE)].genfun) |
e8bbfc4e | 293 | #else |
a995e389 | 294 | #define GEN_FCN(CODE) (*insn_data[(int) (CODE)].genfun) |
e8bbfc4e RK |
295 | #endif |
296 | ||
34220a12 BS |
297 | /* Enumeration of valid indexes into optab_table. */ |
298 | enum optab_index | |
299 | { | |
300 | OTI_add, | |
301 | OTI_sub, | |
302 | ||
303 | /* Signed and fp multiply */ | |
304 | OTI_smul, | |
305 | /* Signed multiply, return high word */ | |
306 | OTI_smul_highpart, | |
307 | OTI_umul_highpart, | |
308 | /* Signed multiply with result one machine mode wider than args */ | |
309 | OTI_smul_widen, | |
310 | OTI_umul_widen, | |
311 | ||
312 | /* Signed divide */ | |
313 | OTI_sdiv, | |
314 | /* Signed divide-and-remainder in one */ | |
315 | OTI_sdivmod, | |
316 | OTI_udiv, | |
317 | OTI_udivmod, | |
318 | /* Signed remainder */ | |
319 | OTI_smod, | |
320 | OTI_umod, | |
321 | /* Optab for floating divide. */ | |
322 | OTI_flodiv, | |
323 | /* Convert float to integer in float fmt */ | |
324 | OTI_ftrunc, | |
325 | ||
326 | /* Logical and */ | |
327 | OTI_and, | |
328 | /* Logical or */ | |
329 | OTI_ior, | |
330 | /* Logical xor */ | |
331 | OTI_xor, | |
332 | ||
333 | /* Arithmetic shift left */ | |
334 | OTI_ashl, | |
335 | /* Logical shift right */ | |
336 | OTI_lshr, | |
337 | /* Arithmetic shift right */ | |
338 | OTI_ashr, | |
339 | /* Rotate left */ | |
340 | OTI_rotl, | |
341 | /* Rotate right */ | |
342 | OTI_rotr, | |
343 | /* Signed and floating-point minimum value */ | |
344 | OTI_smin, | |
345 | /* Signed and floating-point maximum value */ | |
346 | OTI_smax, | |
347 | /* Unsigned minimum value */ | |
348 | OTI_umin, | |
349 | /* Unsigned maximum value */ | |
350 | OTI_umax, | |
351 | ||
352 | /* Move instruction. */ | |
353 | OTI_mov, | |
354 | /* Move, preserving high part of register. */ | |
355 | OTI_movstrict, | |
356 | ||
357 | /* Unary operations */ | |
358 | /* Negation */ | |
359 | OTI_neg, | |
360 | /* Abs value */ | |
361 | OTI_abs, | |
362 | /* Bitwise not */ | |
363 | OTI_one_cmpl, | |
364 | /* Find first bit set */ | |
365 | OTI_ffs, | |
366 | /* Square root */ | |
367 | OTI_sqrt, | |
368 | /* Sine */ | |
369 | OTI_sin, | |
370 | /* Cosine */ | |
371 | OTI_cos, | |
372 | ||
373 | /* Compare insn; two operands. */ | |
374 | OTI_cmp, | |
375 | /* Used only for libcalls for unsigned comparisons. */ | |
376 | OTI_ucmp, | |
377 | /* tst insn; compare one operand against 0 */ | |
378 | OTI_tst, | |
379 | ||
380 | /* String length */ | |
381 | OTI_strlen, | |
382 | ||
1c0290ea BS |
383 | /* Combined compare & jump/store flags/move operations. */ |
384 | OTI_cbranch, | |
385 | OTI_cmov, | |
386 | OTI_cstore, | |
387 | ||
34220a12 BS |
388 | OTI_MAX |
389 | }; | |
390 | ||
391 | extern optab optab_table[OTI_MAX]; | |
392 | ||
393 | #define add_optab (optab_table[OTI_add]) | |
394 | #define sub_optab (optab_table[OTI_sub]) | |
395 | #define smul_optab (optab_table[OTI_smul]) | |
396 | #define smul_highpart_optab (optab_table[OTI_smul_highpart]) | |
397 | #define umul_highpart_optab (optab_table[OTI_umul_highpart]) | |
398 | #define smul_widen_optab (optab_table[OTI_smul_widen]) | |
399 | #define umul_widen_optab (optab_table[OTI_umul_widen]) | |
400 | #define sdiv_optab (optab_table[OTI_sdiv]) | |
401 | #define sdivmod_optab (optab_table[OTI_sdivmod]) | |
402 | #define udiv_optab (optab_table[OTI_udiv]) | |
403 | #define udivmod_optab (optab_table[OTI_udivmod]) | |
404 | #define smod_optab (optab_table[OTI_smod]) | |
405 | #define umod_optab (optab_table[OTI_umod]) | |
406 | #define flodiv_optab (optab_table[OTI_flodiv]) | |
407 | #define ftrunc_optab (optab_table[OTI_ftrunc]) | |
408 | #define and_optab (optab_table[OTI_and]) | |
409 | #define ior_optab (optab_table[OTI_ior]) | |
410 | #define xor_optab (optab_table[OTI_xor]) | |
411 | #define ashl_optab (optab_table[OTI_ashl]) | |
412 | #define lshr_optab (optab_table[OTI_lshr]) | |
413 | #define ashr_optab (optab_table[OTI_ashr]) | |
414 | #define rotl_optab (optab_table[OTI_rotl]) | |
415 | #define rotr_optab (optab_table[OTI_rotr]) | |
416 | #define smin_optab (optab_table[OTI_smin]) | |
417 | #define smax_optab (optab_table[OTI_smax]) | |
418 | #define umin_optab (optab_table[OTI_umin]) | |
419 | #define umax_optab (optab_table[OTI_umax]) | |
420 | ||
421 | #define mov_optab (optab_table[OTI_mov]) | |
422 | #define movstrict_optab (optab_table[OTI_movstrict]) | |
423 | ||
424 | #define neg_optab (optab_table[OTI_neg]) | |
425 | #define abs_optab (optab_table[OTI_abs]) | |
426 | #define one_cmpl_optab (optab_table[OTI_one_cmpl]) | |
427 | #define ffs_optab (optab_table[OTI_ffs]) | |
428 | #define sqrt_optab (optab_table[OTI_sqrt]) | |
429 | #define sin_optab (optab_table[OTI_sin]) | |
430 | #define cos_optab (optab_table[OTI_cos]) | |
431 | ||
432 | #define cmp_optab (optab_table[OTI_cmp]) | |
433 | #define ucmp_optab (optab_table[OTI_ucmp]) | |
434 | #define tst_optab (optab_table[OTI_tst]) | |
435 | ||
436 | #define strlen_optab (optab_table[OTI_strlen]) | |
e8bbfc4e | 437 | |
1c0290ea BS |
438 | #define cbranch_optab (optab_table[OTI_cbranch]) |
439 | #define cmov_optab (optab_table[OTI_cmov]) | |
440 | #define cstore_optab (optab_table[OTI_cstore]) | |
441 | ||
27b3f754 RK |
442 | /* Tables of patterns for extending one integer mode to another. */ |
443 | extern enum insn_code extendtab[MAX_MACHINE_MODE][MAX_MACHINE_MODE][2]; | |
444 | ||
445 | /* Tables of patterns for converting between fixed and floating point. */ | |
446 | extern enum insn_code fixtab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2]; | |
447 | extern enum insn_code fixtrunctab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2]; | |
448 | extern enum insn_code floattab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2]; | |
449 | ||
9c951f80 RK |
450 | /* Contains the optab used for each rtx code. */ |
451 | extern optab code_to_optab[NUM_RTX_CODE + 1]; | |
452 | ||
e8bbfc4e RK |
453 | /* Passed to expand_binop and expand_unop to say which options to try to use |
454 | if the requested operation can't be open-coded on the requisite mode. | |
455 | Either OPTAB_LIB or OPTAB_LIB_WIDEN says try using a library call. | |
456 | Either OPTAB_WIDEN or OPTAB_LIB_WIDEN says try using a wider mode. | |
457 | OPTAB_MUST_WIDEN says try widening and don't try anything else. */ | |
458 | ||
459 | enum optab_methods | |
460 | { | |
461 | OPTAB_DIRECT, | |
462 | OPTAB_LIB, | |
463 | OPTAB_WIDEN, | |
464 | OPTAB_LIB_WIDEN, | |
465 | OPTAB_MUST_WIDEN | |
466 | }; | |
467 | ||
34220a12 BS |
468 | /* Enumeration of indexes into libfunc_table. */ |
469 | enum libfunc_index | |
470 | { | |
471 | LTI_extendsfdf2, | |
472 | LTI_extendsfxf2, | |
473 | LTI_extendsftf2, | |
474 | LTI_extenddfxf2, | |
475 | LTI_extenddftf2, | |
476 | ||
477 | LTI_truncdfsf2, | |
478 | LTI_truncxfsf2, | |
479 | LTI_trunctfsf2, | |
480 | LTI_truncxfdf2, | |
481 | LTI_trunctfdf2, | |
482 | ||
483 | LTI_memcpy, | |
484 | LTI_bcopy, | |
485 | LTI_memcmp, | |
486 | LTI_bcmp, | |
487 | LTI_memset, | |
488 | LTI_bzero, | |
489 | ||
490 | LTI_throw, | |
491 | LTI_rethrow, | |
492 | LTI_sjthrow, | |
493 | LTI_sjpopnthrow, | |
494 | LTI_terminate, | |
495 | LTI_setjmp, | |
496 | LTI_longjmp, | |
497 | LTI_eh_rtime_match, | |
498 | ||
499 | LTI_eqhf2, | |
500 | LTI_nehf2, | |
501 | LTI_gthf2, | |
502 | LTI_gehf2, | |
503 | LTI_lthf2, | |
504 | LTI_lehf2, | |
1eb8759b | 505 | LTI_unordhf2, |
34220a12 BS |
506 | |
507 | LTI_eqsf2, | |
508 | LTI_nesf2, | |
509 | LTI_gtsf2, | |
510 | LTI_gesf2, | |
511 | LTI_ltsf2, | |
512 | LTI_lesf2, | |
1eb8759b | 513 | LTI_unordsf2, |
34220a12 BS |
514 | |
515 | LTI_eqdf2, | |
516 | LTI_nedf2, | |
517 | LTI_gtdf2, | |
518 | LTI_gedf2, | |
519 | LTI_ltdf2, | |
520 | LTI_ledf2, | |
1eb8759b | 521 | LTI_unorddf2, |
34220a12 BS |
522 | |
523 | LTI_eqxf2, | |
524 | LTI_nexf2, | |
525 | LTI_gtxf2, | |
526 | LTI_gexf2, | |
527 | LTI_ltxf2, | |
528 | LTI_lexf2, | |
1eb8759b | 529 | LTI_unordxf2, |
34220a12 BS |
530 | |
531 | LTI_eqtf2, | |
532 | LTI_netf2, | |
533 | LTI_gttf2, | |
534 | LTI_getf2, | |
535 | LTI_lttf2, | |
536 | LTI_letf2, | |
1eb8759b | 537 | LTI_unordtf2, |
34220a12 BS |
538 | |
539 | LTI_floatsisf, | |
540 | LTI_floatdisf, | |
541 | LTI_floattisf, | |
542 | ||
543 | LTI_floatsidf, | |
544 | LTI_floatdidf, | |
545 | LTI_floattidf, | |
546 | ||
547 | LTI_floatsixf, | |
548 | LTI_floatdixf, | |
549 | LTI_floattixf, | |
550 | ||
551 | LTI_floatsitf, | |
552 | LTI_floatditf, | |
553 | LTI_floattitf, | |
554 | ||
555 | LTI_fixsfsi, | |
556 | LTI_fixsfdi, | |
557 | LTI_fixsfti, | |
558 | ||
559 | LTI_fixdfsi, | |
560 | LTI_fixdfdi, | |
561 | LTI_fixdfti, | |
562 | ||
563 | LTI_fixxfsi, | |
564 | LTI_fixxfdi, | |
565 | LTI_fixxfti, | |
566 | ||
567 | LTI_fixtfsi, | |
568 | LTI_fixtfdi, | |
569 | LTI_fixtfti, | |
570 | ||
571 | LTI_fixunssfsi, | |
572 | LTI_fixunssfdi, | |
573 | LTI_fixunssfti, | |
574 | ||
575 | LTI_fixunsdfsi, | |
576 | LTI_fixunsdfdi, | |
577 | LTI_fixunsdfti, | |
578 | ||
579 | LTI_fixunsxfsi, | |
580 | LTI_fixunsxfdi, | |
581 | LTI_fixunsxfti, | |
582 | ||
583 | LTI_fixunstfsi, | |
584 | LTI_fixunstfdi, | |
585 | LTI_fixunstfti, | |
586 | ||
587 | LTI_chkr_check_addr, | |
588 | LTI_chkr_set_right, | |
589 | LTI_chkr_copy_bitmap, | |
590 | LTI_chkr_check_exec, | |
591 | LTI_chkr_check_str, | |
592 | ||
593 | LTI_profile_function_entry, | |
594 | LTI_profile_function_exit, | |
595 | ||
596 | LTI_MAX | |
597 | }; | |
598 | ||
e8bbfc4e RK |
599 | /* SYMBOL_REF rtx's for the library functions that are called |
600 | implicitly and not via optabs. */ | |
34220a12 BS |
601 | extern rtx libfunc_table[LTI_MAX]; |
602 | ||
603 | /* Accessor macros for libfunc_table. */ | |
604 | #define extendsfdf2_libfunc (libfunc_table[LTI_extendsfdf2]) | |
605 | #define extendsfxf2_libfunc (libfunc_table[LTI_extendsfxf2]) | |
606 | #define extendsftf2_libfunc (libfunc_table[LTI_extendsftf2]) | |
607 | #define extenddfxf2_libfunc (libfunc_table[LTI_extenddfxf2]) | |
608 | #define extenddftf2_libfunc (libfunc_table[LTI_extenddftf2]) | |
609 | ||
610 | #define truncdfsf2_libfunc (libfunc_table[LTI_truncdfsf2]) | |
611 | #define truncxfsf2_libfunc (libfunc_table[LTI_truncxfsf2]) | |
612 | #define trunctfsf2_libfunc (libfunc_table[LTI_trunctfsf2]) | |
613 | #define truncxfdf2_libfunc (libfunc_table[LTI_truncxfdf2]) | |
614 | #define trunctfdf2_libfunc (libfunc_table[LTI_trunctfdf2]) | |
615 | ||
616 | #define memcpy_libfunc (libfunc_table[LTI_memcpy]) | |
617 | #define bcopy_libfunc (libfunc_table[LTI_bcopy]) | |
618 | #define memcmp_libfunc (libfunc_table[LTI_memcmp]) | |
619 | #define bcmp_libfunc (libfunc_table[LTI_bcmp]) | |
620 | #define memset_libfunc (libfunc_table[LTI_memset]) | |
621 | #define bzero_libfunc (libfunc_table[LTI_bzero]) | |
622 | ||
623 | #define throw_libfunc (libfunc_table[LTI_throw]) | |
624 | #define rethrow_libfunc (libfunc_table[LTI_rethrow]) | |
625 | #define sjthrow_libfunc (libfunc_table[LTI_sjthrow]) | |
626 | #define sjpopnthrow_libfunc (libfunc_table[LTI_sjpopnthrow]) | |
627 | #define terminate_libfunc (libfunc_table[LTI_terminate]) | |
628 | #define setjmp_libfunc (libfunc_table[LTI_setjmp]) | |
629 | #define longjmp_libfunc (libfunc_table[LTI_longjmp]) | |
630 | #define eh_rtime_match_libfunc (libfunc_table[LTI_eh_rtime_match]) | |
631 | ||
632 | #define eqhf2_libfunc (libfunc_table[LTI_eqhf2]) | |
633 | #define nehf2_libfunc (libfunc_table[LTI_nehf2]) | |
634 | #define gthf2_libfunc (libfunc_table[LTI_gthf2]) | |
635 | #define gehf2_libfunc (libfunc_table[LTI_gehf2]) | |
636 | #define lthf2_libfunc (libfunc_table[LTI_lthf2]) | |
637 | #define lehf2_libfunc (libfunc_table[LTI_lehf2]) | |
1eb8759b | 638 | #define unordhf2_libfunc (libfunc_table[LTI_unordhf2]) |
34220a12 BS |
639 | |
640 | #define eqsf2_libfunc (libfunc_table[LTI_eqsf2]) | |
641 | #define nesf2_libfunc (libfunc_table[LTI_nesf2]) | |
642 | #define gtsf2_libfunc (libfunc_table[LTI_gtsf2]) | |
643 | #define gesf2_libfunc (libfunc_table[LTI_gesf2]) | |
644 | #define ltsf2_libfunc (libfunc_table[LTI_ltsf2]) | |
645 | #define lesf2_libfunc (libfunc_table[LTI_lesf2]) | |
1eb8759b | 646 | #define unordsf2_libfunc (libfunc_table[LTI_unordsf2]) |
34220a12 BS |
647 | |
648 | #define eqdf2_libfunc (libfunc_table[LTI_eqdf2]) | |
649 | #define nedf2_libfunc (libfunc_table[LTI_nedf2]) | |
650 | #define gtdf2_libfunc (libfunc_table[LTI_gtdf2]) | |
651 | #define gedf2_libfunc (libfunc_table[LTI_gedf2]) | |
652 | #define ltdf2_libfunc (libfunc_table[LTI_ltdf2]) | |
653 | #define ledf2_libfunc (libfunc_table[LTI_ledf2]) | |
1eb8759b | 654 | #define unorddf2_libfunc (libfunc_table[LTI_unorddf2]) |
34220a12 BS |
655 | |
656 | #define eqxf2_libfunc (libfunc_table[LTI_eqxf2]) | |
657 | #define nexf2_libfunc (libfunc_table[LTI_nexf2]) | |
658 | #define gtxf2_libfunc (libfunc_table[LTI_gtxf2]) | |
659 | #define gexf2_libfunc (libfunc_table[LTI_gexf2]) | |
660 | #define ltxf2_libfunc (libfunc_table[LTI_ltxf2]) | |
661 | #define lexf2_libfunc (libfunc_table[LTI_lexf2]) | |
1eb8759b | 662 | #define unordxf2_libfunc (libfunc_table[LTI_unordxf2]) |
34220a12 BS |
663 | |
664 | #define eqtf2_libfunc (libfunc_table[LTI_eqtf2]) | |
665 | #define netf2_libfunc (libfunc_table[LTI_netf2]) | |
666 | #define gttf2_libfunc (libfunc_table[LTI_gttf2]) | |
667 | #define getf2_libfunc (libfunc_table[LTI_getf2]) | |
668 | #define lttf2_libfunc (libfunc_table[LTI_lttf2]) | |
669 | #define letf2_libfunc (libfunc_table[LTI_letf2]) | |
1eb8759b | 670 | #define unordtf2_libfunc (libfunc_table[LTI_unordtf2]) |
34220a12 BS |
671 | |
672 | #define floatsisf_libfunc (libfunc_table[LTI_floatsisf]) | |
673 | #define floatdisf_libfunc (libfunc_table[LTI_floatdisf]) | |
674 | #define floattisf_libfunc (libfunc_table[LTI_floattisf]) | |
675 | ||
676 | #define floatsidf_libfunc (libfunc_table[LTI_floatsidf]) | |
677 | #define floatdidf_libfunc (libfunc_table[LTI_floatdidf]) | |
678 | #define floattidf_libfunc (libfunc_table[LTI_floattidf]) | |
679 | ||
680 | #define floatsixf_libfunc (libfunc_table[LTI_floatsixf]) | |
681 | #define floatdixf_libfunc (libfunc_table[LTI_floatdixf]) | |
682 | #define floattixf_libfunc (libfunc_table[LTI_floattixf]) | |
683 | ||
684 | #define floatsitf_libfunc (libfunc_table[LTI_floatsitf]) | |
685 | #define floatditf_libfunc (libfunc_table[LTI_floatditf]) | |
686 | #define floattitf_libfunc (libfunc_table[LTI_floattitf]) | |
687 | ||
688 | #define fixsfsi_libfunc (libfunc_table[LTI_fixsfsi]) | |
689 | #define fixsfdi_libfunc (libfunc_table[LTI_fixsfdi]) | |
690 | #define fixsfti_libfunc (libfunc_table[LTI_fixsfti]) | |
691 | ||
692 | #define fixdfsi_libfunc (libfunc_table[LTI_fixdfsi]) | |
693 | #define fixdfdi_libfunc (libfunc_table[LTI_fixdfdi]) | |
694 | #define fixdfti_libfunc (libfunc_table[LTI_fixdfti]) | |
695 | ||
696 | #define fixxfsi_libfunc (libfunc_table[LTI_fixxfsi]) | |
697 | #define fixxfdi_libfunc (libfunc_table[LTI_fixxfdi]) | |
698 | #define fixxfti_libfunc (libfunc_table[LTI_fixxfti]) | |
699 | ||
700 | #define fixtfsi_libfunc (libfunc_table[LTI_fixtfsi]) | |
701 | #define fixtfdi_libfunc (libfunc_table[LTI_fixtfdi]) | |
702 | #define fixtfti_libfunc (libfunc_table[LTI_fixtfti]) | |
703 | ||
704 | #define fixunssfsi_libfunc (libfunc_table[LTI_fixunssfsi]) | |
705 | #define fixunssfdi_libfunc (libfunc_table[LTI_fixunssfdi]) | |
706 | #define fixunssfti_libfunc (libfunc_table[LTI_fixunssfti]) | |
707 | ||
708 | #define fixunsdfsi_libfunc (libfunc_table[LTI_fixunsdfsi]) | |
709 | #define fixunsdfdi_libfunc (libfunc_table[LTI_fixunsdfdi]) | |
710 | #define fixunsdfti_libfunc (libfunc_table[LTI_fixunsdfti]) | |
711 | ||
712 | #define fixunsxfsi_libfunc (libfunc_table[LTI_fixunsxfsi]) | |
713 | #define fixunsxfdi_libfunc (libfunc_table[LTI_fixunsxfdi]) | |
714 | #define fixunsxfti_libfunc (libfunc_table[LTI_fixunsxfti]) | |
715 | ||
716 | #define fixunstfsi_libfunc (libfunc_table[LTI_fixunstfsi]) | |
717 | #define fixunstfdi_libfunc (libfunc_table[LTI_fixunstfdi]) | |
718 | #define fixunstfti_libfunc (libfunc_table[LTI_fixunstfti]) | |
719 | ||
720 | #define chkr_check_addr_libfunc (libfunc_table[LTI_chkr_check_addr]) | |
721 | #define chkr_set_right_libfunc (libfunc_table[LTI_chkr_set_right]) | |
722 | #define chkr_copy_bitmap_libfunc (libfunc_table[LTI_chkr_copy_bitmap]) | |
723 | #define chkr_check_exec_libfunc (libfunc_table[LTI_chkr_check_exec]) | |
724 | #define chkr_check_str_libfunc (libfunc_table[LTI_chkr_check_str]) | |
725 | ||
726 | #define profile_function_entry_libfunc (libfunc_table[LTI_profile_function_entry]) | |
727 | #define profile_function_exit_libfunc (libfunc_table[LTI_profile_function_exit]) | |
e8bbfc4e | 728 | \f |
711d877c | 729 | typedef rtx (*rtxfun) PARAMS ((rtx)); |
e8bbfc4e RK |
730 | |
731 | /* Indexed by the rtx-code for a conditional (eg. EQ, LT,...) | |
732 | gives the gen_function to make a branch to test that condition. */ | |
733 | ||
734 | extern rtxfun bcc_gen_fctn[NUM_RTX_CODE]; | |
735 | ||
736 | /* Indexed by the rtx-code for a conditional (eg. EQ, LT,...) | |
737 | gives the insn code to make a store-condition insn | |
738 | to test that condition. */ | |
739 | ||
740 | extern enum insn_code setcc_gen_code[NUM_RTX_CODE]; | |
741 | ||
423933c2 | 742 | #ifdef HAVE_conditional_move |
38e01259 | 743 | /* Indexed by the machine mode, gives the insn code to make a conditional |
423933c2 DE |
744 | move insn. */ |
745 | ||
746 | extern enum insn_code movcc_gen_code[NUM_MACHINE_MODES]; | |
747 | #endif | |
748 | ||
27b3f754 RK |
749 | /* This array records the insn_code of insns to perform block moves. */ |
750 | extern enum insn_code movstr_optab[NUM_MACHINE_MODES]; | |
751 | ||
12079564 RK |
752 | /* This array records the insn_code of insns to perform block clears. */ |
753 | extern enum insn_code clrstr_optab[NUM_MACHINE_MODES]; | |
754 | ||
12e74c9e RK |
755 | /* Define functions given in optabs.c. */ |
756 | ||
e8bbfc4e | 757 | /* Expand a binary operation given optab and rtx operands. */ |
711d877c KG |
758 | extern rtx expand_binop PARAMS ((enum machine_mode, optab, rtx, rtx, rtx, |
759 | int, enum optab_methods)); | |
e8bbfc4e RK |
760 | |
761 | /* Expand a binary operation with both signed and unsigned forms. */ | |
711d877c KG |
762 | extern rtx sign_expand_binop PARAMS ((enum machine_mode, optab, optab, rtx, |
763 | rtx, rtx, int, enum optab_methods)); | |
12e74c9e RK |
764 | |
765 | /* Generate code to perform an operation on two operands with two results. */ | |
711d877c | 766 | extern int expand_twoval_binop PARAMS ((optab, rtx, rtx, rtx, rtx, int)); |
e8bbfc4e RK |
767 | |
768 | /* Expand a unary arithmetic operation given optab rtx operand. */ | |
711d877c | 769 | extern rtx expand_unop PARAMS ((enum machine_mode, optab, rtx, rtx, int)); |
e8bbfc4e | 770 | |
e3149275 | 771 | /* Expand the absolute value operation. */ |
711d877c | 772 | extern rtx expand_abs PARAMS ((enum machine_mode, rtx, rtx, int)); |
e3149275 | 773 | |
bf15a311 | 774 | /* Expand the complex absolute value operation. */ |
711d877c | 775 | extern rtx expand_complex_abs PARAMS ((enum machine_mode, rtx, rtx, int)); |
bf15a311 | 776 | |
12e74c9e RK |
777 | /* Generate an instruction with a given INSN_CODE with an output and |
778 | an input. */ | |
711d877c | 779 | extern void emit_unop_insn PARAMS ((int, rtx, rtx, enum rtx_code)); |
e8bbfc4e | 780 | |
12e74c9e RK |
781 | /* Emit code to perform a series of operations on a multi-word quantity, one |
782 | word at a time. */ | |
711d877c | 783 | extern rtx emit_no_conflict_block PARAMS ((rtx, rtx, rtx, rtx, rtx)); |
e8bbfc4e | 784 | |
12e74c9e | 785 | /* Emit code to make a call to a constant function or a library call. */ |
711d877c | 786 | extern void emit_libcall_block PARAMS ((rtx, rtx, rtx, rtx)); |
e8bbfc4e | 787 | |
12e74c9e | 788 | /* Emit one rtl instruction to store zero in specified rtx. */ |
711d877c | 789 | extern void emit_clr_insn PARAMS ((rtx)); |
e8bbfc4e | 790 | |
12e74c9e | 791 | /* Emit one rtl insn to store 1 in specified rtx assuming it contains 0. */ |
711d877c | 792 | extern void emit_0_to_1_insn PARAMS ((rtx)); |
12e74c9e RK |
793 | |
794 | /* Emit one rtl insn to compare two rtx's. */ | |
711d877c | 795 | extern void emit_cmp_insn PARAMS ((rtx, rtx, enum rtx_code, rtx, |
19caa751 | 796 | enum machine_mode, int, unsigned int)); |
12e74c9e | 797 | |
362cc3d4 MH |
798 | /* Emit a pair of rtl insns to compare two rtx's and to jump |
799 | to a label if the comparison is true. */ | |
711d877c | 800 | extern void emit_cmp_and_jump_insns PARAMS ((rtx, rtx, enum rtx_code, rtx, |
19caa751 RK |
801 | enum machine_mode, int, |
802 | unsigned int, rtx)); | |
362cc3d4 | 803 | |
1c0290ea BS |
804 | /* The various uses that a comparison can have; used by can_compare_p: |
805 | jumps, conditional moves, store flag operations. */ | |
806 | enum can_compare_purpose | |
807 | { | |
808 | ccp_jump, | |
809 | ccp_cmov, | |
810 | ccp_store_flag | |
811 | }; | |
1eb8759b | 812 | |
12e74c9e RK |
813 | /* Nonzero if a compare of mode MODE can be done straightforwardly |
814 | (without splitting it into pieces). */ | |
1eb8759b RH |
815 | extern int can_compare_p PARAMS ((enum rtx_code, enum machine_mode, |
816 | enum can_compare_purpose)); | |
1c0290ea | 817 | |
711d877c KG |
818 | extern void prepare_cmp_insn PARAMS ((rtx *, rtx *, enum rtx_code *, rtx, |
819 | enum machine_mode *, int *, int, | |
820 | enum can_compare_purpose)); | |
1c0290ea | 821 | |
711d877c KG |
822 | extern rtx prepare_operand PARAMS ((int, rtx, int, enum machine_mode, |
823 | enum machine_mode, int)); | |
12e74c9e RK |
824 | |
825 | /* Generate code to indirectly jump to a location given in the rtx LOC. */ | |
711d877c | 826 | extern void emit_indirect_jump PARAMS ((rtx)); |
12e74c9e | 827 | |
423933c2 DE |
828 | #ifdef HAVE_conditional_move |
829 | /* Emit a conditional move operation. */ | |
711d877c KG |
830 | rtx emit_conditional_move PARAMS ((rtx, enum rtx_code, rtx, rtx, |
831 | enum machine_mode, rtx, rtx, | |
832 | enum machine_mode, int)); | |
423933c2 DE |
833 | |
834 | /* Return non-zero if the conditional move is supported. */ | |
711d877c | 835 | int can_conditionally_move_p PARAMS ((enum machine_mode mode)); |
e9576d2c | 836 | |
423933c2 DE |
837 | #endif |
838 | ||
12e74c9e RK |
839 | /* Create but don't emit one rtl instruction to add one rtx into another. |
840 | Modes must match; operands must meet the operation's predicates. | |
841 | Likewise for subtraction and for just copying. | |
842 | These do not call protect_from_queue; caller must do so. */ | |
711d877c KG |
843 | extern rtx gen_add2_insn PARAMS ((rtx, rtx)); |
844 | extern rtx gen_sub2_insn PARAMS ((rtx, rtx)); | |
845 | extern rtx gen_move_insn PARAMS ((rtx, rtx)); | |
846 | extern int have_add2_insn PARAMS ((enum machine_mode)); | |
847 | extern int have_sub2_insn PARAMS ((enum machine_mode)); | |
e8bbfc4e RK |
848 | |
849 | /* Return the INSN_CODE to use for an extend operation. */ | |
711d877c KG |
850 | extern enum insn_code can_extend_p PARAMS ((enum machine_mode, |
851 | enum machine_mode, int)); | |
12e74c9e RK |
852 | |
853 | /* Generate the body of an insn to extend Y (with mode MFROM) | |
854 | into X (with mode MTO). Do zero-extension if UNSIGNEDP is nonzero. */ | |
711d877c KG |
855 | extern rtx gen_extend_insn PARAMS ((rtx, rtx, enum machine_mode, |
856 | enum machine_mode, int)); | |
e8bbfc4e RK |
857 | |
858 | /* Initialize the tables that control conversion between fixed and | |
859 | floating values. */ | |
711d877c KG |
860 | extern void init_fixtab PARAMS ((void)); |
861 | extern void init_floattab PARAMS ((void)); | |
e8bbfc4e | 862 | |
12e74c9e | 863 | /* Generate code for a FLOAT_EXPR. */ |
711d877c | 864 | extern void expand_float PARAMS ((rtx, rtx, int)); |
12e74c9e | 865 | |
e8bbfc4e | 866 | /* Generate code for a FIX_EXPR. */ |
711d877c | 867 | extern void expand_fix PARAMS ((rtx, rtx, int)); |
e8bbfc4e | 868 | |
76095e2f | 869 | /* Call this to initialize an optab function entry. */ |
711d877c | 870 | extern rtx init_one_libfunc PARAMS ((const char *)); |
76095e2f | 871 | |
12e74c9e RK |
872 | /* Call this once to initialize the contents of the optabs |
873 | appropriately for the current target machine. */ | |
711d877c | 874 | extern void init_optabs PARAMS ((void)); |
12e74c9e | 875 | \f |
bda63bf1 | 876 | /* Functions from expmed.c: */ |
e8bbfc4e | 877 | |
12e74c9e RK |
878 | /* Arguments MODE, RTX: return an rtx for the negation of that value. |
879 | May emit insns. */ | |
711d877c | 880 | extern rtx negate_rtx PARAMS ((enum machine_mode, rtx)); |
e8bbfc4e | 881 | |
12e74c9e | 882 | /* Expand a logical AND operation. */ |
711d877c | 883 | extern rtx expand_and PARAMS ((rtx, rtx, rtx)); |
e8bbfc4e | 884 | |
12e74c9e | 885 | /* Emit a store-flag operation. */ |
711d877c KG |
886 | extern rtx emit_store_flag PARAMS ((rtx, enum rtx_code, rtx, rtx, |
887 | enum machine_mode, int, int)); | |
e8bbfc4e | 888 | |
c0eccde6 | 889 | /* Like emit_store_flag, but always succeeds. */ |
711d877c KG |
890 | extern rtx emit_store_flag_force PARAMS ((rtx, enum rtx_code, rtx, rtx, |
891 | enum machine_mode, int, int)); | |
c0eccde6 | 892 | |
12e74c9e | 893 | /* Functions from loop.c: */ |
e8bbfc4e | 894 | |
a49a6a68 JW |
895 | /* Given an insn and condition, return a canonical description of |
896 | the test being made. */ | |
10f13594 | 897 | extern rtx canonicalize_condition PARAMS ((rtx, rtx, int, rtx *, rtx)); |
a49a6a68 JW |
898 | |
899 | /* Given a JUMP_INSN, return a canonical description of the test | |
900 | being made. */ | |
711d877c | 901 | extern rtx get_condition PARAMS ((rtx, rtx *)); |
e0cd0770 JC |
902 | |
903 | /* Generate a conditional trap instruction. */ | |
711d877c | 904 | extern rtx gen_cond_trap PARAMS ((enum rtx_code, rtx, rtx, rtx)); |
12e74c9e | 905 | \f |
28f4ec01 BS |
906 | /* Functions from builtins.c: */ |
907 | #ifdef TREE_CODE | |
711d877c | 908 | extern rtx expand_builtin PARAMS ((tree, rtx, rtx, enum machine_mode, int)); |
1eb8759b | 909 | extern tree expand_tree_builtin PARAMS ((tree, tree, tree)); |
711d877c KG |
910 | extern void std_expand_builtin_va_start PARAMS ((int, tree, rtx)); |
911 | extern rtx std_expand_builtin_va_arg PARAMS ((tree, tree)); | |
912 | extern rtx expand_builtin_va_arg PARAMS ((tree, tree)); | |
28f4ec01 BS |
913 | #endif |
914 | ||
711d877c KG |
915 | extern rtx expand_builtin_setjmp PARAMS ((rtx, rtx, rtx, rtx)); |
916 | extern void expand_builtin_longjmp PARAMS ((rtx, rtx)); | |
917 | extern rtx expand_builtin_saveregs PARAMS ((void)); | |
3bdf5ad1 RK |
918 | extern HOST_WIDE_INT get_varargs_alias_set PARAMS ((void)); |
919 | extern HOST_WIDE_INT get_frame_alias_set PARAMS ((void)); | |
920 | extern void record_base_value PARAMS ((unsigned int, rtx, int)); | |
921 | extern void record_alias_subset PARAMS ((HOST_WIDE_INT, | |
922 | HOST_WIDE_INT)); | |
3bdf5ad1 | 923 | extern HOST_WIDE_INT new_alias_set PARAMS ((void)); |
28f4ec01 | 924 | \f |
12e74c9e | 925 | /* Functions from expr.c: */ |
cb411bd6 | 926 | |
12e74c9e RK |
927 | /* This is run once per compilation to set up which modes can be used |
928 | directly in memory and to initialize the block move optab. */ | |
711d877c | 929 | extern void init_expr_once PARAMS ((void)); |
12e74c9e RK |
930 | |
931 | /* This is run at the start of compiling a function. */ | |
711d877c | 932 | extern void init_expr PARAMS ((void)); |
12e74c9e | 933 | |
d7db6646 RH |
934 | /* This function is run once to initialize stor-layout.c. */ |
935 | ||
711d877c | 936 | extern void init_stor_layout_once PARAMS ((void)); |
d7db6646 | 937 | |
49ad7cfa | 938 | /* This is run at the end of compiling a function. */ |
711d877c | 939 | extern void finish_expr_for_function PARAMS ((void)); |
49ad7cfa | 940 | |
12e74c9e RK |
941 | /* Use protect_from_queue to convert a QUEUED expression |
942 | into something that you can put immediately into an instruction. */ | |
711d877c | 943 | extern rtx protect_from_queue PARAMS ((rtx, int)); |
12e74c9e RK |
944 | |
945 | /* Perform all the pending incrementations. */ | |
711d877c | 946 | extern void emit_queue PARAMS ((void)); |
b4cb4994 | 947 | |
1f06ee8d | 948 | /* Tell if something has a queued subexpression. */ |
711d877c | 949 | extern int queued_subexp_p PARAMS ((rtx)); |
1f06ee8d | 950 | |
e8bbfc4e RK |
951 | /* Emit some rtl insns to move data between rtx's, converting machine modes. |
952 | Both modes must be floating or both fixed. */ | |
711d877c | 953 | extern void convert_move PARAMS ((rtx, rtx, int)); |
e8bbfc4e RK |
954 | |
955 | /* Convert an rtx to specified machine mode and return the result. */ | |
711d877c | 956 | extern rtx convert_to_mode PARAMS ((enum machine_mode, rtx, int)); |
e8bbfc4e | 957 | |
3fad11c9 | 958 | /* Convert an rtx to MODE from OLDMODE and return the result. */ |
729a2125 RK |
959 | extern rtx convert_modes PARAMS ((enum machine_mode, enum machine_mode, |
960 | rtx, int)); | |
3fad11c9 | 961 | |
bda63bf1 | 962 | /* Emit code to move a block Y to a block X. */ |
729a2125 | 963 | extern rtx emit_block_move PARAMS ((rtx, rtx, rtx, unsigned int)); |
12e74c9e RK |
964 | |
965 | /* Copy all or part of a value X into registers starting at REGNO. | |
966 | The number of registers to be filled is NREGS. */ | |
711d877c | 967 | extern void move_block_to_reg PARAMS ((int, rtx, int, enum machine_mode)); |
12e74c9e RK |
968 | |
969 | /* Copy all or part of a BLKmode value X out of registers starting at REGNO. | |
970 | The number of registers to be filled is NREGS. */ | |
711d877c | 971 | extern void move_block_from_reg PARAMS ((int, rtx, int, int)); |
12e74c9e | 972 | |
ae73d3be JW |
973 | /* Load a BLKmode value into non-consecutive registers represented by a |
974 | PARALLEL. */ | |
729a2125 RK |
975 | extern void emit_group_load PARAMS ((rtx, rtx, int, unsigned int)); |
976 | ||
ae73d3be JW |
977 | /* Store a BLKmode value from non-consecutive registers represented by a |
978 | PARALLEL. */ | |
729a2125 | 979 | extern void emit_group_store PARAMS ((rtx, rtx, int, unsigned int)); |
ae73d3be | 980 | |
c36fce9a GRK |
981 | #ifdef TREE_CODE |
982 | /* Copy BLKmode object from a set of registers. */ | |
711d877c | 983 | extern rtx copy_blkmode_from_reg PARAMS ((rtx,rtx,tree)); |
c36fce9a GRK |
984 | #endif |
985 | ||
8c99eaf6 | 986 | /* Mark REG as holding a parameter for the next CALL_INSN. */ |
711d877c | 987 | extern void use_reg PARAMS ((rtx *, rtx)); |
729a2125 | 988 | |
8c99eaf6 RK |
989 | /* Mark NREGS consecutive regs, starting at REGNO, as holding parameters |
990 | for the next CALL_INSN. */ | |
711d877c | 991 | extern void use_regs PARAMS ((rtx *, int, int)); |
729a2125 | 992 | |
ae73d3be | 993 | /* Mark a PARALLEL as holding a parameter for the next CALL_INSN. */ |
711d877c | 994 | extern void use_group_regs PARAMS ((rtx *, rtx)); |
12e74c9e RK |
995 | |
996 | /* Write zeros through the storage of OBJECT. | |
12079564 | 997 | If OBJECT has BLKmode, SIZE is its length in bytes and ALIGN is its |
2af1bac8 | 998 | alignment. */ |
729a2125 | 999 | extern rtx clear_storage PARAMS ((rtx, rtx, unsigned int)); |
12e74c9e RK |
1000 | |
1001 | /* Emit insns to set X from Y. */ | |
711d877c | 1002 | extern rtx emit_move_insn PARAMS ((rtx, rtx)); |
12e74c9e RK |
1003 | |
1004 | /* Emit insns to set X from Y, with no frills. */ | |
711d877c | 1005 | extern rtx emit_move_insn_1 PARAMS ((rtx, rtx)); |
12e74c9e RK |
1006 | |
1007 | /* Push a block of length SIZE (perhaps variable) | |
1008 | and return an rtx to address the beginning of the block. */ | |
711d877c | 1009 | extern rtx push_block PARAMS ((rtx, int, int)); |
12e74c9e | 1010 | |
9faa82d8 | 1011 | /* Make an operand to push something on the stack. */ |
711d877c | 1012 | extern rtx gen_push_operand PARAMS ((void)); |
12e74c9e RK |
1013 | |
1014 | #ifdef TREE_CODE | |
1015 | /* Generate code to push something onto the stack, given its mode and type. */ | |
729a2125 RK |
1016 | extern void emit_push_insn PARAMS ((rtx, enum machine_mode, tree, rtx, |
1017 | unsigned int, int, rtx, int, rtx, rtx, | |
1018 | int, rtx)); | |
12e74c9e | 1019 | |
12e74c9e | 1020 | /* Expand an assignment that stores the value of FROM into TO. */ |
711d877c | 1021 | extern rtx expand_assignment PARAMS ((tree, tree, int, int)); |
12e74c9e RK |
1022 | |
1023 | /* Generate code for computing expression EXP, | |
1024 | and storing the value into TARGET. | |
1025 | If SUGGEST_REG is nonzero, copy the value through a register | |
1026 | and return that register, if that is possible. */ | |
711d877c | 1027 | extern rtx store_expr PARAMS ((tree, rtx, int)); |
12e74c9e | 1028 | #endif |
e8bbfc4e RK |
1029 | |
1030 | /* Given an rtx that may include add and multiply operations, | |
1031 | generate them as insns and return a pseudo-reg containing the value. | |
1032 | Useful after calling expand_expr with 1 as sum_ok. */ | |
711d877c | 1033 | extern rtx force_operand PARAMS ((rtx, rtx)); |
e8bbfc4e | 1034 | |
12e74c9e RK |
1035 | #ifdef TREE_CODE |
1036 | /* Generate code for computing expression EXP. | |
1037 | An rtx for the computed value is returned. The value is never null. | |
1038 | In the case of a void EXP, const0_rtx is returned. */ | |
711d877c KG |
1039 | extern rtx expand_expr PARAMS ((tree, rtx, enum machine_mode, |
1040 | enum expand_modifier)); | |
12e74c9e RK |
1041 | #endif |
1042 | ||
1043 | /* At the start of a function, record that we have no previously-pushed | |
1044 | arguments waiting to be popped. */ | |
711d877c | 1045 | extern void init_pending_stack_adjust PARAMS ((void)); |
12e74c9e RK |
1046 | |
1047 | /* When exiting from function, if safe, clear out any pending stack adjust | |
1048 | so the adjustment won't get done. */ | |
711d877c | 1049 | extern void clear_pending_stack_adjust PARAMS ((void)); |
12e74c9e RK |
1050 | |
1051 | /* Pop any previously-pushed arguments that have not been popped yet. */ | |
711d877c | 1052 | extern void do_pending_stack_adjust PARAMS ((void)); |
12e74c9e RK |
1053 | |
1054 | #ifdef TREE_CODE | |
28f4ec01 BS |
1055 | /* Return the tree node and offset if a given argument corresponds to |
1056 | a string constant. */ | |
711d877c | 1057 | extern tree string_constant PARAMS ((tree, tree *)); |
28f4ec01 | 1058 | |
12e74c9e | 1059 | /* Generate code to evaluate EXP and jump to LABEL if the value is zero. */ |
711d877c | 1060 | extern void jumpifnot PARAMS ((tree, rtx)); |
12e74c9e RK |
1061 | |
1062 | /* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. */ | |
711d877c | 1063 | extern void jumpif PARAMS ((tree, rtx)); |
12e74c9e RK |
1064 | |
1065 | /* Generate code to evaluate EXP and jump to IF_FALSE_LABEL if | |
1066 | the result is zero, or IF_TRUE_LABEL if the result is one. */ | |
711d877c | 1067 | extern void do_jump PARAMS ((tree, rtx, rtx)); |
12e74c9e RK |
1068 | #endif |
1069 | ||
1070 | /* Generate rtl to compare two rtx's, will call emit_cmp_insn. */ | |
711d877c | 1071 | extern rtx compare_from_rtx PARAMS ((rtx, rtx, enum rtx_code, int, |
729a2125 | 1072 | enum machine_mode, rtx, unsigned int)); |
711d877c | 1073 | extern void do_compare_rtx_and_jump PARAMS ((rtx, rtx, enum rtx_code, int, |
729a2125 RK |
1074 | enum machine_mode, rtx, |
1075 | unsigned int, rtx, rtx)); | |
12e74c9e RK |
1076 | |
1077 | /* Generate a tablejump instruction (used for switch statements). */ | |
711d877c | 1078 | extern void do_tablejump PARAMS ((rtx, enum machine_mode, rtx, rtx, rtx)); |
12e74c9e | 1079 | \f |
cb411bd6 RS |
1080 | #ifdef TREE_CODE |
1081 | /* rtl.h and tree.h were included. */ | |
1082 | /* Return an rtx for the size in bytes of the value of an expr. */ | |
711d877c | 1083 | extern rtx expr_size PARAMS ((tree)); |
cb411bd6 | 1084 | |
711d877c | 1085 | extern rtx lookup_static_chain PARAMS ((tree)); |
cb411bd6 RS |
1086 | |
1087 | /* Convert a stack slot address ADDR valid in function FNDECL | |
1088 | into an address valid in this function (using a static chain). */ | |
711d877c | 1089 | extern rtx fix_lexical_addr PARAMS ((rtx, tree)); |
cb411bd6 RS |
1090 | |
1091 | /* Return the address of the trampoline for entering nested fn FUNCTION. */ | |
711d877c | 1092 | extern rtx trampoline_address PARAMS ((tree)); |
cb411bd6 RS |
1093 | |
1094 | /* Return an rtx that refers to the value returned by a function | |
1095 | in its original home. This becomes invalid if any more code is emitted. */ | |
711d877c | 1096 | extern rtx hard_function_value PARAMS ((tree, tree, int)); |
cb411bd6 | 1097 | |
711d877c | 1098 | extern rtx prepare_call_address PARAMS ((rtx, tree, rtx *, int)); |
cb411bd6 | 1099 | |
711d877c | 1100 | extern rtx expand_call PARAMS ((tree, rtx, int)); |
cb411bd6 | 1101 | |
3bdf5ad1 RK |
1102 | extern rtx expand_shift PARAMS ((enum tree_code, enum machine_mode, rtx, tree, |
1103 | rtx, int)); | |
1104 | extern rtx expand_divmod PARAMS ((int, enum tree_code, enum machine_mode, rtx, | |
1105 | rtx, rtx, int)); | |
1106 | extern void locate_and_pad_parm PARAMS ((enum machine_mode, tree, int, tree, | |
1107 | struct args_size *, | |
1108 | struct args_size *, | |
1109 | struct args_size *, | |
1110 | struct args_size *)); | |
711d877c | 1111 | extern rtx expand_inline_function PARAMS ((tree, tree, rtx, int, tree, rtx)); |
3bdf5ad1 | 1112 | |
cb411bd6 | 1113 | /* Return the CODE_LABEL rtx for a LABEL_DECL, creating it if necessary. */ |
711d877c | 1114 | extern rtx label_rtx PARAMS ((tree)); |
cb411bd6 RS |
1115 | #endif |
1116 | ||
626043cf | 1117 | /* Indicate how an input argument register was promoted. */ |
770ae6cc RK |
1118 | extern rtx promoted_input_arg PARAMS ((unsigned int, enum machine_mode *, |
1119 | int *)); | |
626043cf | 1120 | |
e8bbfc4e RK |
1121 | /* Return an rtx like arg but sans any constant terms. |
1122 | Returns the original rtx if it has no constant terms. | |
1123 | The constant terms are added and stored via a second arg. */ | |
711d877c | 1124 | extern rtx eliminate_constant_term PARAMS ((rtx, rtx *)); |
e8bbfc4e RK |
1125 | |
1126 | /* Convert arg to a valid memory address for specified machine mode, | |
1127 | by emitting insns to perform arithmetic if nec. */ | |
711d877c | 1128 | extern rtx memory_address PARAMS ((enum machine_mode, rtx)); |
e8bbfc4e RK |
1129 | |
1130 | /* Like `memory_address' but pretent `flag_force_addr' is 0. */ | |
711d877c | 1131 | extern rtx memory_address_noforce PARAMS ((enum machine_mode, rtx)); |
e8bbfc4e RK |
1132 | |
1133 | /* Return a memory reference like MEMREF, but with its mode changed | |
1134 | to MODE and its address changed to ADDR. | |
1135 | (VOIDmode means don't change the mode. | |
1136 | NULL for ADDR means don't change the address.) */ | |
711d877c | 1137 | extern rtx change_address PARAMS ((rtx, enum machine_mode, rtx)); |
e8bbfc4e RK |
1138 | |
1139 | /* Return a memory reference like MEMREF, but which is known to have a | |
1140 | valid address. */ | |
711d877c | 1141 | extern rtx validize_mem PARAMS ((rtx)); |
e8bbfc4e | 1142 | |
3bdf5ad1 | 1143 | #ifdef TREE_CODE |
258a120b JM |
1144 | /* Given REF, either a MEM or a REG, and T, either the type of X or |
1145 | the expression corresponding to REF, set RTX_UNCHANGING_P if | |
1146 | appropriate. */ | |
1147 | extern void maybe_set_unchanging PARAMS ((rtx, tree)); | |
1148 | ||
3bdf5ad1 RK |
1149 | /* Given REF, a MEM, and T, either the type of X or the expression |
1150 | corresponding to REF, set the memory attributes. OBJECTP is nonzero | |
1151 | if we are making a new object of this type. */ | |
1152 | extern void set_mem_attributes PARAMS ((rtx, tree, int)); | |
1153 | #endif | |
1154 | ||
e8bbfc4e | 1155 | /* Assemble the static constant template for function entry trampolines. */ |
711d877c | 1156 | extern rtx assemble_trampoline_template PARAMS ((void)); |
e8bbfc4e RK |
1157 | |
1158 | /* Return 1 if two rtx's are equivalent in structure and elements. */ | |
711d877c | 1159 | extern int rtx_equal_p PARAMS ((rtx, rtx)); |
e8bbfc4e RK |
1160 | |
1161 | /* Given rtx, return new rtx whose address won't be affected by | |
1162 | any side effects. It has been copied to a new temporary reg. */ | |
711d877c | 1163 | extern rtx stabilize PARAMS ((rtx)); |
e8bbfc4e RK |
1164 | |
1165 | /* Given an rtx, copy all regs it refers to into new temps | |
1166 | and return a modified copy that refers to the new temps. */ | |
711d877c | 1167 | extern rtx copy_all_regs PARAMS ((rtx)); |
e8bbfc4e RK |
1168 | |
1169 | /* Copy given rtx to a new temp reg and return that. */ | |
711d877c | 1170 | extern rtx copy_to_reg PARAMS ((rtx)); |
e8bbfc4e RK |
1171 | |
1172 | /* Like copy_to_reg but always make the reg Pmode. */ | |
711d877c | 1173 | extern rtx copy_addr_to_reg PARAMS ((rtx)); |
e8bbfc4e RK |
1174 | |
1175 | /* Like copy_to_reg but always make the reg the specified mode MODE. */ | |
711d877c | 1176 | extern rtx copy_to_mode_reg PARAMS ((enum machine_mode, rtx)); |
e8bbfc4e RK |
1177 | |
1178 | /* Copy given rtx to given temp reg and return that. */ | |
711d877c | 1179 | extern rtx copy_to_suggested_reg PARAMS ((rtx, rtx, enum machine_mode)); |
e8bbfc4e RK |
1180 | |
1181 | /* Copy a value to a register if it isn't already a register. | |
1182 | Args are mode (in case value is a constant) and the value. */ | |
711d877c | 1183 | extern rtx force_reg PARAMS ((enum machine_mode, rtx)); |
e8bbfc4e RK |
1184 | |
1185 | /* Return given rtx, copied into a new temp reg if it was in memory. */ | |
711d877c | 1186 | extern rtx force_not_mem PARAMS ((rtx)); |
e8bbfc4e | 1187 | |
9d69b7c8 RK |
1188 | #ifdef TREE_CODE |
1189 | /* Return mode and signedness to use when object is promoted. */ | |
711d877c KG |
1190 | extern enum machine_mode promote_mode PARAMS ((tree, enum machine_mode, |
1191 | int *, int)); | |
9d69b7c8 RK |
1192 | #endif |
1193 | ||
e8bbfc4e | 1194 | /* Remove some bytes from the stack. An rtx says how many. */ |
711d877c | 1195 | extern void adjust_stack PARAMS ((rtx)); |
e8bbfc4e RK |
1196 | |
1197 | /* Add some bytes to the stack. An rtx says how many. */ | |
711d877c | 1198 | extern void anti_adjust_stack PARAMS ((rtx)); |
e8bbfc4e | 1199 | |
59257ff7 RK |
1200 | /* This enum is used for the following two functions. */ |
1201 | enum save_level {SAVE_BLOCK, SAVE_FUNCTION, SAVE_NONLOCAL}; | |
1202 | ||
1203 | /* Save the stack pointer at the specified level. */ | |
711d877c | 1204 | extern void emit_stack_save PARAMS ((enum save_level, rtx *, rtx)); |
59257ff7 RK |
1205 | |
1206 | /* Restore the stack pointer from a save area of the specified level. */ | |
711d877c | 1207 | extern void emit_stack_restore PARAMS ((enum save_level, rtx, rtx)); |
59257ff7 | 1208 | |
e8bbfc4e RK |
1209 | /* Allocate some space on the stack dynamically and return its address. An rtx |
1210 | says how many bytes. */ | |
711d877c | 1211 | extern rtx allocate_dynamic_stack_space PARAMS ((rtx, rtx, int)); |
e8bbfc4e | 1212 | |
f7761c9a RK |
1213 | /* Probe a range of stack addresses from FIRST to FIRST+SIZE, inclusive. |
1214 | FIRST is a constant and size is a Pmode RTX. These are offsets from the | |
1215 | current stack pointer. STACK_GROWS_DOWNWARD says whether to add or | |
1216 | subtract from the stack. If SIZE is constant, this is done | |
1217 | with a fixed number of probes. Otherwise, we must make a loop. */ | |
711d877c | 1218 | extern void probe_stack_range PARAMS ((HOST_WIDE_INT, rtx)); |
f7761c9a | 1219 | |
e8bbfc4e RK |
1220 | /* Return an rtx that refers to the value returned by a library call |
1221 | in its original home. This becomes invalid if any more code is emitted. */ | |
711d877c | 1222 | extern rtx hard_libcall_value PARAMS ((enum machine_mode)); |
e8bbfc4e | 1223 | |
e8bbfc4e RK |
1224 | /* Given an rtx, return an rtx for a value rounded up to a multiple |
1225 | of STACK_BOUNDARY / BITS_PER_UNIT. */ | |
711d877c | 1226 | extern rtx round_push PARAMS ((rtx)); |
e8bbfc4e | 1227 | |
770ae6cc RK |
1228 | extern rtx store_bit_field PARAMS ((rtx, unsigned HOST_WIDE_INT, |
1229 | unsigned HOST_WIDE_INT, | |
1230 | enum machine_mode, rtx, | |
1231 | unsigned int, HOST_WIDE_INT)); | |
1232 | extern rtx extract_bit_field PARAMS ((rtx, unsigned HOST_WIDE_INT, | |
1233 | unsigned HOST_WIDE_INT, int, rtx, | |
729a2125 | 1234 | enum machine_mode, enum machine_mode, |
770ae6cc | 1235 | unsigned int, HOST_WIDE_INT)); |
711d877c KG |
1236 | extern rtx expand_mult PARAMS ((enum machine_mode, rtx, rtx, rtx, int)); |
1237 | extern rtx expand_mult_add PARAMS ((rtx, rtx, rtx, rtx,enum machine_mode, int)); | |
1238 | extern rtx expand_mult_highpart_adjust PARAMS ((enum machine_mode, rtx, rtx, rtx, rtx, int)); | |
e8bbfc4e | 1239 | |
711d877c | 1240 | extern rtx assemble_static_space PARAMS ((int)); |
e8bbfc4e RK |
1241 | |
1242 | /* Hook called by expand_expr for language-specific tree codes. | |
1243 | It is up to the language front end to install a hook | |
1244 | if it has any such codes that expand_expr needs to know about. */ | |
711d877c KG |
1245 | extern rtx (*lang_expand_expr) PARAMS ((union tree_node *, rtx, |
1246 | enum machine_mode, | |
1247 | enum expand_modifier modifier)); | |
b0cb541b | 1248 | |
4d49638c | 1249 | #ifdef TREE_CODE |
e697e20a MM |
1250 | /* Hook called by output_constant for language-specific tree codes. |
1251 | It is up to the language front-end to install a hook if it has any | |
1252 | such codes that output_constant needs to know about. Returns a | |
1253 | language-independent constant equivalent to its input. */ | |
711d877c | 1254 | extern tree (*lang_expand_constant) PARAMS ((tree)); |
8f17b5c5 MM |
1255 | |
1256 | extern int safe_from_p PARAMS ((rtx, tree, int)); | |
1257 | ||
1258 | /* Hook called by safe_from_p for language-specific tree codes. It is | |
1259 | up to the language front-end to install a hook if it has any such | |
1260 | codes that safe_from_p needs to know about. Since same_from_p will | |
1261 | recursively explore the TREE_OPERANDs of an expression, this hook | |
1262 | should not reexamine those pieces. This routine may recursively | |
1263 | call safe_from_p; it should always pass `0' as the TOP_P | |
1264 | parameter. */ | |
1265 | extern int (*lang_safe_from_p) PARAMS ((rtx, tree)); | |
4d49638c | 1266 | #endif |
e697e20a | 1267 | |
711d877c KG |
1268 | extern void init_all_optabs PARAMS ((void)); |
1269 | extern void do_jump_by_parts_equality_rtx PARAMS ((rtx, rtx, rtx)); | |
1270 | extern void do_jump_by_parts_greater_rtx PARAMS ((enum machine_mode, | |
1271 | int, rtx, rtx, rtx, | |
1272 | rtx)); | |
df03cab5 | 1273 | |
0586a4ce | 1274 | #ifdef TREE_CODE /* Don't lose if tree.h not included. */ |
711d877c | 1275 | extern void mark_seen_cases PARAMS ((tree, unsigned char *, |
770ae6cc | 1276 | HOST_WIDE_INT, int)); |
0586a4ce | 1277 | #endif |