OSDN Git Service

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