* libjava.jni/jni.exp (gcj_jni_compile_c_to_so): Fix path for
[official-gcc.git] / gcc / expr.h
blob786bcae130ebf1fd0909bfecc4c224e4cdd7514a
1 /* Definitions for code generation pass of GNU compiler.
2 Copyright (C) 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
3 1999, 2000 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)
10 any later version.
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 /* The default branch cost is 1. */
23 #ifndef BRANCH_COST
24 #define BRANCH_COST 1
25 #endif
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. */
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
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. */
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)
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
50 is a constant that is not a legitimate address.
51 EXPAND_MEMORY_USE_* are explained below. */
52 enum expand_modifier {EXPAND_NORMAL, EXPAND_SUM,
53 EXPAND_CONST_ADDRESS, EXPAND_INITIALIZER,
54 EXPAND_MEMORY_USE_WO, EXPAND_MEMORY_USE_RW,
55 EXPAND_MEMORY_USE_BAD, EXPAND_MEMORY_USE_DONT};
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};
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)
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)
80 #ifdef TREE_CODE /* Don't lose if tree.h not included. */
81 /* Structure to record the size of a sequence of arguments
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. */
86 struct args_size
88 HOST_WIDE_INT constant;
89 tree var;
91 #endif
93 /* Add the value of the tree INC to the `struct args_size' TO. */
95 #define ADD_PARM_SIZE(TO, INC) \
96 { tree inc = (INC); \
97 if (host_integerp (inc, 0)) \
98 (TO).constant += tree_low_cst (inc, 0); \
99 else if ((TO).var == 0) \
100 (TO).var = inc; \
101 else \
102 (TO).var = size_binop (PLUS_EXPR, (TO).var, inc); }
104 #define SUB_PARM_SIZE(TO, DEC) \
105 { tree dec = (DEC); \
106 if (host_integerp (dec, 0)) \
107 (TO).constant -= tree_low_cst (dec, 0); \
108 else if ((TO).var == 0) \
109 (TO).var = size_binop (MINUS_EXPR, ssize_int (0), dec); \
110 else \
111 (TO).var = size_binop (MINUS_EXPR, (TO).var, dec); }
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)))
119 /* Convert the implicit sum in a `struct args_size' into an rtx. */
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))
125 /* Supply a default definition for FUNCTION_ARG_PADDING:
126 usually pad upward, but pad short args downward on
127 big-endian machines. */
129 enum direction {none, upward, downward}; /* Value has this type. */
131 #ifndef FUNCTION_ARG_PADDING
132 #define FUNCTION_ARG_PADDING(MODE, TYPE) \
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))
140 #endif
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. */
146 #ifndef FUNCTION_ARG_BOUNDARY
147 #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) PARM_BOUNDARY
148 #endif
150 /* Provide a default value for STRICT_ARGUMENT_NAMING. */
151 #ifndef STRICT_ARGUMENT_NAMING
152 #define STRICT_ARGUMENT_NAMING 0
153 #endif
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
166 /* Nonzero if we do not know how to pass TYPE solely in registers.
167 We cannot do so in the following cases:
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
173 would put it into the wrong part of the register.
175 Which padding can't be supported depends on the byte endianness.
177 A value in a register is implicitly padded at the most significant end.
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. */
182 #ifndef MUST_PASS_IN_STACK
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 \
188 && ! ((TYPE) != 0 && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST \
189 && 0 == (int_size_in_bytes (TYPE) \
190 % (PARM_BOUNDARY / BITS_PER_UNIT))) \
191 && (FUNCTION_ARG_PADDING (MODE, TYPE) \
192 == (BYTES_BIG_ENDIAN ? upward : downward)))))
193 #endif
195 /* Nonzero if type TYPE should be returned in memory.
196 Most machines can use the following default definition. */
198 #ifndef RETURN_IN_MEMORY
199 #define RETURN_IN_MEMORY(TYPE) (TYPE_MODE (TYPE) == BLKmode)
200 #endif
202 /* Supply a default definition of STACK_SAVEAREA_MODE for emit_stack_save.
203 Normally move_insn, so Pmode stack pointer. */
205 #ifndef STACK_SAVEAREA_MODE
206 #define STACK_SAVEAREA_MODE(LEVEL) Pmode
207 #endif
209 /* Supply a default definition of STACK_SIZE_MODE for
210 allocate_dynamic_stack_space. Normally PLUS/MINUS, so word_mode. */
212 #ifndef STACK_SIZE_MODE
213 #define STACK_SIZE_MODE word_mode
214 #endif
216 /* Provide default values for the macros controlling stack checking. */
218 #ifndef STACK_CHECK_BUILTIN
219 #define STACK_CHECK_BUILTIN 0
220 #endif
222 /* The default interval is one page. */
223 #ifndef STACK_CHECK_PROBE_INTERVAL
224 #define STACK_CHECK_PROBE_INTERVAL 4096
225 #endif
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
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
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
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
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
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.
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.
265 The `lib_call' slot is the name of the library function that
266 can be used to perform the operation.
268 A few optabs, such as move_optab and cmp_optab, are used
269 by special code. */
271 typedef struct optab
273 enum rtx_code code;
274 struct {
275 enum insn_code insn_code;
276 rtx libfunc;
277 } handlers [NUM_MACHINE_MODES];
278 } * optab;
280 /* Given an enum insn_code, access the function to construct
281 the body of that kind of insn. */
282 #define GEN_FCN(CODE) (*insn_data[(int) (CODE)].genfun)
284 /* Enumeration of valid indexes into optab_table. */
285 enum optab_index
287 OTI_add,
288 OTI_addv,
289 OTI_sub,
290 OTI_subv,
292 /* Signed and fp multiply */
293 OTI_smul,
294 OTI_smulv,
295 /* Signed multiply, return high word */
296 OTI_smul_highpart,
297 OTI_umul_highpart,
298 /* Signed multiply with result one machine mode wider than args */
299 OTI_smul_widen,
300 OTI_umul_widen,
302 /* Signed divide */
303 OTI_sdiv,
304 OTI_sdivv,
305 /* Signed divide-and-remainder in one */
306 OTI_sdivmod,
307 OTI_udiv,
308 OTI_udivmod,
309 /* Signed remainder */
310 OTI_smod,
311 OTI_umod,
312 /* Optab for floating divide. */
313 OTI_flodiv,
314 /* Convert float to integer in float fmt */
315 OTI_ftrunc,
317 /* Logical and */
318 OTI_and,
319 /* Logical or */
320 OTI_ior,
321 /* Logical xor */
322 OTI_xor,
324 /* Arithmetic shift left */
325 OTI_ashl,
326 /* Logical shift right */
327 OTI_lshr,
328 /* Arithmetic shift right */
329 OTI_ashr,
330 /* Rotate left */
331 OTI_rotl,
332 /* Rotate right */
333 OTI_rotr,
334 /* Signed and floating-point minimum value */
335 OTI_smin,
336 /* Signed and floating-point maximum value */
337 OTI_smax,
338 /* Unsigned minimum value */
339 OTI_umin,
340 /* Unsigned maximum value */
341 OTI_umax,
343 /* Move instruction. */
344 OTI_mov,
345 /* Move, preserving high part of register. */
346 OTI_movstrict,
348 /* Unary operations */
349 /* Negation */
350 OTI_neg,
351 OTI_negv,
352 /* Abs value */
353 OTI_abs,
354 OTI_absv,
355 /* Bitwise not */
356 OTI_one_cmpl,
357 /* Find first bit set */
358 OTI_ffs,
359 /* Square root */
360 OTI_sqrt,
361 /* Sine */
362 OTI_sin,
363 /* Cosine */
364 OTI_cos,
366 /* Compare insn; two operands. */
367 OTI_cmp,
368 /* Used only for libcalls for unsigned comparisons. */
369 OTI_ucmp,
370 /* tst insn; compare one operand against 0 */
371 OTI_tst,
373 /* String length */
374 OTI_strlen,
376 /* Combined compare & jump/store flags/move operations. */
377 OTI_cbranch,
378 OTI_cmov,
379 OTI_cstore,
381 OTI_MAX
384 extern optab optab_table[OTI_MAX];
386 #define add_optab (optab_table[OTI_add])
387 #define sub_optab (optab_table[OTI_sub])
388 #define smul_optab (optab_table[OTI_smul])
389 #define addv_optab (optab_table[OTI_addv])
390 #define subv_optab (optab_table[OTI_subv])
391 #define smul_highpart_optab (optab_table[OTI_smul_highpart])
392 #define umul_highpart_optab (optab_table[OTI_umul_highpart])
393 #define smul_widen_optab (optab_table[OTI_smul_widen])
394 #define umul_widen_optab (optab_table[OTI_umul_widen])
395 #define sdiv_optab (optab_table[OTI_sdiv])
396 #define smulv_optab (optab_table[OTI_smulv])
397 #define sdivv_optab (optab_table[OTI_sdivv])
398 #define sdivmod_optab (optab_table[OTI_sdivmod])
399 #define udiv_optab (optab_table[OTI_udiv])
400 #define udivmod_optab (optab_table[OTI_udivmod])
401 #define smod_optab (optab_table[OTI_smod])
402 #define umod_optab (optab_table[OTI_umod])
403 #define flodiv_optab (optab_table[OTI_flodiv])
404 #define ftrunc_optab (optab_table[OTI_ftrunc])
405 #define and_optab (optab_table[OTI_and])
406 #define ior_optab (optab_table[OTI_ior])
407 #define xor_optab (optab_table[OTI_xor])
408 #define ashl_optab (optab_table[OTI_ashl])
409 #define lshr_optab (optab_table[OTI_lshr])
410 #define ashr_optab (optab_table[OTI_ashr])
411 #define rotl_optab (optab_table[OTI_rotl])
412 #define rotr_optab (optab_table[OTI_rotr])
413 #define smin_optab (optab_table[OTI_smin])
414 #define smax_optab (optab_table[OTI_smax])
415 #define umin_optab (optab_table[OTI_umin])
416 #define umax_optab (optab_table[OTI_umax])
418 #define mov_optab (optab_table[OTI_mov])
419 #define movstrict_optab (optab_table[OTI_movstrict])
421 #define neg_optab (optab_table[OTI_neg])
422 #define negv_optab (optab_table[OTI_negv])
423 #define abs_optab (optab_table[OTI_abs])
424 #define absv_optab (optab_table[OTI_absv])
425 #define one_cmpl_optab (optab_table[OTI_one_cmpl])
426 #define ffs_optab (optab_table[OTI_ffs])
427 #define sqrt_optab (optab_table[OTI_sqrt])
428 #define sin_optab (optab_table[OTI_sin])
429 #define cos_optab (optab_table[OTI_cos])
431 #define cmp_optab (optab_table[OTI_cmp])
432 #define ucmp_optab (optab_table[OTI_ucmp])
433 #define tst_optab (optab_table[OTI_tst])
435 #define strlen_optab (optab_table[OTI_strlen])
437 #define cbranch_optab (optab_table[OTI_cbranch])
438 #define cmov_optab (optab_table[OTI_cmov])
439 #define cstore_optab (optab_table[OTI_cstore])
441 /* Tables of patterns for extending one integer mode to another. */
442 extern enum insn_code extendtab[MAX_MACHINE_MODE][MAX_MACHINE_MODE][2];
444 /* Tables of patterns for converting between fixed and floating point. */
445 extern enum insn_code fixtab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2];
446 extern enum insn_code fixtrunctab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2];
447 extern enum insn_code floattab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2];
449 /* Contains the optab used for each rtx code. */
450 extern optab code_to_optab[NUM_RTX_CODE + 1];
452 /* Passed to expand_binop and expand_unop to say which options to try to use
453 if the requested operation can't be open-coded on the requisite mode.
454 Either OPTAB_LIB or OPTAB_LIB_WIDEN says try using a library call.
455 Either OPTAB_WIDEN or OPTAB_LIB_WIDEN says try using a wider mode.
456 OPTAB_MUST_WIDEN says try widening and don't try anything else. */
458 enum optab_methods
460 OPTAB_DIRECT,
461 OPTAB_LIB,
462 OPTAB_WIDEN,
463 OPTAB_LIB_WIDEN,
464 OPTAB_MUST_WIDEN
467 /* Enumeration of indexes into libfunc_table. */
468 enum libfunc_index
470 LTI_extendsfdf2,
471 LTI_extendsfxf2,
472 LTI_extendsftf2,
473 LTI_extenddfxf2,
474 LTI_extenddftf2,
476 LTI_truncdfsf2,
477 LTI_truncxfsf2,
478 LTI_trunctfsf2,
479 LTI_truncxfdf2,
480 LTI_trunctfdf2,
482 LTI_memcpy,
483 LTI_memmove,
484 LTI_bcopy,
485 LTI_memcmp,
486 LTI_bcmp,
487 LTI_memset,
488 LTI_bzero,
490 LTI_unwind_resume,
491 LTI_eh_personality,
492 LTI_setjmp,
493 LTI_longjmp,
494 LTI_unwind_sjlj_register,
495 LTI_unwind_sjlj_unregister,
497 LTI_eqhf2,
498 LTI_nehf2,
499 LTI_gthf2,
500 LTI_gehf2,
501 LTI_lthf2,
502 LTI_lehf2,
503 LTI_unordhf2,
505 LTI_eqsf2,
506 LTI_nesf2,
507 LTI_gtsf2,
508 LTI_gesf2,
509 LTI_ltsf2,
510 LTI_lesf2,
511 LTI_unordsf2,
513 LTI_eqdf2,
514 LTI_nedf2,
515 LTI_gtdf2,
516 LTI_gedf2,
517 LTI_ltdf2,
518 LTI_ledf2,
519 LTI_unorddf2,
521 LTI_eqxf2,
522 LTI_nexf2,
523 LTI_gtxf2,
524 LTI_gexf2,
525 LTI_ltxf2,
526 LTI_lexf2,
527 LTI_unordxf2,
529 LTI_eqtf2,
530 LTI_netf2,
531 LTI_gttf2,
532 LTI_getf2,
533 LTI_lttf2,
534 LTI_letf2,
535 LTI_unordtf2,
537 LTI_floatsisf,
538 LTI_floatdisf,
539 LTI_floattisf,
541 LTI_floatsidf,
542 LTI_floatdidf,
543 LTI_floattidf,
545 LTI_floatsixf,
546 LTI_floatdixf,
547 LTI_floattixf,
549 LTI_floatsitf,
550 LTI_floatditf,
551 LTI_floattitf,
553 LTI_fixsfsi,
554 LTI_fixsfdi,
555 LTI_fixsfti,
557 LTI_fixdfsi,
558 LTI_fixdfdi,
559 LTI_fixdfti,
561 LTI_fixxfsi,
562 LTI_fixxfdi,
563 LTI_fixxfti,
565 LTI_fixtfsi,
566 LTI_fixtfdi,
567 LTI_fixtfti,
569 LTI_fixunssfsi,
570 LTI_fixunssfdi,
571 LTI_fixunssfti,
573 LTI_fixunsdfsi,
574 LTI_fixunsdfdi,
575 LTI_fixunsdfti,
577 LTI_fixunsxfsi,
578 LTI_fixunsxfdi,
579 LTI_fixunsxfti,
581 LTI_fixunstfsi,
582 LTI_fixunstfdi,
583 LTI_fixunstfti,
585 LTI_chkr_check_addr,
586 LTI_chkr_set_right,
587 LTI_chkr_copy_bitmap,
588 LTI_chkr_check_exec,
589 LTI_chkr_check_str,
591 LTI_profile_function_entry,
592 LTI_profile_function_exit,
594 LTI_MAX
597 /* SYMBOL_REF rtx's for the library functions that are called
598 implicitly and not via optabs. */
599 extern rtx libfunc_table[LTI_MAX];
601 /* Accessor macros for libfunc_table. */
602 #define extendsfdf2_libfunc (libfunc_table[LTI_extendsfdf2])
603 #define extendsfxf2_libfunc (libfunc_table[LTI_extendsfxf2])
604 #define extendsftf2_libfunc (libfunc_table[LTI_extendsftf2])
605 #define extenddfxf2_libfunc (libfunc_table[LTI_extenddfxf2])
606 #define extenddftf2_libfunc (libfunc_table[LTI_extenddftf2])
608 #define truncdfsf2_libfunc (libfunc_table[LTI_truncdfsf2])
609 #define truncxfsf2_libfunc (libfunc_table[LTI_truncxfsf2])
610 #define trunctfsf2_libfunc (libfunc_table[LTI_trunctfsf2])
611 #define truncxfdf2_libfunc (libfunc_table[LTI_truncxfdf2])
612 #define trunctfdf2_libfunc (libfunc_table[LTI_trunctfdf2])
614 #define memcpy_libfunc (libfunc_table[LTI_memcpy])
615 #define memmove_libfunc (libfunc_table[LTI_memmove])
616 #define bcopy_libfunc (libfunc_table[LTI_bcopy])
617 #define memcmp_libfunc (libfunc_table[LTI_memcmp])
618 #define bcmp_libfunc (libfunc_table[LTI_bcmp])
619 #define memset_libfunc (libfunc_table[LTI_memset])
620 #define bzero_libfunc (libfunc_table[LTI_bzero])
622 #define unwind_resume_libfunc (libfunc_table[LTI_unwind_resume])
623 #define eh_personality_libfunc (libfunc_table[LTI_eh_personality])
624 #define setjmp_libfunc (libfunc_table[LTI_setjmp])
625 #define longjmp_libfunc (libfunc_table[LTI_longjmp])
626 #define unwind_sjlj_register_libfunc (libfunc_table[LTI_unwind_sjlj_register])
627 #define unwind_sjlj_unregister_libfunc \
628 (libfunc_table[LTI_unwind_sjlj_unregister])
630 #define eqhf2_libfunc (libfunc_table[LTI_eqhf2])
631 #define nehf2_libfunc (libfunc_table[LTI_nehf2])
632 #define gthf2_libfunc (libfunc_table[LTI_gthf2])
633 #define gehf2_libfunc (libfunc_table[LTI_gehf2])
634 #define lthf2_libfunc (libfunc_table[LTI_lthf2])
635 #define lehf2_libfunc (libfunc_table[LTI_lehf2])
636 #define unordhf2_libfunc (libfunc_table[LTI_unordhf2])
638 #define eqsf2_libfunc (libfunc_table[LTI_eqsf2])
639 #define nesf2_libfunc (libfunc_table[LTI_nesf2])
640 #define gtsf2_libfunc (libfunc_table[LTI_gtsf2])
641 #define gesf2_libfunc (libfunc_table[LTI_gesf2])
642 #define ltsf2_libfunc (libfunc_table[LTI_ltsf2])
643 #define lesf2_libfunc (libfunc_table[LTI_lesf2])
644 #define unordsf2_libfunc (libfunc_table[LTI_unordsf2])
646 #define eqdf2_libfunc (libfunc_table[LTI_eqdf2])
647 #define nedf2_libfunc (libfunc_table[LTI_nedf2])
648 #define gtdf2_libfunc (libfunc_table[LTI_gtdf2])
649 #define gedf2_libfunc (libfunc_table[LTI_gedf2])
650 #define ltdf2_libfunc (libfunc_table[LTI_ltdf2])
651 #define ledf2_libfunc (libfunc_table[LTI_ledf2])
652 #define unorddf2_libfunc (libfunc_table[LTI_unorddf2])
654 #define eqxf2_libfunc (libfunc_table[LTI_eqxf2])
655 #define nexf2_libfunc (libfunc_table[LTI_nexf2])
656 #define gtxf2_libfunc (libfunc_table[LTI_gtxf2])
657 #define gexf2_libfunc (libfunc_table[LTI_gexf2])
658 #define ltxf2_libfunc (libfunc_table[LTI_ltxf2])
659 #define lexf2_libfunc (libfunc_table[LTI_lexf2])
660 #define unordxf2_libfunc (libfunc_table[LTI_unordxf2])
662 #define eqtf2_libfunc (libfunc_table[LTI_eqtf2])
663 #define netf2_libfunc (libfunc_table[LTI_netf2])
664 #define gttf2_libfunc (libfunc_table[LTI_gttf2])
665 #define getf2_libfunc (libfunc_table[LTI_getf2])
666 #define lttf2_libfunc (libfunc_table[LTI_lttf2])
667 #define letf2_libfunc (libfunc_table[LTI_letf2])
668 #define unordtf2_libfunc (libfunc_table[LTI_unordtf2])
670 #define floatsisf_libfunc (libfunc_table[LTI_floatsisf])
671 #define floatdisf_libfunc (libfunc_table[LTI_floatdisf])
672 #define floattisf_libfunc (libfunc_table[LTI_floattisf])
674 #define floatsidf_libfunc (libfunc_table[LTI_floatsidf])
675 #define floatdidf_libfunc (libfunc_table[LTI_floatdidf])
676 #define floattidf_libfunc (libfunc_table[LTI_floattidf])
678 #define floatsixf_libfunc (libfunc_table[LTI_floatsixf])
679 #define floatdixf_libfunc (libfunc_table[LTI_floatdixf])
680 #define floattixf_libfunc (libfunc_table[LTI_floattixf])
682 #define floatsitf_libfunc (libfunc_table[LTI_floatsitf])
683 #define floatditf_libfunc (libfunc_table[LTI_floatditf])
684 #define floattitf_libfunc (libfunc_table[LTI_floattitf])
686 #define fixsfsi_libfunc (libfunc_table[LTI_fixsfsi])
687 #define fixsfdi_libfunc (libfunc_table[LTI_fixsfdi])
688 #define fixsfti_libfunc (libfunc_table[LTI_fixsfti])
690 #define fixdfsi_libfunc (libfunc_table[LTI_fixdfsi])
691 #define fixdfdi_libfunc (libfunc_table[LTI_fixdfdi])
692 #define fixdfti_libfunc (libfunc_table[LTI_fixdfti])
694 #define fixxfsi_libfunc (libfunc_table[LTI_fixxfsi])
695 #define fixxfdi_libfunc (libfunc_table[LTI_fixxfdi])
696 #define fixxfti_libfunc (libfunc_table[LTI_fixxfti])
698 #define fixtfsi_libfunc (libfunc_table[LTI_fixtfsi])
699 #define fixtfdi_libfunc (libfunc_table[LTI_fixtfdi])
700 #define fixtfti_libfunc (libfunc_table[LTI_fixtfti])
702 #define fixunssfsi_libfunc (libfunc_table[LTI_fixunssfsi])
703 #define fixunssfdi_libfunc (libfunc_table[LTI_fixunssfdi])
704 #define fixunssfti_libfunc (libfunc_table[LTI_fixunssfti])
706 #define fixunsdfsi_libfunc (libfunc_table[LTI_fixunsdfsi])
707 #define fixunsdfdi_libfunc (libfunc_table[LTI_fixunsdfdi])
708 #define fixunsdfti_libfunc (libfunc_table[LTI_fixunsdfti])
710 #define fixunsxfsi_libfunc (libfunc_table[LTI_fixunsxfsi])
711 #define fixunsxfdi_libfunc (libfunc_table[LTI_fixunsxfdi])
712 #define fixunsxfti_libfunc (libfunc_table[LTI_fixunsxfti])
714 #define fixunstfsi_libfunc (libfunc_table[LTI_fixunstfsi])
715 #define fixunstfdi_libfunc (libfunc_table[LTI_fixunstfdi])
716 #define fixunstfti_libfunc (libfunc_table[LTI_fixunstfti])
718 #define chkr_check_addr_libfunc (libfunc_table[LTI_chkr_check_addr])
719 #define chkr_set_right_libfunc (libfunc_table[LTI_chkr_set_right])
720 #define chkr_copy_bitmap_libfunc (libfunc_table[LTI_chkr_copy_bitmap])
721 #define chkr_check_exec_libfunc (libfunc_table[LTI_chkr_check_exec])
722 #define chkr_check_str_libfunc (libfunc_table[LTI_chkr_check_str])
724 #define profile_function_entry_libfunc (libfunc_table[LTI_profile_function_entry])
725 #define profile_function_exit_libfunc (libfunc_table[LTI_profile_function_exit])
727 typedef rtx (*rtxfun) PARAMS ((rtx));
729 /* Indexed by the rtx-code for a conditional (eg. EQ, LT,...)
730 gives the gen_function to make a branch to test that condition. */
732 extern rtxfun bcc_gen_fctn[NUM_RTX_CODE];
734 /* Indexed by the rtx-code for a conditional (eg. EQ, LT,...)
735 gives the insn code to make a store-condition insn
736 to test that condition. */
738 extern enum insn_code setcc_gen_code[NUM_RTX_CODE];
740 #ifdef HAVE_conditional_move
741 /* Indexed by the machine mode, gives the insn code to make a conditional
742 move insn. */
744 extern enum insn_code movcc_gen_code[NUM_MACHINE_MODES];
745 #endif
747 /* This array records the insn_code of insns to perform block moves. */
748 extern enum insn_code movstr_optab[NUM_MACHINE_MODES];
750 /* This array records the insn_code of insns to perform block clears. */
751 extern enum insn_code clrstr_optab[NUM_MACHINE_MODES];
753 /* Define functions given in optabs.c. */
755 /* Expand a binary operation given optab and rtx operands. */
756 extern rtx expand_binop PARAMS ((enum machine_mode, optab, rtx, rtx, rtx,
757 int, enum optab_methods));
759 /* Expand a binary operation with both signed and unsigned forms. */
760 extern rtx sign_expand_binop PARAMS ((enum machine_mode, optab, optab, rtx,
761 rtx, rtx, int, enum optab_methods));
763 /* Generate code to perform an operation on two operands with two results. */
764 extern int expand_twoval_binop PARAMS ((optab, rtx, rtx, rtx, rtx, int));
766 /* Expand a unary arithmetic operation given optab rtx operand. */
767 extern rtx expand_unop PARAMS ((enum machine_mode, optab, rtx, rtx, int));
769 /* Expand the absolute value operation. */
770 extern rtx expand_abs PARAMS ((enum machine_mode, rtx, rtx, int, int));
772 /* Expand the complex absolute value operation. */
773 extern rtx expand_complex_abs PARAMS ((enum machine_mode, rtx, rtx, int));
775 /* Generate an instruction with a given INSN_CODE with an output and
776 an input. */
777 extern void emit_unop_insn PARAMS ((int, rtx, rtx, enum rtx_code));
779 /* Emit code to perform a series of operations on a multi-word quantity, one
780 word at a time. */
781 extern rtx emit_no_conflict_block PARAMS ((rtx, rtx, rtx, rtx, rtx));
783 /* Emit code to make a call to a constant function or a library call. */
784 extern void emit_libcall_block PARAMS ((rtx, rtx, rtx, rtx));
786 /* Emit one rtl instruction to store zero in specified rtx. */
787 extern void emit_clr_insn PARAMS ((rtx));
789 /* Emit one rtl insn to store 1 in specified rtx assuming it contains 0. */
790 extern void emit_0_to_1_insn PARAMS ((rtx));
792 /* Emit one rtl insn to compare two rtx's. */
793 extern void emit_cmp_insn PARAMS ((rtx, rtx, enum rtx_code, rtx,
794 enum machine_mode, int, unsigned int));
796 /* Emit a pair of rtl insns to compare two rtx's and to jump
797 to a label if the comparison is true. */
798 extern void emit_cmp_and_jump_insns PARAMS ((rtx, rtx, enum rtx_code, rtx,
799 enum machine_mode, int,
800 unsigned int, rtx));
802 /* The various uses that a comparison can have; used by can_compare_p:
803 jumps, conditional moves, store flag operations. */
804 enum can_compare_purpose
806 ccp_jump,
807 ccp_cmov,
808 ccp_store_flag
811 /* Nonzero if a compare of mode MODE can be done straightforwardly
812 (without splitting it into pieces). */
813 extern int can_compare_p PARAMS ((enum rtx_code, enum machine_mode,
814 enum can_compare_purpose));
816 extern void prepare_cmp_insn PARAMS ((rtx *, rtx *, enum rtx_code *, rtx,
817 enum machine_mode *, int *, int,
818 enum can_compare_purpose));
820 extern rtx prepare_operand PARAMS ((int, rtx, int, enum machine_mode,
821 enum machine_mode, int));
823 /* Generate code to indirectly jump to a location given in the rtx LOC. */
824 extern void emit_indirect_jump PARAMS ((rtx));
826 #ifdef HAVE_conditional_move
827 /* Emit a conditional move operation. */
828 rtx emit_conditional_move PARAMS ((rtx, enum rtx_code, rtx, rtx,
829 enum machine_mode, rtx, rtx,
830 enum machine_mode, int));
832 /* Return non-zero if the conditional move is supported. */
833 int can_conditionally_move_p PARAMS ((enum machine_mode mode));
835 #endif
837 /* Create but don't emit one rtl instruction to add one rtx into another.
838 Modes must match; operands must meet the operation's predicates.
839 Likewise for subtraction and for just copying.
840 These do not call protect_from_queue; caller must do so. */
841 extern rtx gen_add2_insn PARAMS ((rtx, rtx));
842 extern rtx gen_sub2_insn PARAMS ((rtx, rtx));
843 extern rtx gen_move_insn PARAMS ((rtx, rtx));
844 extern int have_add2_insn PARAMS ((enum machine_mode));
845 extern int have_sub2_insn PARAMS ((enum machine_mode));
847 /* Return the INSN_CODE to use for an extend operation. */
848 extern enum insn_code can_extend_p PARAMS ((enum machine_mode,
849 enum machine_mode, int));
851 /* Generate the body of an insn to extend Y (with mode MFROM)
852 into X (with mode MTO). Do zero-extension if UNSIGNEDP is nonzero. */
853 extern rtx gen_extend_insn PARAMS ((rtx, rtx, enum machine_mode,
854 enum machine_mode, int));
856 /* Initialize the tables that control conversion between fixed and
857 floating values. */
858 extern void init_fixtab PARAMS ((void));
859 extern void init_floattab PARAMS ((void));
861 /* Generate code for a FLOAT_EXPR. */
862 extern void expand_float PARAMS ((rtx, rtx, int));
864 /* Generate code for a FIX_EXPR. */
865 extern void expand_fix PARAMS ((rtx, rtx, int));
867 /* Call this to initialize an optab function entry. */
868 extern rtx init_one_libfunc PARAMS ((const char *));
870 /* Call this once to initialize the contents of the optabs
871 appropriately for the current target machine. */
872 extern void init_optabs PARAMS ((void));
874 /* Functions from expmed.c: */
876 /* Arguments MODE, RTX: return an rtx for the negation of that value.
877 May emit insns. */
878 extern rtx negate_rtx PARAMS ((enum machine_mode, rtx));
880 /* Expand a logical AND operation. */
881 extern rtx expand_and PARAMS ((rtx, rtx, rtx));
883 /* Emit a store-flag operation. */
884 extern rtx emit_store_flag PARAMS ((rtx, enum rtx_code, rtx, rtx,
885 enum machine_mode, int, int));
887 /* Like emit_store_flag, but always succeeds. */
888 extern rtx emit_store_flag_force PARAMS ((rtx, enum rtx_code, rtx, rtx,
889 enum machine_mode, int, int));
891 /* Functions from loop.c: */
893 /* Given an insn and condition, return a canonical description of
894 the test being made. */
895 extern rtx canonicalize_condition PARAMS ((rtx, rtx, int, rtx *, rtx));
897 /* Given a JUMP_INSN, return a canonical description of the test
898 being made. */
899 extern rtx get_condition PARAMS ((rtx, rtx *));
901 /* Generate a conditional trap instruction. */
902 extern rtx gen_cond_trap PARAMS ((enum rtx_code, rtx, rtx, rtx));
904 /* Functions from builtins.c: */
905 #ifdef TREE_CODE
906 extern rtx expand_builtin PARAMS ((tree, rtx, rtx, enum machine_mode, int));
907 extern void std_expand_builtin_va_start PARAMS ((int, tree, rtx));
908 extern rtx std_expand_builtin_va_arg PARAMS ((tree, tree));
909 extern rtx expand_builtin_va_arg PARAMS ((tree, tree));
910 #endif
912 extern void expand_builtin_setjmp_setup PARAMS ((rtx, rtx));
913 extern void expand_builtin_setjmp_receiver PARAMS ((rtx));
914 extern void expand_builtin_longjmp PARAMS ((rtx, rtx));
915 extern rtx expand_builtin_saveregs PARAMS ((void));
916 extern HOST_WIDE_INT get_varargs_alias_set PARAMS ((void));
917 extern HOST_WIDE_INT get_frame_alias_set PARAMS ((void));
918 extern void record_base_value PARAMS ((unsigned int, rtx, int));
919 extern void record_alias_subset PARAMS ((HOST_WIDE_INT,
920 HOST_WIDE_INT));
921 extern HOST_WIDE_INT new_alias_set PARAMS ((void));
923 /* Functions from expr.c: */
925 /* This is run once per compilation to set up which modes can be used
926 directly in memory and to initialize the block move optab. */
927 extern void init_expr_once PARAMS ((void));
929 /* This is run at the start of compiling a function. */
930 extern void init_expr PARAMS ((void));
932 /* This function is run once to initialize stor-layout.c. */
934 extern void init_stor_layout_once PARAMS ((void));
936 /* This is run at the end of compiling a function. */
937 extern void finish_expr_for_function PARAMS ((void));
939 /* Use protect_from_queue to convert a QUEUED expression
940 into something that you can put immediately into an instruction. */
941 extern rtx protect_from_queue PARAMS ((rtx, int));
943 /* Perform all the pending incrementations. */
944 extern void emit_queue PARAMS ((void));
946 /* Tell if something has a queued subexpression. */
947 extern int queued_subexp_p PARAMS ((rtx));
949 /* Emit some rtl insns to move data between rtx's, converting machine modes.
950 Both modes must be floating or both fixed. */
951 extern void convert_move PARAMS ((rtx, rtx, int));
953 /* Convert an rtx to specified machine mode and return the result. */
954 extern rtx convert_to_mode PARAMS ((enum machine_mode, rtx, int));
956 /* Convert an rtx to MODE from OLDMODE and return the result. */
957 extern rtx convert_modes PARAMS ((enum machine_mode, enum machine_mode,
958 rtx, int));
960 /* Emit code to move a block Y to a block X. */
961 extern rtx emit_block_move PARAMS ((rtx, rtx, rtx, unsigned int));
963 /* Copy all or part of a value X into registers starting at REGNO.
964 The number of registers to be filled is NREGS. */
965 extern void move_block_to_reg PARAMS ((int, rtx, int, enum machine_mode));
967 /* Copy all or part of a BLKmode value X out of registers starting at REGNO.
968 The number of registers to be filled is NREGS. */
969 extern void move_block_from_reg PARAMS ((int, rtx, int, int));
971 /* Load a BLKmode value into non-consecutive registers represented by a
972 PARALLEL. */
973 extern void emit_group_load PARAMS ((rtx, rtx, int, unsigned int));
975 /* Store a BLKmode value from non-consecutive registers represented by a
976 PARALLEL. */
977 extern void emit_group_store PARAMS ((rtx, rtx, int, unsigned int));
979 #ifdef TREE_CODE
980 /* Copy BLKmode object from a set of registers. */
981 extern rtx copy_blkmode_from_reg PARAMS ((rtx,rtx,tree));
982 #endif
984 /* Mark REG as holding a parameter for the next CALL_INSN. */
985 extern void use_reg PARAMS ((rtx *, rtx));
987 /* Mark NREGS consecutive regs, starting at REGNO, as holding parameters
988 for the next CALL_INSN. */
989 extern void use_regs PARAMS ((rtx *, int, int));
991 /* Mark a PARALLEL as holding a parameter for the next CALL_INSN. */
992 extern void use_group_regs PARAMS ((rtx *, rtx));
994 /* Write zeros through the storage of OBJECT.
995 If OBJECT has BLKmode, SIZE is its length in bytes and ALIGN is its
996 alignment. */
997 extern rtx clear_storage PARAMS ((rtx, rtx, unsigned int));
999 /* Return non-zero if it is desirable to store LEN bytes generated by
1000 CONSTFUN with several move instructions by store_by_pieces
1001 function. CONSTFUNDATA is a pointer which will be passed as argument
1002 in every CONSTFUN call.
1003 ALIGN is maximum alignment we can assume. */
1004 extern int can_store_by_pieces PARAMS ((unsigned HOST_WIDE_INT,
1005 rtx (*) (PTR, HOST_WIDE_INT,
1006 enum machine_mode),
1007 PTR, unsigned int));
1009 /* Generate several move instructions to store LEN bytes generated by
1010 CONSTFUN to block TO. (A MEM rtx with BLKmode). CONSTFUNDATA is a
1011 pointer which will be passed as argument in every CONSTFUN call.
1012 ALIGN is maximum alignment we can assume. */
1013 extern void store_by_pieces PARAMS ((rtx, unsigned HOST_WIDE_INT,
1014 rtx (*) (PTR, HOST_WIDE_INT,
1015 enum machine_mode),
1016 PTR, unsigned int));
1018 /* Emit insns to set X from Y. */
1019 extern rtx emit_move_insn PARAMS ((rtx, rtx));
1021 /* Emit insns to set X from Y, with no frills. */
1022 extern rtx emit_move_insn_1 PARAMS ((rtx, rtx));
1024 /* Push a block of length SIZE (perhaps variable)
1025 and return an rtx to address the beginning of the block. */
1026 extern rtx push_block PARAMS ((rtx, int, int));
1028 #ifdef TREE_CODE
1029 /* Generate code to push something onto the stack, given its mode and type. */
1030 extern void emit_push_insn PARAMS ((rtx, enum machine_mode, tree, rtx,
1031 unsigned int, int, rtx, int, rtx, rtx,
1032 int, rtx));
1034 /* Expand an assignment that stores the value of FROM into TO. */
1035 extern rtx expand_assignment PARAMS ((tree, tree, int, int));
1037 /* Generate code for computing expression EXP,
1038 and storing the value into TARGET.
1039 If SUGGEST_REG is nonzero, copy the value through a register
1040 and return that register, if that is possible. */
1041 extern rtx store_expr PARAMS ((tree, rtx, int));
1042 #endif
1044 /* Given an rtx that may include add and multiply operations,
1045 generate them as insns and return a pseudo-reg containing the value.
1046 Useful after calling expand_expr with 1 as sum_ok. */
1047 extern rtx force_operand PARAMS ((rtx, rtx));
1049 #ifdef TREE_CODE
1050 /* Generate code for computing expression EXP.
1051 An rtx for the computed value is returned. The value is never null.
1052 In the case of a void EXP, const0_rtx is returned. */
1053 extern rtx expand_expr PARAMS ((tree, rtx, enum machine_mode,
1054 enum expand_modifier));
1055 #endif
1057 /* At the start of a function, record that we have no previously-pushed
1058 arguments waiting to be popped. */
1059 extern void init_pending_stack_adjust PARAMS ((void));
1061 /* When exiting from function, if safe, clear out any pending stack adjust
1062 so the adjustment won't get done. */
1063 extern void clear_pending_stack_adjust PARAMS ((void));
1065 /* Pop any previously-pushed arguments that have not been popped yet. */
1066 extern void do_pending_stack_adjust PARAMS ((void));
1068 #ifdef TREE_CODE
1069 /* Return the tree node and offset if a given argument corresponds to
1070 a string constant. */
1071 extern tree string_constant PARAMS ((tree, tree *));
1073 /* Generate code to evaluate EXP and jump to LABEL if the value is zero. */
1074 extern void jumpifnot PARAMS ((tree, rtx));
1076 /* Generate code to evaluate EXP and jump to LABEL if the value is nonzero. */
1077 extern void jumpif PARAMS ((tree, rtx));
1079 /* Generate code to evaluate EXP and jump to IF_FALSE_LABEL if
1080 the result is zero, or IF_TRUE_LABEL if the result is one. */
1081 extern void do_jump PARAMS ((tree, rtx, rtx));
1082 #endif
1084 /* Generate rtl to compare two rtx's, will call emit_cmp_insn. */
1085 extern rtx compare_from_rtx PARAMS ((rtx, rtx, enum rtx_code, int,
1086 enum machine_mode, rtx, unsigned int));
1087 extern void do_compare_rtx_and_jump PARAMS ((rtx, rtx, enum rtx_code, int,
1088 enum machine_mode, rtx,
1089 unsigned int, rtx, rtx));
1091 /* Generate a tablejump instruction (used for switch statements). */
1092 extern void do_tablejump PARAMS ((rtx, enum machine_mode, rtx, rtx, rtx));
1094 #ifdef TREE_CODE
1095 /* rtl.h and tree.h were included. */
1096 /* Return an rtx for the size in bytes of the value of an expr. */
1097 extern rtx expr_size PARAMS ((tree));
1099 extern rtx lookup_static_chain PARAMS ((tree));
1101 /* Convert a stack slot address ADDR valid in function FNDECL
1102 into an address valid in this function (using a static chain). */
1103 extern rtx fix_lexical_addr PARAMS ((rtx, tree));
1105 /* Return the address of the trampoline for entering nested fn FUNCTION. */
1106 extern rtx trampoline_address PARAMS ((tree));
1108 /* Return an rtx that refers to the value returned by a function
1109 in its original home. This becomes invalid if any more code is emitted. */
1110 extern rtx hard_function_value PARAMS ((tree, tree, int));
1112 extern rtx prepare_call_address PARAMS ((rtx, tree, rtx *, int));
1114 extern rtx expand_call PARAMS ((tree, rtx, int));
1116 extern rtx expand_shift PARAMS ((enum tree_code, enum machine_mode, rtx, tree,
1117 rtx, int));
1118 extern rtx expand_divmod PARAMS ((int, enum tree_code, enum machine_mode, rtx,
1119 rtx, rtx, int));
1120 extern void locate_and_pad_parm PARAMS ((enum machine_mode, tree, int, tree,
1121 struct args_size *,
1122 struct args_size *,
1123 struct args_size *,
1124 struct args_size *));
1125 extern rtx expand_inline_function PARAMS ((tree, tree, rtx, int, tree, rtx));
1127 /* Return the CODE_LABEL rtx for a LABEL_DECL, creating it if necessary. */
1128 extern rtx label_rtx PARAMS ((tree));
1129 #endif
1131 /* Indicate how an input argument register was promoted. */
1132 extern rtx promoted_input_arg PARAMS ((unsigned int, enum machine_mode *,
1133 int *));
1135 /* Return an rtx like arg but sans any constant terms.
1136 Returns the original rtx if it has no constant terms.
1137 The constant terms are added and stored via a second arg. */
1138 extern rtx eliminate_constant_term PARAMS ((rtx, rtx *));
1140 /* Convert arg to a valid memory address for specified machine mode,
1141 by emitting insns to perform arithmetic if nec. */
1142 extern rtx memory_address PARAMS ((enum machine_mode, rtx));
1144 /* Like `memory_address' but pretent `flag_force_addr' is 0. */
1145 extern rtx memory_address_noforce PARAMS ((enum machine_mode, rtx));
1147 /* Return a memory reference like MEMREF, but with its mode changed
1148 to MODE and its address changed to ADDR.
1149 (VOIDmode means don't change the mode.
1150 NULL for ADDR means don't change the address.) */
1151 extern rtx change_address PARAMS ((rtx, enum machine_mode, rtx));
1153 /* Return a memory reference like MEMREF, but which is known to have a
1154 valid address. */
1155 extern rtx validize_mem PARAMS ((rtx));
1157 #ifdef TREE_CODE
1158 /* Given REF, either a MEM or a REG, and T, either the type of X or
1159 the expression corresponding to REF, set RTX_UNCHANGING_P if
1160 appropriate. */
1161 extern void maybe_set_unchanging PARAMS ((rtx, tree));
1163 /* Given REF, a MEM, and T, either the type of X or the expression
1164 corresponding to REF, set the memory attributes. OBJECTP is nonzero
1165 if we are making a new object of this type. */
1166 extern void set_mem_attributes PARAMS ((rtx, tree, int));
1167 #endif
1169 /* Assemble the static constant template for function entry trampolines. */
1170 extern rtx assemble_trampoline_template PARAMS ((void));
1172 /* Given rtx, return new rtx whose address won't be affected by
1173 any side effects. It has been copied to a new temporary reg. */
1174 extern rtx stabilize PARAMS ((rtx));
1176 /* Given an rtx, copy all regs it refers to into new temps
1177 and return a modified copy that refers to the new temps. */
1178 extern rtx copy_all_regs PARAMS ((rtx));
1180 /* Copy given rtx to a new temp reg and return that. */
1181 extern rtx copy_to_reg PARAMS ((rtx));
1183 /* Like copy_to_reg but always make the reg Pmode. */
1184 extern rtx copy_addr_to_reg PARAMS ((rtx));
1186 /* Like copy_to_reg but always make the reg the specified mode MODE. */
1187 extern rtx copy_to_mode_reg PARAMS ((enum machine_mode, rtx));
1189 /* Copy given rtx to given temp reg and return that. */
1190 extern rtx copy_to_suggested_reg PARAMS ((rtx, rtx, enum machine_mode));
1192 /* Copy a value to a register if it isn't already a register.
1193 Args are mode (in case value is a constant) and the value. */
1194 extern rtx force_reg PARAMS ((enum machine_mode, rtx));
1196 /* Return given rtx, copied into a new temp reg if it was in memory. */
1197 extern rtx force_not_mem PARAMS ((rtx));
1199 #ifdef TREE_CODE
1200 /* Return mode and signedness to use when object is promoted. */
1201 extern enum machine_mode promote_mode PARAMS ((tree, enum machine_mode,
1202 int *, int));
1203 #endif
1205 /* Remove some bytes from the stack. An rtx says how many. */
1206 extern void adjust_stack PARAMS ((rtx));
1208 /* Add some bytes to the stack. An rtx says how many. */
1209 extern void anti_adjust_stack PARAMS ((rtx));
1211 /* This enum is used for the following two functions. */
1212 enum save_level {SAVE_BLOCK, SAVE_FUNCTION, SAVE_NONLOCAL};
1214 /* Save the stack pointer at the specified level. */
1215 extern void emit_stack_save PARAMS ((enum save_level, rtx *, rtx));
1217 /* Restore the stack pointer from a save area of the specified level. */
1218 extern void emit_stack_restore PARAMS ((enum save_level, rtx, rtx));
1220 /* Allocate some space on the stack dynamically and return its address. An rtx
1221 says how many bytes. */
1222 extern rtx allocate_dynamic_stack_space PARAMS ((rtx, rtx, int));
1224 /* Probe a range of stack addresses from FIRST to FIRST+SIZE, inclusive.
1225 FIRST is a constant and size is a Pmode RTX. These are offsets from the
1226 current stack pointer. STACK_GROWS_DOWNWARD says whether to add or
1227 subtract from the stack. If SIZE is constant, this is done
1228 with a fixed number of probes. Otherwise, we must make a loop. */
1229 extern void probe_stack_range PARAMS ((HOST_WIDE_INT, rtx));
1231 /* Return an rtx that refers to the value returned by a library call
1232 in its original home. This becomes invalid if any more code is emitted. */
1233 extern rtx hard_libcall_value PARAMS ((enum machine_mode));
1235 /* Given an rtx, return an rtx for a value rounded up to a multiple
1236 of STACK_BOUNDARY / BITS_PER_UNIT. */
1237 extern rtx round_push PARAMS ((rtx));
1239 extern rtx store_bit_field PARAMS ((rtx, unsigned HOST_WIDE_INT,
1240 unsigned HOST_WIDE_INT,
1241 enum machine_mode, rtx,
1242 unsigned int, HOST_WIDE_INT));
1243 extern rtx extract_bit_field PARAMS ((rtx, unsigned HOST_WIDE_INT,
1244 unsigned HOST_WIDE_INT, int, rtx,
1245 enum machine_mode, enum machine_mode,
1246 unsigned int, HOST_WIDE_INT));
1247 extern rtx expand_mult PARAMS ((enum machine_mode, rtx, rtx, rtx, int));
1248 extern rtx expand_mult_add PARAMS ((rtx, rtx, rtx, rtx,enum machine_mode, int));
1249 extern rtx expand_mult_highpart_adjust PARAMS ((enum machine_mode, rtx, rtx, rtx, rtx, int));
1251 extern rtx assemble_static_space PARAMS ((int));
1253 /* Hook called by expand_expr for language-specific tree codes.
1254 It is up to the language front end to install a hook
1255 if it has any such codes that expand_expr needs to know about. */
1256 extern rtx (*lang_expand_expr) PARAMS ((union tree_node *, rtx,
1257 enum machine_mode,
1258 enum expand_modifier modifier));
1260 #ifdef TREE_CODE
1261 /* Hook called by output_constant for language-specific tree codes.
1262 It is up to the language front-end to install a hook if it has any
1263 such codes that output_constant needs to know about. Returns a
1264 language-independent constant equivalent to its input. */
1265 extern tree (*lang_expand_constant) PARAMS ((tree));
1267 extern int safe_from_p PARAMS ((rtx, tree, int));
1269 /* Hook called by safe_from_p for language-specific tree codes. It is
1270 up to the language front-end to install a hook if it has any such
1271 codes that safe_from_p needs to know about. Since same_from_p will
1272 recursively explore the TREE_OPERANDs of an expression, this hook
1273 should not reexamine those pieces. This routine may recursively
1274 call safe_from_p; it should always pass `0' as the TOP_P
1275 parameter. */
1276 extern int (*lang_safe_from_p) PARAMS ((rtx, tree));
1277 #endif
1279 extern void init_all_optabs PARAMS ((void));
1280 extern void do_jump_by_parts_equality_rtx PARAMS ((rtx, rtx, rtx));
1281 extern void do_jump_by_parts_greater_rtx PARAMS ((enum machine_mode,
1282 int, rtx, rtx, rtx,
1283 rtx));
1285 #ifdef TREE_CODE /* Don't lose if tree.h not included. */
1286 extern void mark_seen_cases PARAMS ((tree, unsigned char *,
1287 HOST_WIDE_INT, int));
1288 #endif