OSDN Git Service

* a29k.h, alpha.h, arc.h, arm.h, avr.h, clipper.h, convex.h,
[pf3gnuchains/gcc-fork.git] / gcc / config / d30v / d30v.h
1 /* Definitions of target machine for Mitsubishi D30V.
2    Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
3    Free Software Foundation, Inc.
4    Contributed by Cygnus Solutions.
5
6    This file is part of GNU CC.
7
8    GNU CC is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2, or (at your option)
11    any later version.
12
13    GNU CC is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17
18    You should have received a copy of the GNU General Public License
19    along with GNU CC; see the file COPYING.  If not, write to
20    the Free Software Foundation, 59 Temple Place - Suite 330,
21    Boston, MA 02111-1307, USA.  */
22
23 #ifndef GCC_D30V_H
24
25 /* D30V specific macros */
26
27 /* Align an address */
28 #define D30V_ALIGN(addr,align) (((addr) + (align) - 1) & ~((align) - 1))
29
30 \f
31 /* Driver configuration */
32
33 /* Defined in svr4.h.  */
34 /* #define SWITCH_TAKES_ARG(CHAR) */
35
36 /* Defined in svr4.h.  */
37 /* #define WORD_SWITCH_TAKES_ARG(NAME) */
38
39 /* Defined in svr4.h.  */
40 #undef  ASM_SPEC
41 #define ASM_SPEC "\
42 %{!mno-asm-optimize: %{O*: %{!O0: -O} %{O0: %{masm-optimize: -O}}}} \
43 %{v} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
44
45 /* Defined in svr4.h.  */
46 /* #define ASM_FINAL_SPEC "" */
47
48 /* Defined in svr4.h.  */
49 #undef  LINK_SPEC
50 #define LINK_SPEC "\
51 %{h*} %{v:-V} \
52 %{b} %{Wl,*:%*} \
53 %{static:-dn -Bstatic} \
54 %{shared:-G -dy -z text} \
55 %{symbolic:-Bsymbolic -G -dy -z text} \
56 %{G:-G} \
57 %{YP,*} \
58 %{Qy:} %{!Qn:-Qy} \
59 %{mextmem: -m d30v_e} %{mextmemory: -m d30v_e} %{monchip: -m d30v_o}"
60
61 /* Defined in svr4.h.  */
62 #undef  LIB_SPEC
63 #define LIB_SPEC "--start-group -lsim -lc --end-group"
64
65 /* Defined in svr4.h.  */
66 #undef  STARTFILE_SPEC
67 #define STARTFILE_SPEC "crt0%O%s crtbegin%O%s"
68
69 /* Defined in svr4.h.  */
70 #undef  ENDFILE_SPEC
71 #define ENDFILE_SPEC "crtend%O%s"
72
73 /* Defined in svr4.h for host compilers.  */
74 /* #define MD_EXEC_PREFIX "" */
75
76 /* Defined in svr4.h for host compilers.  */
77 /* #define MD_STARTFILE_PREFIX "" */
78
79 \f
80 /* Run-time target specifications */
81
82 #define CPP_PREDEFINES "-D__D30V__ -Amachine=d30v"
83
84 /* This declaration should be present.  */
85 extern int target_flags;
86
87 #define MASK_NO_COND_MOVE       0x00000001      /* disable conditional moves */
88
89 #define MASK_DEBUG_ARG          0x10000000      /* debug argument handling */
90 #define MASK_DEBUG_STACK        0x20000000      /* debug stack allocations */
91 #define MASK_DEBUG_ADDR         0x40000000      /* debug GO_IF_LEGITIMATE_ADDRESS */
92
93 #define TARGET_NO_COND_MOVE     (target_flags & MASK_NO_COND_MOVE)
94 #define TARGET_DEBUG_ARG        (target_flags & MASK_DEBUG_ARG)
95 #define TARGET_DEBUG_STACK      (target_flags & MASK_DEBUG_STACK)
96 #define TARGET_DEBUG_ADDR       (target_flags & MASK_DEBUG_ADDR)
97
98 #define TARGET_COND_MOVE        (! TARGET_NO_COND_MOVE)
99
100 /* Default switches used.  */
101 #ifndef TARGET_DEFAULT
102 #define TARGET_DEFAULT 0
103 #endif
104
105 #define TARGET_SWITCHES                                                 \
106 {                                                                       \
107   { "cond-move",        -MASK_NO_COND_MOVE,                             \
108       N_("Enable use of conditional move instructions") },              \
109                                                                         \
110   { "no-cond-move",     MASK_NO_COND_MOVE,                              \
111       N_("Disable use of conditional move instructions") },             \
112                                                                         \
113   { "debug-arg",         MASK_DEBUG_ARG,                                \
114       N_("Debug argument support in compiler") },                       \
115                                                                         \
116   { "debug-stack",       MASK_DEBUG_STACK,                              \
117       N_("Debug stack support in compiler") },                          \
118                                                                         \
119   { "debug-addr",        MASK_DEBUG_ADDR,                               \
120       N_("Debug memory address support in compiler") },                 \
121                                                                         \
122   { "asm-optimize",      0,                                             \
123       N_("Make adjacent short instructions parallel if possible") },    \
124                                                                         \
125   { "no-asm-optimize",   0,                                             \
126       N_("Do not make adjacent short instructions parallel") }, \
127                                                                         \
128   { "extmem",            0,                                             \
129       N_("Link programs/data to be in external memory by default") },   \
130                                                                         \
131   { "extmemory",         0,                                             \
132       N_("Link programs/data to be in external memory by default") },   \
133                                                                         \
134   { "onchip",            0,                                             \
135       N_("Link programs/data to be in onchip memory by default") },     \
136                                                                         \
137   { "",                  TARGET_DEFAULT, "" },                          \
138 }
139
140 #define TARGET_OPTIONS                                                  \
141 {                                                                       \
142   {"branch-cost=",  &d30v_branch_cost_string,                           \
143      N_("Change the branch costs within the compiler") },               \
144                                                                         \
145   {"cond-exec=",    &d30v_cond_exec_string,                             \
146      N_("Change the threshold for conversion to conditional execution") }, \
147 }
148
149 #define TARGET_VERSION fprintf (stderr, " d30v")
150
151 #define OVERRIDE_OPTIONS override_options ()
152
153 #define CAN_DEBUG_WITHOUT_FP
154
155 \f
156 /* Storage Layout */
157
158 #define BITS_BIG_ENDIAN 1
159
160 #define BYTES_BIG_ENDIAN 1
161
162 #define WORDS_BIG_ENDIAN 1
163
164 #define BITS_PER_WORD 32
165
166 #define UNITS_PER_WORD 4
167
168 #define POINTER_SIZE 32
169
170 #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE)                               \
171 do {                                                                    \
172   if (GET_MODE_CLASS (MODE) == MODE_INT                                 \
173       && GET_MODE_SIZE (MODE) < 4)                                      \
174     (MODE) = SImode;                                                    \
175 } while (0)
176
177 #define PARM_BOUNDARY 32
178
179 #define STACK_BOUNDARY 64
180
181 #define FUNCTION_BOUNDARY 64
182
183 #define BIGGEST_ALIGNMENT 64
184
185 /* Defined in svr4.h.  */
186 /* #define MAX_OFILE_ALIGNMENT */
187
188 #define DATA_ALIGNMENT(TYPE, ALIGN)             \
189   (TREE_CODE (TYPE) == ARRAY_TYPE               \
190    && TYPE_MODE (TREE_TYPE (TYPE)) == QImode    \
191    && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
192
193 #define CONSTANT_ALIGNMENT(EXP, ALIGN)  \
194   (TREE_CODE (EXP) == STRING_CST        \
195    && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
196
197 #define STRICT_ALIGNMENT 1
198
199 /* Defined in svr4.h.  */
200
201 #define PCC_BITFIELD_TYPE_MATTERS 1
202
203 #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
204
205 \f
206 /* Layout of Source Language Data Types */
207
208 #define INT_TYPE_SIZE 32
209
210 #define SHORT_TYPE_SIZE 16
211
212 #define LONG_TYPE_SIZE 32
213
214 #define LONG_LONG_TYPE_SIZE 64
215
216 #define CHAR_TYPE_SIZE 8
217
218 #define FLOAT_TYPE_SIZE 32
219
220 #define DOUBLE_TYPE_SIZE 64
221
222 #define LONG_DOUBLE_TYPE_SIZE 64
223
224 #define DEFAULT_SIGNED_CHAR 1
225
226 /* Defined in svr4.h.  */
227 /* #define SIZE_TYPE */
228
229 /* Defined in svr4.h.  */
230 /* #define PTRDIFF_TYPE */
231
232 /* Defined in svr4.h.  */
233 /* #define WCHAR_TYPE */
234
235 /* Defined in svr4.h.  */
236 /* #define WCHAR_TYPE_SIZE */
237
238 \f
239 /* D30V register layout.  */
240
241 /* Return true if a value is inside a range */
242 #define IN_RANGE_P(VALUE, LOW, HIGH) \
243   (((unsigned)((VALUE) - (LOW))) <= ((unsigned)((HIGH) - (LOW))))
244
245 /* General purpose registers.  */
246 #define GPR_FIRST       0                       /* First gpr */
247 #define GPR_LAST        (GPR_FIRST + 63)        /* Last gpr */
248 #define GPR_R0          GPR_FIRST               /* R0, constant 0 */
249 #define GPR_ARG_FIRST   (GPR_FIRST + 2)         /* R2, first argument reg */
250 #define GPR_ARG_LAST    (GPR_FIRST + 17)        /* R17, last argument reg */
251 #define GPR_RET_VALUE   GPR_ARG_FIRST           /* R2, function return reg */
252 #define GPR_ATMP_FIRST  (GPR_FIRST + 20)        /* R20, tmp to save accs */
253 #define GPR_ATMP_LAST   (GPR_FIRST + 21)        /* R21, tmp to save accs */
254 #define GPR_STACK_TMP   (GPR_FIRST + 22)        /* R22, tmp for saving stack */
255 #define GPR_RES_FIRST   (GPR_FIRST + 32)        /* R32, first reserved reg */
256 #define GPR_RES_LAST    (GPR_FIRST + 35)        /* R35, last reserved reg */
257 #define GPR_FP          (GPR_FIRST + 61)        /* Frame pointer */
258 #define GPR_LINK        (GPR_FIRST + 62)        /* Return address register */
259 #define GPR_SP          (GPR_FIRST + 63)        /* Stack pointer */
260
261 /* Argument register that is eliminated in favor of the frame and/or stack
262    pointer.  Also add register to point to where the return address is
263    stored.  */
264 #define SPECIAL_REG_FIRST               (GPR_LAST + 1)
265 #define SPECIAL_REG_LAST                (SPECIAL_REG_FIRST)
266 #define ARG_POINTER_REGNUM              (SPECIAL_REG_FIRST + 0)
267 #define SPECIAL_REG_P(R)                ((R) == SPECIAL_REG_FIRST)
268
269 #define GPR_OR_SPECIAL_REG_P(R)         IN_RANGE_P (R, GPR_FIRST, SPECIAL_REG_LAST)
270 #define GPR_P(R)                        IN_RANGE_P (R, GPR_FIRST, GPR_LAST)
271 #define GPR_OR_PSEUDO_P(R)              (GPR_OR_SPECIAL_REG_P (R)       \
272                                          || (R) >= FIRST_PSEUDO_REGISTER)
273
274 /* Flag bits.  */
275 #define FLAG_FIRST      (SPECIAL_REG_LAST + 1)  /* First flag */
276 #define FLAG_LAST       (FLAG_FIRST + 7)        /* Last flag */
277 #define FLAG_F0         (FLAG_FIRST)            /* F0, used in prediction */
278 #define FLAG_F1         (FLAG_FIRST + 1)        /* F1, used in prediction */
279 #define FLAG_F2         (FLAG_FIRST + 2)        /* F2, general flag */
280 #define FLAG_F3         (FLAG_FIRST + 3)        /* F3, general flag */
281 #define FLAG_SAT        (FLAG_FIRST + 4)        /* F4, saturation flag */
282 #define FLAG_OVERFLOW   (FLAG_FIRST + 5)        /* F5, overflow flag */
283 #define FLAG_ACC_OVER   (FLAG_FIRST + 6)        /* F6, accumulated overflow */
284 #define FLAG_CARRY      (FLAG_FIRST + 7)        /* F7, carry/borrow flag */
285 #define FLAG_BORROW     FLAG_CARRY
286
287 #define FLAG_P(R)               IN_RANGE_P (R, FLAG_FIRST, FLAG_LAST)
288 #define FLAG_OR_PSEUDO_P(R)     (FLAG_P (R) || (R) >= FIRST_PSEUDO_REGISTER)
289
290 #define BR_FLAG_P(R)            IN_RANGE_P (R, FLAG_F0, FLAG_F1)
291 #define BR_FLAG_OR_PSEUDO_P(R)  (BR_FLAG_P (R) || (R) >= FIRST_PSEUDO_REGISTER)
292
293 /* Accumulators */
294 #define ACCUM_FIRST     (FLAG_LAST + 1)         /* First accumulator */
295 #define ACCUM_A0        ACCUM_FIRST             /* Register A0 */
296 #define ACCUM_A1        (ACCUM_FIRST + 1)       /* Register A1 */
297 #define ACCUM_LAST      (ACCUM_FIRST + 1)       /* Last accumulator */
298
299 #define ACCUM_P(R)              IN_RANGE_P (R, ACCUM_FIRST, ACCUM_LAST)
300 #define ACCUM_OR_PSEUDO_P(R)    (ACCUM_P (R) || (R) >= FIRST_PSEUDO_REGISTER)
301
302 /* Special registers.  Note, we only define the registers that can actually
303    be used.  */
304 #define CR_FIRST        (ACCUM_LAST + 1)        /* First CR */
305 #define CR_LAST         (CR_FIRST + 14)         /* Last CR */
306 #define CR_PSW          (CR_FIRST + 0)          /* CR0, Program status word */
307 #define CR_BPSW         (CR_FIRST + 1)          /* CR1, Backup PSW */
308 #define CR_PC           (CR_FIRST + 2)          /* CR2, Program counter */
309 #define CR_BPC          (CR_FIRST + 3)          /* CR3, Backup PC */
310 #define CR_DPSW         (CR_FIRST + 4)          /* CR4, Debug PSW */
311 #define CR_DPC          (CR_FIRST + 5)          /* CR5, Debug PC */
312 #define CR_RPT_C        (CR_FIRST + 6)          /* CR7, loop count register */
313 #define CR_RPT_S        (CR_FIRST + 7)          /* CR8, loop start address */
314 #define CR_RPT_E        (CR_FIRST + 8)          /* CR9, loop end address */
315 #define CR_MOD_S        (CR_FIRST + 9)          /* CR10, modulo address start*/
316 #define CR_MOD_E        (CR_FIRST + 10)         /* CR11, modulo address */
317 #define CR_IBA          (CR_FIRST + 11)         /* CR14, Interrupt break addr */
318 #define CR_EIT_VB       (CR_FIRST + 12)         /* CR15, EIT vector address */
319 #define CR_INT_S        (CR_FIRST + 13)         /* CR16, Interrupt status */
320 #define CR_INT_M        (CR_FIRST + 14)         /* CR17, Interrupt mask */
321
322 #define CR_P(R)                 IN_RANGE_P (R, CR_FIRST, CR_LAST)
323 #define CR_OR_PSEUDO_P(R)       (CR_P (R) || (R) >= FIRST_PSEUDO_REGISTER)
324
325 \f
326 /* Register Basics */
327
328 /* Number of hardware registers known to the compiler.  They receive numbers 0
329    through `FIRST_PSEUDO_REGISTER-1'; thus, the first pseudo register's number
330    really is assigned the number `FIRST_PSEUDO_REGISTER'.  */
331 #define FIRST_PSEUDO_REGISTER (CR_LAST + 1)
332
333 /* An initializer that says which registers are used for fixed purposes all
334    throughout the compiled code and are therefore not available for general
335    allocation.  These would include the stack pointer, the frame pointer
336    (except on machines where that can be used as a general register when no
337    frame pointer is needed), the program counter on machines where that is
338    considered one of the addressable registers, and any other numbered register
339    with a standard use.
340
341    This information is expressed as a sequence of numbers, separated by commas
342    and surrounded by braces.  The Nth number is 1 if register N is fixed, 0
343    otherwise.
344
345    The table initialized from this macro, and the table initialized by the
346    following one, may be overridden at run time either automatically, by the
347    actions of the macro `CONDITIONAL_REGISTER_USAGE', or by the user with the
348    command options `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG'.  */
349 #define FIXED_REGISTERS                                                 \
350 {                                                                       \
351   1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  /* R0  - R15 */      \
352   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,  /* R16 - R31 */      \
353   1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  /* R32 - R47 */      \
354   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,  /* R48 - R63 */      \
355   1,                                               /* ARG ptr */        \
356   0, 0, 0, 0, 1, 1, 1, 1,                          /* F0 - F7 */        \
357   0, 0,                                            /* A0 - A1 */        \
358   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     /* CRs */            \
359 }
360
361 /* Like `FIXED_REGISTERS' but has 1 for each register that is clobbered (in
362    general) by function calls as well as for fixed registers.  This macro
363    therefore identifies the registers that are not available for general
364    allocation of values that must live across function calls.
365
366    If a register has 0 in `CALL_USED_REGISTERS', the compiler automatically
367    saves it on function entry and restores it on function exit, if the register
368    is used within the function.  */
369 #define CALL_USED_REGISTERS                                             \
370 {                                                                       \
371   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  /* R0  - R15 */      \
372   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  /* R16 - R31 */      \
373   1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  /* R32 - R47 */      \
374   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,  /* R48 - R63 */      \
375   1,                                               /* ARG ptr */        \
376   1, 1, 1, 1, 1, 1, 1, 1,                          /* F0 - F7 */        \
377   1, 0,                                            /* A0 - A1 */        \
378   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,     /* CRs */            \
379 }
380
381 /* Zero or more C statements that may conditionally modify two variables
382    `fixed_regs' and `call_used_regs' (both of type `char []') after they have
383    been initialized from the two preceding macros.
384
385    This is necessary in case the fixed or call-clobbered registers depend on
386    target flags.
387
388    You need not define this macro if it has no work to do.
389
390    If the usage of an entire class of registers depends on the target flags,
391    you may indicate this to GCC by using this macro to modify `fixed_regs' and
392    `call_used_regs' to 1 for each of the registers in the classes which should
393    not be used by GCC.  Also define the macro `REG_CLASS_FROM_LETTER' to return
394    `NO_REGS' if it is called with a letter for a class that shouldn't be used.
395
396    (However, if this class is not included in `GENERAL_REGS' and all of the
397    insn patterns whose constraints permit this class are controlled by target
398    switches, then GCC will automatically avoid using these registers when the
399    target switches are opposed to them.)  */
400 /* #define CONDITIONAL_REGISTER_USAGE */
401
402 /* If this macro is defined and has a nonzero value, it means that `setjmp' and
403    related functions fail to save the registers, or that `longjmp' fails to
404    restore them.  To compensate, the compiler avoids putting variables in
405    registers in functions that use `setjmp'.  */
406 /* #define NON_SAVING_SETJMP */
407
408 /* Define this macro if the target machine has register windows.  This C
409    expression returns the register number as seen by the called function
410    corresponding to the register number OUT as seen by the calling function.
411    Return OUT if register number OUT is not an outbound register.  */
412 /* #define INCOMING_REGNO(OUT) */
413
414 /* Define this macro if the target machine has register windows.  This C
415    expression returns the register number as seen by the calling function
416    corresponding to the register number IN as seen by the called function.
417    Return IN if register number IN is not an inbound register.  */
418 /* #define OUTGOING_REGNO(IN) */
419
420 \f
421 /* Order of allocation of registers */
422
423 /* If defined, an initializer for a vector of integers, containing the numbers
424    of hard registers in the order in which GNU CC should prefer to use them
425    (from most preferred to least).
426
427    If this macro is not defined, registers are used lowest numbered first (all
428    else being equal).
429
430    One use of this macro is on machines where the highest numbered registers
431    must always be saved and the save-multiple-registers instruction supports
432    only sequences of consecutive registers.  On such machines, define
433    `REG_ALLOC_ORDER' to be an initializer that lists the highest numbered
434    allocatable register first.  */
435
436 #define REG_ALLOC_ORDER                                                 \
437 {                                                                       \
438   /* volatile registers */                                              \
439   GPR_FIRST + 2,    GPR_FIRST + 3,    GPR_FIRST + 4,    GPR_FIRST + 5,  \
440   GPR_FIRST + 6,    GPR_FIRST + 7,    GPR_FIRST + 8,    GPR_FIRST + 9,  \
441   GPR_FIRST + 10,   GPR_FIRST + 11,   GPR_FIRST + 12,   GPR_FIRST + 13, \
442   GPR_FIRST + 14,   GPR_FIRST + 15,   GPR_FIRST + 16,   GPR_FIRST + 17, \
443   GPR_FIRST + 18,   GPR_FIRST + 19,   GPR_FIRST + 20,   GPR_FIRST + 21, \
444   GPR_FIRST + 22,   GPR_FIRST + 23,   GPR_FIRST + 24,   GPR_FIRST + 25, \
445   GPR_FIRST + 1,                                                        \
446                                                                         \
447   /* saved registers */                                                 \
448   GPR_FIRST + 34,   GPR_FIRST + 35,   GPR_FIRST + 36,   GPR_FIRST + 37, \
449   GPR_FIRST + 38,   GPR_FIRST + 39,   GPR_FIRST + 40,   GPR_FIRST + 41, \
450   GPR_FIRST + 42,   GPR_FIRST + 43,   GPR_FIRST + 44,   GPR_FIRST + 45, \
451   GPR_FIRST + 46,   GPR_FIRST + 47,   GPR_FIRST + 48,   GPR_FIRST + 49, \
452   GPR_FIRST + 50,   GPR_FIRST + 51,   GPR_FIRST + 52,   GPR_FIRST + 53, \
453   GPR_FIRST + 54,   GPR_FIRST + 55,   GPR_FIRST + 56,   GPR_FIRST + 57, \
454   GPR_FIRST + 58,   GPR_FIRST + 59,   GPR_FIRST + 60,   GPR_FIRST + 61, \
455   GPR_FIRST + 62,                                                       \
456                                                                         \
457   /* flags */                                                           \
458   FLAG_F2,          FLAG_F3,          FLAG_F0,          FLAG_F1,        \
459   FLAG_SAT,         FLAG_OVERFLOW,    FLAG_ACC_OVER,    FLAG_CARRY,     \
460                                                                         \
461   /* accumultors */                                                     \
462   ACCUM_FIRST + 0,  ACCUM_FIRST + 1,                                    \
463                                                                         \
464   /* fixed registers */                                                 \
465   GPR_FIRST + 0,    GPR_FIRST + 26,   GPR_FIRST + 27,   GPR_FIRST + 28, \
466   GPR_FIRST + 29,   GPR_FIRST + 30,   GPR_FIRST + 31,   GPR_FIRST + 32, \
467   GPR_FIRST + 33,   GPR_FIRST + 63,                                     \
468   CR_PSW,           CR_BPSW,          CR_PC,            CR_BPC,         \
469   CR_DPSW,          CR_DPC,           CR_RPT_C,         CR_RPT_S,       \
470   CR_RPT_E,         CR_MOD_S,         CR_MOD_E,         CR_IBA,         \
471   CR_EIT_VB,        CR_INT_S,         CR_INT_M,                         \
472   ARG_POINTER_REGNUM,                                                   \
473 }
474
475 /* A C statement (sans semicolon) to choose the order in which to allocate hard
476    registers for pseudo-registers local to a basic block.
477
478    Store the desired register order in the array `reg_alloc_order'.  Element 0
479    should be the register to allocate first; element 1, the next register; and
480    so on.
481
482    The macro body should not assume anything about the contents of
483    `reg_alloc_order' before execution of the macro.
484
485    On most machines, it is not necessary to define this macro.  */
486 /* #define ORDER_REGS_FOR_LOCAL_ALLOC */
487
488 \f
489 /* How Values Fit in Registers */
490
491 /* A C expression for the number of consecutive hard registers, starting at
492    register number REGNO, required to hold a value of mode MODE.
493
494    On a machine where all registers are exactly one word, a suitable definition
495    of this macro is
496
497         #define HARD_REGNO_NREGS(REGNO, MODE)            \
498            ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1)  \
499             / UNITS_PER_WORD))  */
500
501 #define HARD_REGNO_NREGS(REGNO, MODE)                                   \
502 (ACCUM_P (REGNO) ? ((GET_MODE_SIZE (MODE) + 2*UNITS_PER_WORD - 1)       \
503                     / (2*UNITS_PER_WORD))                               \
504                  : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1)         \
505                     / UNITS_PER_WORD))
506
507 /* A C expression that is nonzero if it is permissible to store a value of mode
508    MODE in hard register number REGNO (or in several registers starting with
509    that one).  For a machine where all registers are equivalent, a suitable
510    definition is
511
512         #define HARD_REGNO_MODE_OK(REGNO, MODE) 1
513
514    It is not necessary for this macro to check for the numbers of fixed
515    registers, because the allocation mechanism considers them to be always
516    occupied.
517
518    On some machines, double-precision values must be kept in even/odd register
519    pairs.  The way to implement that is to define this macro to reject odd
520    register numbers for such modes.
521
522    The minimum requirement for a mode to be OK in a register is that the
523    `movMODE' instruction pattern support moves between the register and any
524    other hard register for which the mode is OK; and that moving a value into
525    the register and back out not alter it.
526
527    Since the same instruction used to move `SImode' will work for all narrower
528    integer modes, it is not necessary on any machine for `HARD_REGNO_MODE_OK'
529    to distinguish between these modes, provided you define patterns `movhi',
530    etc., to take advantage of this.  This is useful because of the interaction
531    between `HARD_REGNO_MODE_OK' and `MODES_TIEABLE_P'; it is very desirable for
532    all integer modes to be tieable.
533
534    Many machines have special registers for floating point arithmetic.  Often
535    people assume that floating point machine modes are allowed only in floating
536    point registers.  This is not true.  Any registers that can hold integers
537    can safely *hold* a floating point machine mode, whether or not floating
538    arithmetic can be done on it in those registers.  Integer move instructions
539    can be used to move the values.
540
541    On some machines, though, the converse is true: fixed-point machine modes
542    may not go in floating registers.  This is true if the floating registers
543    normalize any value stored in them, because storing a non-floating value
544    there would garble it.  In this case, `HARD_REGNO_MODE_OK' should reject
545    fixed-point machine modes in floating registers.  But if the floating
546    registers do not automatically normalize, if you can store any bit pattern
547    in one and retrieve it unchanged without a trap, then any machine mode may
548    go in a floating register, so you can define this macro to say so.
549
550    The primary significance of special floating registers is rather that they
551    are the registers acceptable in floating point arithmetic instructions.
552    However, this is of no concern to `HARD_REGNO_MODE_OK'.  You handle it by
553    writing the proper constraints for those instructions.
554
555    On some machines, the floating registers are especially slow to access, so
556    that it is better to store a value in a stack frame than in such a register
557    if floating point arithmetic is not being done.  As long as the floating
558    registers are not in class `GENERAL_REGS', they will not be used unless some
559    pattern's constraint asks for one.  */
560
561 extern unsigned char hard_regno_mode_ok[][FIRST_PSEUDO_REGISTER];
562 #define HARD_REGNO_MODE_OK(REGNO, MODE) hard_regno_mode_ok[ (int)MODE ][ REGNO ]
563
564 /* A C expression that is nonzero if it is desirable to choose register
565    allocation so as to avoid move instructions between a value of mode MODE1
566    and a value of mode MODE2.
567
568    If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R, MODE2)' are
569    ever different for any R, then `MODES_TIEABLE_P (MODE1, MODE2)' must be
570    zero.  */
571
572 extern unsigned char modes_tieable_p[];
573 #define MODES_TIEABLE_P(MODE1, MODE2) \
574   modes_tieable_p[ (((int)(MODE1)) * (NUM_MACHINE_MODES)) + (int)(MODE2) ]
575
576 /* Define this macro if the compiler should avoid copies to/from CCmode
577    registers.  You should only define this macro if support fo copying to/from
578    CCmode is incomplete.  */
579    
580 /* On the D30V, copying to/from CCmode is complete, but since there are only
581    two CC registers usable for conditional tests, this helps gcse not compound
582    the reload problem.  */
583 #define AVOID_CCMODE_COPIES
584
585 \f
586 /* Handling Leaf Functions */
587
588 /* A C initializer for a vector, indexed by hard register number, which
589    contains 1 for a register that is allowable in a candidate for leaf function
590    treatment.
591
592    If leaf function treatment involves renumbering the registers, then the
593    registers marked here should be the ones before renumbering--those that GNU
594    CC would ordinarily allocate.  The registers which will actually be used in
595    the assembler code, after renumbering, should not be marked with 1 in this
596    vector.
597
598    Define this macro only if the target machine offers a way to optimize the
599    treatment of leaf functions.  */
600 /* #define LEAF_REGISTERS */
601
602 /* A C expression whose value is the register number to which REGNO should be
603    renumbered, when a function is treated as a leaf function.
604
605    If REGNO is a register number which should not appear in a leaf function
606    before renumbering, then the expression should yield -1, which will cause
607    the compiler to abort.
608
609    Define this macro only if the target machine offers a way to optimize the
610    treatment of leaf functions, and registers need to be renumbered to do this.  */
611 /* #define LEAF_REG_REMAP(REGNO) */
612
613 \f
614 /* Registers That Form a Stack.  */
615
616 /* Define this if the machine has any stack-like registers.  */
617 /* #define STACK_REGS */
618
619 /* The number of the first stack-like register.  This one is the top
620    of the stack.  */
621 /* #define FIRST_STACK_REG */
622
623 /* The number of the last stack-like register.  This one is the
624    bottom of the stack.  */
625 /* #define LAST_STACK_REG */
626
627 \f
628 /* Register Classes */
629
630 /* An enumeral type that must be defined with all the register class names as
631    enumeral values.  `NO_REGS' must be first.  `ALL_REGS' must be the last
632    register class, followed by one more enumeral value, `LIM_REG_CLASSES',
633    which is not a register class but rather tells how many classes there are.
634
635    Each register class has a number, which is the value of casting the class
636    name to type `int'.  The number serves as an index in many of the tables
637    described below.  */
638 enum reg_class
639 {
640   NO_REGS,
641   REPEAT_REGS,
642   CR_REGS,
643   ACCUM_REGS,
644   OTHER_FLAG_REGS,
645   F0_REGS,
646   F1_REGS,
647   BR_FLAG_REGS,
648   FLAG_REGS,
649   EVEN_REGS,
650   GPR_REGS,
651   ALL_REGS,
652   LIM_REG_CLASSES
653 };
654
655 #define GENERAL_REGS GPR_REGS
656
657 /* The number of distinct register classes, defined as follows:
658
659         #define N_REG_CLASSES (int) LIM_REG_CLASSES  */
660 #define N_REG_CLASSES ((int) LIM_REG_CLASSES)
661
662 /* An initializer containing the names of the register classes as C string
663    constants.  These names are used in writing some of the debugging dumps.  */
664 #define REG_CLASS_NAMES                                                 \
665 {                                                                       \
666   "NO_REGS",                                                            \
667   "REPEAT_REGS",                                                        \
668   "CR_REGS",                                                            \
669   "ACCUM_REGS",                                                         \
670   "OTHER_FLAG_REGS",                                                    \
671   "F0_REGS",                                                            \
672   "F1_REGS",                                                            \
673   "BR_FLAG_REGS",                                                       \
674   "FLAG_REGS",                                                          \
675   "EVEN_REGS",                                                          \
676   "GPR_REGS",                                                           \
677   "ALL_REGS",                                                           \
678 }
679
680 /* Create mask bits for 3rd word of REG_CLASS_CONTENTS */
681 #define MASK_WORD3(REG) ((long)1 << ((REG) - 64))
682
683 #define NO_MASK         0
684 #define REPEAT_MASK     MASK_WORD3 (CR_RPT_C)
685 #define CR_MASK         (MASK_WORD3 (CR_PSW)     | MASK_WORD3 (CR_BPSW)   \
686                          | MASK_WORD3 (CR_PC)    | MASK_WORD3 (CR_BPC)    \
687                          | MASK_WORD3 (CR_DPSW)  | MASK_WORD3 (CR_DPC)    \
688                          | MASK_WORD3 (CR_RPT_C) | MASK_WORD3 (CR_RPT_S)  \
689                          | MASK_WORD3 (CR_RPT_E) | MASK_WORD3 (CR_MOD_S)  \
690                          | MASK_WORD3 (CR_MOD_E) | MASK_WORD3 (CR_IBA)    \
691                          | MASK_WORD3 (CR_EIT_VB) | MASK_WORD3 (CR_INT_S) \
692                          | MASK_WORD3 (CR_INT_M))
693
694 #define ACCUM_MASK      (MASK_WORD3 (ACCUM_A0)   | MASK_WORD3 (ACCUM_A1))
695 #define OTHER_FLAG_MASK (MASK_WORD3 (FLAG_F2)    | MASK_WORD3 (FLAG_F3) \
696                          | MASK_WORD3 (FLAG_SAT) | MASK_WORD3 (FLAG_OVERFLOW) \
697                          | MASK_WORD3 (FLAG_ACC_OVER) | MASK_WORD3 (FLAG_CARRY))
698
699 #define F0_MASK         MASK_WORD3 (FLAG_F0)
700 #define F1_MASK         MASK_WORD3 (FLAG_F1)
701 #define BR_FLAG_MASK    (F0_MASK | F1_MASK)
702 #define FLAG_MASK       (BR_FLAG_MASK | OTHER_FLAG_MASK)
703 #define SPECIAL_MASK    MASK_WORD3 (ARG_POINTER_REGNUM)
704
705 #define ALL_MASK        (CR_MASK | ACCUM_MASK | FLAG_MASK | SPECIAL_MASK)
706
707 /* An initializer containing the contents of the register classes, as integers
708    which are bit masks.  The Nth integer specifies the contents of class N.
709    The way the integer MASK is interpreted is that register R is in the class
710    if `MASK & (1 << R)' is 1.
711
712    When the machine has more than 32 registers, an integer does not suffice.
713    Then the integers are replaced by sub-initializers, braced groupings
714    containing several integers.  Each sub-initializer must be suitable as an
715    initializer for the type `HARD_REG_SET' which is defined in
716    `hard-reg-set.h'.  */
717 #define REG_CLASS_CONTENTS                                              \
718 {                                                                       \
719   { 0x00000000, 0x00000000, NO_MASK },          /* NO_REGS */           \
720   { 0x00000000, 0x00000000, REPEAT_MASK },      /* REPEAT_REGS */       \
721   { 0x00000000, 0x00000000, CR_MASK },          /* CR_REGS */           \
722   { 0x00000000, 0x00000000, ACCUM_MASK },       /* ACCUM_REGS */        \
723   { 0x00000000, 0x00000000, OTHER_FLAG_MASK },  /* OTHER_FLAG_REGS */   \
724   { 0x00000000, 0x00000000, F0_MASK },          /* F0_REGS */           \
725   { 0x00000000, 0x00000000, F1_MASK },          /* F1_REGS */           \
726   { 0x00000000, 0x00000000, BR_FLAG_MASK },     /* BR_FLAG_REGS */      \
727   { 0x00000000, 0x00000000, FLAG_MASK },        /* FLAG_REGS */         \
728   { 0xfffffffc, 0x3fffffff, NO_MASK },          /* EVEN_REGS */         \
729   { 0xffffffff, 0xffffffff, SPECIAL_MASK },     /* GPR_REGS */          \
730   { 0xffffffff, 0xffffffff, ALL_MASK },         /* ALL_REGS */          \
731 }
732
733 /* A C expression whose value is a register class containing hard register
734    REGNO.  In general there is more than one such class; choose a class which
735    is "minimal", meaning that no smaller class also contains the register.  */
736
737 extern enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER];
738 #define REGNO_REG_CLASS(REGNO) regno_reg_class[ (REGNO) ]
739
740 /* A macro whose definition is the name of the class to which a valid base
741    register must belong.  A base register is one used in an address which is
742    the register value plus a displacement.  */
743 #define BASE_REG_CLASS GPR_REGS
744
745 /* A macro whose definition is the name of the class to which a valid index
746    register must belong.  An index register is one used in an address where its
747    value is either multiplied by a scale factor or added to another register
748    (as well as added to a displacement).  */
749 #define INDEX_REG_CLASS GPR_REGS
750
751 /* A C expression which defines the machine-dependent operand constraint
752    letters for register classes.  If CHAR is such a letter, the value should be
753    the register class corresponding to it.  Otherwise, the value should be
754    `NO_REGS'.  The register letter `r', corresponding to class `GENERAL_REGS',
755    will not be passed to this macro; you do not need to handle it.
756
757    The following letters are unavailable, due to being used as
758    constraints:
759         '0'..'9'
760         '<', '>'
761         'E', 'F', 'G', 'H'
762         'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P'
763         'Q', 'R', 'S', 'T', 'U'
764         'V', 'X'
765         'g', 'i', 'm', 'n', 'o', 'p', 'r', 's' */
766
767 extern enum reg_class reg_class_from_letter[256];
768 #define REG_CLASS_FROM_LETTER(CHAR) reg_class_from_letter[(unsigned char)(CHAR)]
769
770 /* A C expression which is nonzero if register number NUM is suitable for use
771    as a base register in operand addresses.  It may be either a suitable hard
772    register or a pseudo register that has been allocated such a hard register.  */
773
774 #define REGNO_OK_FOR_BASE_P(NUM)                                        \
775 ((NUM) < FIRST_PSEUDO_REGISTER                                          \
776  ? GPR_P (NUM)                                                          \
777  : (reg_renumber[NUM] >= 0 && GPR_P (reg_renumber[NUM])))
778
779
780 /* A C expression which is nonzero if register number NUM is suitable for use
781    as an index register in operand addresses.  It may be either a suitable hard
782    register or a pseudo register that has been allocated such a hard register.
783
784    The difference between an index register and a base register is that the
785    index register may be scaled.  If an address involves the sum of two
786    registers, neither one of them scaled, then either one may be labeled the
787    "base" and the other the "index"; but whichever labeling is used must fit
788    the machine's constraints of which registers may serve in each capacity.
789    The compiler will try both labelings, looking for one that is valid, and
790    will reload one or both registers only if neither labeling works.  */
791
792 #define REGNO_OK_FOR_INDEX_P(NUM)                                       \
793 ((NUM) < FIRST_PSEUDO_REGISTER                                          \
794  ? GPR_P (NUM)                                                          \
795  : (reg_renumber[NUM] >= 0 && GPR_P (reg_renumber[NUM])))
796
797 /* A C expression that places additional restrictions on the register class to
798    use when it is necessary to copy value X into a register in class CLASS.
799    The value is a register class; perhaps CLASS, or perhaps another, smaller
800    class.  On many machines, the following definition is safe:
801
802         #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS
803
804    Sometimes returning a more restrictive class makes better code.  For
805    example, on the 68000, when X is an integer constant that is in range for a
806    `moveq' instruction, the value of this macro is always `DATA_REGS' as long
807    as CLASS includes the data registers.  Requiring a data register guarantees
808    that a `moveq' will be used.
809
810    If X is a `const_double', by returning `NO_REGS' you can force X into a
811    memory constant.  This is useful on certain machines where immediate
812    floating values cannot be loaded into certain kinds of registers.  */
813 #define PREFERRED_RELOAD_CLASS(X, CLASS) CLASS
814
815 /* Like `PREFERRED_RELOAD_CLASS', but for output reloads instead of input
816    reloads.  If you don't define this macro, the default is to use CLASS,
817    unchanged.  */
818 /* #define PREFERRED_OUTPUT_RELOAD_CLASS(X, CLASS) */
819
820 /* A C expression that places additional restrictions on the register class to
821    use when it is necessary to be able to hold a value of mode MODE in a reload
822    register for which class CLASS would ordinarily be used.
823
824    Unlike `PREFERRED_RELOAD_CLASS', this macro should be used when there are
825    certain modes that simply can't go in certain reload classes.
826
827    The value is a register class; perhaps CLASS, or perhaps another, smaller
828    class.
829
830    Don't define this macro unless the target machine has limitations which
831    require the macro to do something nontrivial.  */
832 /* #define LIMIT_RELOAD_CLASS(MODE, CLASS) */
833
834 /* Many machines have some registers that cannot be copied directly to or from
835    memory or even from other types of registers.  An example is the `MQ'
836    register, which on most machines, can only be copied to or from general
837    registers, but not memory.  Some machines allow copying all registers to and
838    from memory, but require a scratch register for stores to some memory
839    locations (e.g., those with symbolic address on the RT, and those with
840    certain symbolic address on the Sparc when compiling PIC).  In some cases,
841    both an intermediate and a scratch register are required.
842
843    You should define these macros to indicate to the reload phase that it may
844    need to allocate at least one register for a reload in addition to the
845    register to contain the data.  Specifically, if copying X to a register
846    CLASS in MODE requires an intermediate register, you should define
847    `SECONDARY_INPUT_RELOAD_CLASS' to return the largest register class all of
848    whose registers can be used as intermediate registers or scratch registers.
849
850    If copying a register CLASS in MODE to X requires an intermediate or scratch
851    register, `SECONDARY_OUTPUT_RELOAD_CLASS' should be defined to return the
852    largest register class required.  If the requirements for input and output
853    reloads are the same, the macro `SECONDARY_RELOAD_CLASS' should be used
854    instead of defining both macros identically.
855
856    The values returned by these macros are often `GENERAL_REGS'.  Return
857    `NO_REGS' if no spare register is needed; i.e., if X can be directly copied
858    to or from a register of CLASS in MODE without requiring a scratch register.
859    Do not define this macro if it would always return `NO_REGS'.
860
861    If a scratch register is required (either with or without an intermediate
862    register), you should define patterns for `reload_inM' or `reload_outM', as
863    required (*note Standard Names::..  These patterns, which will normally be
864    implemented with a `define_expand', should be similar to the `movM'
865    patterns, except that operand 2 is the scratch register.
866
867    Define constraints for the reload register and scratch register that contain
868    a single register class.  If the original reload register (whose class is
869    CLASS) can meet the constraint given in the pattern, the value returned by
870    these macros is used for the class of the scratch register.  Otherwise, two
871    additional reload registers are required.  Their classes are obtained from
872    the constraints in the insn pattern.
873
874    X might be a pseudo-register or a `subreg' of a pseudo-register, which could
875    either be in a hard register or in memory.  Use `true_regnum' to find out;
876    it will return -1 if the pseudo is in memory and the hard register number if
877    it is in a register.
878
879    These macros should not be used in the case where a particular class of
880    registers can only be copied to memory and not to another class of
881    registers.  In that case, secondary reload registers are not needed and
882    would not be helpful.  Instead, a stack location must be used to perform the
883    copy and the `movM' pattern should use memory as an intermediate storage.
884    This case often occurs between floating-point and general registers.  */
885
886 #define SECONDARY_RELOAD_CLASS(CLASS, MODE, X)                          \
887 ((CLASS) == GPR_REGS            ? NO_REGS                               \
888  : (CLASS) == EVEN_REGS         ? NO_REGS                               \
889  : (CLASS) == ACCUM_REGS        ? EVEN_REGS                             \
890  :                                GPR_REGS)
891
892 /* #define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) */
893 /* #define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, X) */
894
895 /* Certain machines have the property that some registers cannot be copied to
896    some other registers without using memory.  Define this macro on those
897    machines to be a C expression that is non-zero if objects of mode M in
898    registers of CLASS1 can only be copied to registers of class CLASS2 by
899    storing a register of CLASS1 into memory and loading that memory location
900    into a register of CLASS2.
901
902    Do not define this macro if its value would always be zero.  */
903 /* #define SECONDARY_MEMORY_NEEDED(CLASS1, CLASS2, M) */
904
905 /* Normally when `SECONDARY_MEMORY_NEEDED' is defined, the compiler allocates a
906    stack slot for a memory location needed for register copies.  If this macro
907    is defined, the compiler instead uses the memory location defined by this
908    macro.
909
910    Do not define this macro if you do not define
911    `SECONDARY_MEMORY_NEEDED'.  */
912 /* #define SECONDARY_MEMORY_NEEDED_RTX(MODE) */
913
914 /* When the compiler needs a secondary memory location to copy between two
915    registers of mode MODE, it normally allocates sufficient memory to hold a
916    quantity of `BITS_PER_WORD' bits and performs the store and load operations
917    in a mode that many bits wide and whose class is the same as that of MODE.
918
919    This is right thing to do on most machines because it ensures that all bits
920    of the register are copied and prevents accesses to the registers in a
921    narrower mode, which some machines prohibit for floating-point registers.
922
923    However, this default behavior is not correct on some machines, such as the
924    DEC Alpha, that store short integers in floating-point registers differently
925    than in integer registers.  On those machines, the default widening will not
926    work correctly and you must define this macro to suppress that widening in
927    some cases.  See the file `alpha.h' for details.
928
929    Do not define this macro if you do not define `SECONDARY_MEMORY_NEEDED' or
930    if widening MODE to a mode that is `BITS_PER_WORD' bits wide is correct for
931    your machine.  */
932 /* #define SECONDARY_MEMORY_NEEDED_MODE(MODE) */
933
934 /* Normally the compiler avoids choosing registers that have been explicitly
935    mentioned in the rtl as spill registers (these registers are normally those
936    used to pass parameters and return values).  However, some machines have so
937    few registers of certain classes that there would not be enough registers to
938    use as spill registers if this were done.
939
940    Define `SMALL_REGISTER_CLASSES' to be an expression with a non-zero value on
941    these machines.  When this macro has a non-zero value, the compiler allows
942    registers explicitly used in the rtl to be used as spill registers but
943    avoids extending the lifetime of these registers.
944
945    It is always safe to define this macro with a non-zero value, but if you
946    unnecessarily define it, you will reduce the amount of optimizations that
947    can be performed in some cases.  If you do not define this macro with a
948    non-zero value when it is required, the compiler will run out of spill
949    registers and print a fatal error message.  For most machines, you should
950    not define this macro at all.  */
951 /* #define SMALL_REGISTER_CLASSES */
952
953 /* A C expression whose value is nonzero if pseudos that have been assigned to
954    registers of class CLASS would likely be spilled because registers of CLASS
955    are needed for spill registers.
956
957    The default value of this macro returns 1 if CLASS has exactly one register
958    and zero otherwise.  On most machines, this default should be used.  Only
959    define this macro to some other expression if pseudo allocated by
960    `local-alloc.c' end up in memory because their hard registers were needed
961    for spill registers.  If this macro returns nonzero for those classes, those
962    pseudos will only be allocated by `global.c', which knows how to reallocate
963    the pseudo to another register.  If there would not be another register
964    available for reallocation, you should not change the definition of this
965    macro since the only effect of such a definition would be to slow down
966    register allocation.  */
967 #define CLASS_LIKELY_SPILLED_P(CLASS) \
968   ((CLASS) != GPR_REGS && (CLASS) != EVEN_REGS)
969
970 /* A C expression for the maximum number of consecutive registers of
971    class CLASS needed to hold a value of mode MODE.
972
973    This is closely related to the macro `HARD_REGNO_NREGS'.  In fact, the value
974    of the macro `CLASS_MAX_NREGS (CLASS, MODE)' should be the maximum value of
975    `HARD_REGNO_NREGS (REGNO, MODE)' for all REGNO values in the class CLASS.
976
977    This macro helps control the handling of multiple-word values in
978    the reload pass.  */
979
980 #define CLASS_MAX_NREGS(CLASS, MODE)                                    \
981 (((CLASS) == ACCUM_REGS)                                                \
982  ? ((GET_MODE_SIZE (MODE) + 8 - 1) / 8)                                 \
983  : ((GET_MODE_SIZE (MODE) + 4 - 1) / 4))
984
985 /* A C expression that defines the machine-dependent operand constraint letters
986    (`I', `J', `K', .. 'P') that specify particular ranges of integer values.
987    If C is one of those letters, the expression should check that VALUE, an
988    integer, is in the appropriate range and return 1 if so, 0 otherwise.  If C
989    is not one of those letters, the value should be 0 regardless of VALUE.  */
990 #define CONST_OK_FOR_LETTER_P(VALUE, C)                                 \
991 ((C) == 'I'     ? IN_RANGE_P (VALUE, -32, 31)                           \
992  : (C) == 'J'   ? IN_RANGE_P (VALUE, 0, 31)                             \
993  : (C) == 'K'   ? IN_RANGE_P (exact_log2 (VALUE), 0, 31)                \
994  : (C) == 'L'   ? IN_RANGE_P (exact_log2 (~ (VALUE)), 0, 31)            \
995  : (C) == 'M'   ? ((VALUE) == 32)                                       \
996  : (C) == 'N'   ? ((VALUE) == 1)                                        \
997  : (C) == 'O'   ? ((VALUE) == 0)                                        \
998  : (C) == 'P'   ? IN_RANGE_P (VALUE, 32, 63)                            \
999  :                FALSE)
1000
1001 /* A C expression that defines the machine-dependent operand constraint letters
1002    (`G', `H') that specify particular ranges of `const_double' values.
1003
1004    If C is one of those letters, the expression should check that VALUE, an RTX
1005    of code `const_double', is in the appropriate range and return 1 if so, 0
1006    otherwise.  If C is not one of those letters, the value should be 0
1007    regardless of VALUE.
1008
1009    `const_double' is used for all floating-point constants and for `DImode'
1010    fixed-point constants.  A given letter can accept either or both kinds of
1011    values.  It can use `GET_MODE' to distinguish between these kinds.  */
1012 #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)                          \
1013 ((C) == 'G'     ? (CONST_DOUBLE_LOW (VALUE) == 0                        \
1014                    && CONST_DOUBLE_HIGH (VALUE) == 0)                   \
1015  : (C) == 'H'   ? FALSE                                                 \
1016  :                FALSE)
1017
1018 /* A C expression that defines the optional machine-dependent constraint
1019    letters (`Q', `R', `S', `T', `U') that can be used to segregate specific
1020    types of operands, usually memory references, for the target machine.
1021    Normally this macro will not be defined.  If it is required for a particular
1022    target machine, it should return 1 if VALUE corresponds to the operand type
1023    represented by the constraint letter C.  If C is not defined as an extra
1024    constraint, the value returned should be 0 regardless of VALUE.
1025
1026    For example, on the ROMP, load instructions cannot have their output in r0
1027    if the memory reference contains a symbolic address.  Constraint letter `Q'
1028    is defined as representing a memory address that does *not* contain a
1029    symbolic address.  An alternative is specified with a `Q' constraint on the
1030    input and `r' on the output.  The next alternative specifies `m' on the
1031    input and a register class that does not include r0 on the output.  */
1032
1033 #define EXTRA_CONSTRAINT(VALUE, C)                                      \
1034 (((C) == 'Q')   ? short_memory_operand ((VALUE), GET_MODE (VALUE))      \
1035  : ((C) == 'R') ? single_reg_memory_operand ((VALUE), GET_MODE (VALUE)) \
1036  : ((C) == 'S') ? const_addr_memory_operand ((VALUE), GET_MODE (VALUE)) \
1037  : ((C) == 'T') ? long_memory_operand ((VALUE), GET_MODE (VALUE))       \
1038  : ((C) == 'U') ? FALSE                                                 \
1039  :                FALSE)
1040
1041 \f
1042 /* Basic Stack Layout */
1043
1044 /* Stack layout */
1045
1046 /* Structure used to define the d30v stack */
1047 typedef struct d30v_stack {
1048   int varargs_p;                /* whether this is a varargs function */
1049   int varargs_size;             /* size to hold varargs args passed in regs */
1050   int vars_size;                /* variable save area size */
1051   int parm_size;                /* outgoing parameter size */
1052   int gpr_size;                 /* size of saved GPR registers */
1053   int accum_size;               /* size of saved ACCUM registers */
1054   int total_size;               /* total bytes allocated for stack */
1055                                 /* which registers are to be saved */
1056   int save_offset;              /* offset from new sp to start saving vars at */
1057   int link_offset;              /* offset r62 is saved at */
1058   int memrefs_varargs;          /* # of 2 word memory references for varargs */
1059   int memrefs_2words;           /* # of 2 word memory references */
1060   int memrefs_1word;            /* # of 1 word memory references */
1061                                 /* 1 for ldw/stw ops; 2 for ld2w/st2w ops */
1062   unsigned char save_p[FIRST_PSEUDO_REGISTER];
1063 } d30v_stack_t;
1064
1065 /* Define this macro if pushing a word onto the stack moves the stack pointer
1066    to a smaller address.
1067
1068    When we say, "define this macro if ...," it means that the compiler checks
1069    this macro only with `#ifdef' so the precise definition used does not
1070    matter.  */
1071 #define STACK_GROWS_DOWNWARD 1
1072
1073 /* Define this macro if the addresses of local variable slots are at negative
1074    offsets from the frame pointer.  */
1075 /* #define FRAME_GROWS_DOWNWARD */
1076
1077 /* Define this macro if successive arguments to a function occupy decreasing
1078    addresses on the stack.  */
1079 /* #define ARGS_GROW_DOWNWARD */
1080
1081 /* Offset from the frame pointer to the first local variable slot to be
1082    allocated.
1083
1084    If `FRAME_GROWS_DOWNWARD', find the next slot's offset by subtracting the
1085    first slot's length from `STARTING_FRAME_OFFSET'.  Otherwise, it is found by
1086    adding the length of the first slot to the value `STARTING_FRAME_OFFSET'.  */
1087
1088 #define STARTING_FRAME_OFFSET                                           \
1089   (D30V_ALIGN (current_function_outgoing_args_size,                     \
1090                (STACK_BOUNDARY / BITS_PER_UNIT)))
1091
1092 /* Offset from the stack pointer register to the first location at which
1093    outgoing arguments are placed.  If not specified, the default value of zero
1094    is used.  This is the proper value for most machines.
1095
1096    If `ARGS_GROW_DOWNWARD', this is the offset to the location above the first
1097    location at which outgoing arguments are placed.  */
1098 /* #define STACK_POINTER_OFFSET */
1099
1100 /* Offset from the argument pointer register to the first argument's address.
1101    On some machines it may depend on the data type of the function.
1102
1103    If `ARGS_GROW_DOWNWARD', this is the offset to the location above the first
1104    argument's address.  */
1105 #define FIRST_PARM_OFFSET(FUNDECL) 0
1106
1107 /* Offset from the stack pointer register to an item dynamically allocated on
1108    the stack, e.g., by `alloca'.
1109
1110    The default value for this macro is `STACK_POINTER_OFFSET' plus the length
1111    of the outgoing arguments.  The default is correct for most machines.  See
1112    `function.c' for details.  */
1113 /* #define STACK_DYNAMIC_OFFSET(FUNDECL) */
1114
1115 /* A C expression whose value is RTL representing the address in a stack frame
1116    where the pointer to the caller's frame is stored.  Assume that FRAMEADDR is
1117    an RTL expression for the address of the stack frame itself.
1118
1119    If you don't define this macro, the default is to return the value of
1120    FRAMEADDR--that is, the stack frame address is also the address of the stack
1121    word that points to the previous frame.  */
1122 /* #define DYNAMIC_CHAIN_ADDRESS(FRAMEADDR) */
1123
1124 /* If defined, a C expression that produces the machine-specific code to setup
1125    the stack so that arbitrary frames can be accessed.  For example, on the
1126    Sparc, we must flush all of the register windows to the stack before we can
1127    access arbitrary stack frames.  This macro will seldom need to be defined.  */
1128 /* #define SETUP_FRAME_ADDRESSES() */
1129
1130 /* A C expression whose value is RTL representing the value of the return
1131    address for the frame COUNT steps up from the current frame, after the
1132    prologue.  FRAMEADDR is the frame pointer of the COUNT frame, or the frame
1133    pointer of the COUNT - 1 frame if `RETURN_ADDR_IN_PREVIOUS_FRAME' is
1134    defined.
1135
1136    The value of the expression must always be the correct address when COUNT is
1137    zero, but may be `NULL_RTX' if there is not way to determine the return
1138    address of other frames.  */
1139
1140 /* ??? This definition fails for leaf functions.  There is currently no
1141    general solution for this problem.  */
1142
1143 /* ??? There appears to be no way to get the return address of any previous
1144    frame except by disassembling instructions in the prologue/epilogue.
1145    So currently we support only the current frame.  */
1146
1147 #define RETURN_ADDR_RTX(COUNT, FRAME)                                   \
1148   ((COUNT) == 0 ? d30v_return_addr() : const0_rtx)
1149
1150 /* Define this if the return address of a particular stack frame is
1151    accessed from the frame pointer of the previous stack frame.  */
1152 /* #define RETURN_ADDR_IN_PREVIOUS_FRAME */
1153
1154 /* A C expression whose value is RTL representing the location of the incoming
1155    return address at the beginning of any function, before the prologue.  This
1156    RTL is either a `REG', indicating that the return value is saved in `REG',
1157    or a `MEM' representing a location in the stack.
1158
1159    You only need to define this macro if you want to support call frame
1160    debugging information like that provided by DWARF 2.  */
1161
1162 /* Before the prologue, RA lives in r62.  */
1163 #define INCOMING_RETURN_ADDR_RTX  gen_rtx (REG, Pmode, GPR_LINK)
1164
1165 /* A C expression whose value is an integer giving the offset, in bytes, from
1166    the value of the stack pointer register to the top of the stack frame at the
1167    beginning of any function, before the prologue.  The top of the frame is
1168    defined to be the value of the stack pointer in the previous frame, just
1169    before the call instruction.
1170
1171    You only need to define this macro if you want to support call frame
1172    debugging information like that provided by DWARF 2.  */
1173 #define INCOMING_FRAME_SP_OFFSET 0
1174
1175 /* Initialize data used by insn expanders.  This is called from insn_emit,
1176    once for every function before code is generated.  */
1177
1178 #define INIT_EXPANDERS  d30v_init_expanders ()
1179
1180 \f
1181 /* Stack Checking.  */
1182
1183 /* A nonzero value if stack checking is done by the configuration files in a
1184    machine-dependent manner.  You should define this macro if stack checking is
1185    require by the ABI of your machine or if you would like to have to stack
1186    checking in some more efficient way than GNU CC's portable approach.  The
1187    default value of this macro is zero.  */
1188 /* #define STACK_CHECK_BUILTIN */
1189
1190 /* An integer representing the interval at which GNU CC must generate stack
1191    probe instructions.  You will normally define this macro to be no larger
1192    than the size of the "guard pages" at the end of a stack area.  The default
1193    value of 4096 is suitable for most systems.  */
1194 /* #define STACK_CHECK_PROBE_INTERVAL */
1195
1196 /* An integer which is nonzero if GNU CC should perform the stack probe as a
1197    load instruction and zero if GNU CC should use a store instruction.  The
1198    default is zero, which is the most efficient choice on most systems.  */
1199 /* #define STACK_CHECK_PROBE_LOAD */
1200
1201 /* The number of bytes of stack needed to recover from a stack overflow, for
1202    languages where such a recovery is supported.  The default value of 75 words
1203    should be adequate for most machines.  */
1204 /* #define STACK_CHECK_PROTECT */
1205
1206 /* The maximum size of a stack frame, in bytes.  GNU CC will generate probe
1207    instructions in non-leaf functions to ensure at least this many bytes of
1208    stack are available.  If a stack frame is larger than this size, stack
1209    checking will not be reliable and GNU CC will issue a warning.  The default
1210    is chosen so that GNU CC only generates one instruction on most systems.
1211    You should normally not change the default value of this macro.  */
1212 /* #define STACK_CHECK_MAX_FRAME_SIZE */
1213
1214 /* GNU CC uses this value to generate the above warning message.  It represents
1215    the amount of fixed frame used by a function, not including space for any
1216    callee-saved registers, temporaries and user variables.  You need only
1217    specify an upper bound for this amount and will normally use the default of
1218    four words.  */
1219 /* #define STACK_CHECK_FIXED_FRAME_SIZE */
1220
1221 /* The maximum size, in bytes, of an object that GNU CC will place in the fixed
1222    area of the stack frame when the user specifies `-fstack-check'.  GNU CC
1223    computed the default from the values of the above macros and you will
1224    normally not need to override that default.  */
1225 /* #define STACK_CHECK_MAX_VAR_SIZE */
1226
1227 \f
1228 /* Register That Address the Stack Frame.  */
1229
1230 /* The register number of the stack pointer register, which must also be a
1231    fixed register according to `FIXED_REGISTERS'.  On most machines, the
1232    hardware determines which register this is.  */
1233 #define STACK_POINTER_REGNUM GPR_SP
1234
1235 /* The register number of the frame pointer register, which is used to access
1236    automatic variables in the stack frame.  On some machines, the hardware
1237    determines which register this is.  On other machines, you can choose any
1238    register you wish for this purpose.  */
1239 #define FRAME_POINTER_REGNUM GPR_FP
1240
1241 /* On some machines the offset between the frame pointer and starting offset of
1242    the automatic variables is not known until after register allocation has
1243    been done (for example, because the saved registers are between these two
1244    locations).  On those machines, define `FRAME_POINTER_REGNUM' the number of
1245    a special, fixed register to be used internally until the offset is known,
1246    and define `HARD_FRAME_POINTER_REGNUM' to be actual the hard register number
1247    used for the frame pointer.
1248
1249    You should define this macro only in the very rare circumstances when it is
1250    not possible to calculate the offset between the frame pointer and the
1251    automatic variables until after register allocation has been completed.
1252    When this macro is defined, you must also indicate in your definition of
1253    `ELIMINABLE_REGS' how to eliminate `FRAME_POINTER_REGNUM' into either
1254    `HARD_FRAME_POINTER_REGNUM' or `STACK_POINTER_REGNUM'.
1255
1256    Do not define this macro if it would be the same as `FRAME_POINTER_REGNUM'.  */
1257 /* #define HARD_FRAME_POINTER_REGNUM */
1258
1259 /* The register number of the arg pointer register, which is used to access the
1260    function's argument list.  On some machines, this is the same as the frame
1261    pointer register.  On some machines, the hardware determines which register
1262    this is.  On other machines, you can choose any register you wish for this
1263    purpose.  If this is not the same register as the frame pointer register,
1264    then you must mark it as a fixed register according to `FIXED_REGISTERS', or
1265    arrange to be able to eliminate it (*note Elimination::.).  */
1266 /* #define ARG_POINTER_REGNUM */
1267
1268 /* The register number of the return address pointer register, which is used to
1269    access the current function's return address from the stack.  On some
1270    machines, the return address is not at a fixed offset from the frame pointer
1271    or stack pointer or argument pointer.  This register can be defined to point
1272    to the return address on the stack, and then be converted by
1273    `ELIMINABLE_REGS' into either the frame pointer or stack pointer.
1274
1275    Do not define this macro unless there is no other way to get the return
1276    address from the stack.  */
1277 /* #define RETURN_ADDRESS_POINTER_REGNUM */
1278
1279 /* Register numbers used for passing a function's static chain pointer.  If
1280    register windows are used, the register number as seen by the called
1281    function is `STATIC_CHAIN_INCOMING_REGNUM', while the register number as
1282    seen by the calling function is `STATIC_CHAIN_REGNUM'.  If these registers
1283    are the same, `STATIC_CHAIN_INCOMING_REGNUM' need not be defined.
1284
1285    The static chain register need not be a fixed register.
1286
1287    If the static chain is passed in memory, these macros should not be defined;
1288    instead, the next two macros should be defined.  */
1289
1290 #define STATIC_CHAIN_REGNUM (GPR_FIRST + 18)
1291 /* #define STATIC_CHAIN_INCOMING_REGNUM */
1292
1293 /* If the static chain is passed in memory, these macros provide rtx giving
1294    `mem' expressions that denote where they are stored.  `STATIC_CHAIN' and
1295    `STATIC_CHAIN_INCOMING' give the locations as seen by the calling and called
1296    functions, respectively.  Often the former will be at an offset from the
1297    stack pointer and the latter at an offset from the frame pointer.
1298
1299    The variables `stack_pointer_rtx', `frame_pointer_rtx', and
1300    `arg_pointer_rtx' will have been initialized prior to the use of these
1301    macros and should be used to refer to those items.
1302
1303    If the static chain is passed in a register, the two previous
1304    macros should be defined instead.  */
1305 /* #define STATIC_CHAIN */
1306 /* #define STATIC_CHAIN_INCOMING */
1307
1308 \f
1309 /* Eliminating the Frame Pointer and the Arg Pointer */
1310
1311 /* A C expression which is nonzero if a function must have and use a frame
1312    pointer.  This expression is evaluated in the reload pass.  If its value is
1313    nonzero the function will have a frame pointer.
1314
1315    The expression can in principle examine the current function and decide
1316    according to the facts, but on most machines the constant 0 or the constant
1317    1 suffices.  Use 0 when the machine allows code to be generated with no
1318    frame pointer, and doing so saves some time or space.  Use 1 when there is
1319    no possible advantage to avoiding a frame pointer.
1320
1321    In certain cases, the compiler does not know how to produce valid code
1322    without a frame pointer.  The compiler recognizes those cases and
1323    automatically gives the function a frame pointer regardless of what
1324    `FRAME_POINTER_REQUIRED' says.  You don't need to worry about them.
1325
1326    In a function that does not require a frame pointer, the frame pointer
1327    register can be allocated for ordinary usage, unless you mark it as a fixed
1328    register.  See `FIXED_REGISTERS' for more information.  */
1329 #define FRAME_POINTER_REQUIRED 0
1330
1331 /* A C statement to store in the variable DEPTH-VAR the difference between the
1332    frame pointer and the stack pointer values immediately after the function
1333    prologue.  The value would be computed from information such as the result
1334    of `get_frame_size ()' and the tables of registers `regs_ever_live' and
1335    `call_used_regs'.
1336
1337    If `ELIMINABLE_REGS' is defined, this macro will be not be used and need not
1338    be defined.  Otherwise, it must be defined even if `FRAME_POINTER_REQUIRED'
1339    is defined to always be true; in that case, you may set DEPTH-VAR to
1340    anything.  */
1341 /* #define INITIAL_FRAME_POINTER_OFFSET(DEPTH_VAR) */
1342
1343 /* If defined, this macro specifies a table of register pairs used to eliminate
1344    unneeded registers that point into the stack frame.  If it is not defined,
1345    the only elimination attempted by the compiler is to replace references to
1346    the frame pointer with references to the stack pointer.
1347
1348    The definition of this macro is a list of structure initializations, each of
1349    which specifies an original and replacement register.
1350
1351    On some machines, the position of the argument pointer is not known until
1352    the compilation is completed.  In such a case, a separate hard register must
1353    be used for the argument pointer.  This register can be eliminated by
1354    replacing it with either the frame pointer or the argument pointer,
1355    depending on whether or not the frame pointer has been eliminated.
1356
1357    In this case, you might specify:
1358         #define ELIMINABLE_REGS  \
1359         {{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
1360          {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \
1361          {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}}
1362
1363    Note that the elimination of the argument pointer with the stack pointer is
1364    specified first since that is the preferred elimination.  */
1365 #define ELIMINABLE_REGS                                                 \
1366 {                                                                       \
1367   { ARG_POINTER_REGNUM,         STACK_POINTER_REGNUM },                 \
1368   { ARG_POINTER_REGNUM,         FRAME_POINTER_REGNUM },                 \
1369   { FRAME_POINTER_REGNUM,       STACK_POINTER_REGNUM }                  \
1370 }
1371
1372 /* A C expression that returns non-zero if the compiler is allowed to try to
1373    replace register number FROM-REG with register number TO-REG.  This macro
1374    need only be defined if `ELIMINABLE_REGS' is defined, and will usually be
1375    the constant 1, since most of the cases preventing register elimination are
1376    things that the compiler already knows about.  */
1377
1378 #define CAN_ELIMINATE(FROM, TO)                                         \
1379  ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM          \
1380   ? ! frame_pointer_needed                                              \
1381   : 1)
1382
1383 /* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'.  It specifies the
1384    initial difference between the specified pair of registers.  This macro must
1385    be defined if `ELIMINABLE_REGS' is defined.  */
1386
1387 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET)                    \
1388 {                                                                       \
1389   d30v_stack_t *info = d30v_stack_info ();                              \
1390                                                                         \
1391   if ((FROM) == FRAME_POINTER_REGNUM)                                   \
1392     (OFFSET) = 0;                                                       \
1393   else if ((FROM) == ARG_POINTER_REGNUM)                                \
1394     (OFFSET) = info->total_size - current_function_pretend_args_size;   \
1395   else                                                                  \
1396     abort ();                                                           \
1397 }
1398
1399 \f
1400 /* Passing Function Arguments on the Stack */
1401
1402 /* Define this macro if an argument declared in a prototype as an integral type
1403    smaller than `int' should actually be passed as an `int'.  In addition to
1404    avoiding errors in certain cases of mismatch, it also makes for better code
1405    on certain machines.  */
1406 /* #define PROMOTE_PROTOTYPES */
1407
1408 /* A C expression that is the number of bytes actually pushed onto the stack
1409    when an instruction attempts to push NPUSHED bytes.
1410
1411    If the target machine does not have a push instruction, do not define this
1412    macro.  That directs GNU CC to use an alternate strategy: to allocate the
1413    entire argument block and then store the arguments into it.
1414
1415    On some machines, the definition
1416
1417         #define PUSH_ROUNDING(BYTES) (BYTES)
1418
1419    will suffice.  But on other machines, instructions that appear to push one
1420    byte actually push two bytes in an attempt to maintain alignment.  Then the
1421    definition should be
1422
1423         #define PUSH_ROUNDING(BYTES) (((BYTES) + 1) & ~1)  */
1424 /* #define PUSH_ROUNDING(NPUSHED) */
1425
1426 /* If defined, the maximum amount of space required for outgoing arguments will
1427    be computed and placed into the variable
1428    `current_function_outgoing_args_size'.  No space will be pushed onto the
1429    stack for each call; instead, the function prologue should increase the
1430    stack frame size by this amount.
1431
1432    Defining both `PUSH_ROUNDING' and `ACCUMULATE_OUTGOING_ARGS' is not
1433    proper.  */
1434 #define ACCUMULATE_OUTGOING_ARGS 1
1435
1436 /* Define this macro if functions should assume that stack space has been
1437    allocated for arguments even when their values are passed in registers.
1438
1439    The value of this macro is the size, in bytes, of the area reserved for
1440    arguments passed in registers for the function represented by FNDECL.
1441
1442    This space can be allocated by the caller, or be a part of the
1443    machine-dependent stack frame: `OUTGOING_REG_PARM_STACK_SPACE' says
1444    which.  */
1445 /* #define REG_PARM_STACK_SPACE(FNDECL) */
1446
1447 /* Define these macros in addition to the one above if functions might allocate
1448    stack space for arguments even when their values are passed in registers.
1449    These should be used when the stack space allocated for arguments in
1450    registers is not a simple constant independent of the function declaration.
1451
1452    The value of the first macro is the size, in bytes, of the area that we
1453    should initially assume would be reserved for arguments passed in registers.
1454
1455    The value of the second macro is the actual size, in bytes, of the area that
1456    will be reserved for arguments passed in registers.  This takes two
1457    arguments: an integer representing the number of bytes of fixed sized
1458    arguments on the stack, and a tree representing the number of bytes of
1459    variable sized arguments on the stack.
1460
1461    When these macros are defined, `REG_PARM_STACK_SPACE' will only be called
1462    for libcall functions, the current function, or for a function being called
1463    when it is known that such stack space must be allocated.  In each case this
1464    value can be easily computed.
1465
1466    When deciding whether a called function needs such stack space, and how much
1467    space to reserve, GNU CC uses these two macros instead of
1468    `REG_PARM_STACK_SPACE'.  */
1469 /* #define MAYBE_REG_PARM_STACK_SPACE */
1470 /* #define FINAL_REG_PARM_STACK_SPACE(CONST_SIZE, VAR_SIZE) */
1471
1472 /* Define this if it is the responsibility of the caller to allocate the area
1473    reserved for arguments passed in registers.
1474
1475    If `ACCUMULATE_OUTGOING_ARGS' is defined, this macro controls whether the
1476    space for these arguments counts in the value of
1477    `current_function_outgoing_args_size'.  */
1478 /* #define OUTGOING_REG_PARM_STACK_SPACE */
1479
1480 /* Define this macro if `REG_PARM_STACK_SPACE' is defined, but the stack
1481    parameters don't skip the area specified by it.
1482
1483    Normally, when a parameter is not passed in registers, it is placed on the
1484    stack beyond the `REG_PARM_STACK_SPACE' area.  Defining this macro
1485    suppresses this behavior and causes the parameter to be passed on the stack
1486    in its natural location.  */
1487 /* #define STACK_PARMS_IN_REG_PARM_AREA */
1488
1489 /* A C expression that should indicate the number of bytes of its own arguments
1490    that a function pops on returning, or 0 if the function pops no arguments
1491    and the caller must therefore pop them all after the function returns.
1492
1493    FUNDECL is a C variable whose value is a tree node that describes the
1494    function in question.  Normally it is a node of type `FUNCTION_DECL' that
1495    describes the declaration of the function.  From this it is possible to
1496    obtain the DECL_ATTRIBUTES of the function.
1497
1498    FUNTYPE is a C variable whose value is a tree node that describes the
1499    function in question.  Normally it is a node of type `FUNCTION_TYPE' that
1500    describes the data type of the function.  From this it is possible to obtain
1501    the data types of the value and arguments (if known).
1502
1503    When a call to a library function is being considered, FUNTYPE will contain
1504    an identifier node for the library function.  Thus, if you need to
1505    distinguish among various library functions, you can do so by their names.
1506    Note that "library function" in this context means a function used to
1507    perform arithmetic, whose name is known specially in the compiler and was
1508    not mentioned in the C code being compiled.
1509
1510    STACK-SIZE is the number of bytes of arguments passed on the stack.  If a
1511    variable number of bytes is passed, it is zero, and argument popping will
1512    always be the responsibility of the calling function.
1513
1514    On the VAX, all functions always pop their arguments, so the definition of
1515    this macro is STACK-SIZE.  On the 68000, using the standard calling
1516    convention, no functions pop their arguments, so the value of the macro is
1517    always 0 in this case.  But an alternative calling convention is available
1518    in which functions that take a fixed number of arguments pop them but other
1519    functions (such as `printf') pop nothing (the caller pops all).  When this
1520    convention is in use, FUNTYPE is examined to determine whether a function
1521    takes a fixed number of arguments.  */
1522 #define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACK_SIZE) 0
1523
1524 \f
1525 /* Function Arguments in Registers */
1526
1527 /* A C expression that controls whether a function argument is passed in a
1528    register, and which register.
1529
1530    The arguments are CUM, which summarizes all the previous arguments; MODE,
1531    the machine mode of the argument; TYPE, the data type of the argument as a
1532    tree node or 0 if that is not known (which happens for C support library
1533    functions); and NAMED, which is 1 for an ordinary argument and 0 for
1534    nameless arguments that correspond to `...' in the called function's
1535    prototype.
1536
1537    The value of the expression should either be a `reg' RTX for the hard
1538    register in which to pass the argument, or zero to pass the argument on the
1539    stack.
1540
1541    For machines like the VAX and 68000, where normally all arguments are
1542    pushed, zero suffices as a definition.
1543
1544    The usual way to make the ANSI library `stdarg.h' work on a machine where
1545    some arguments are usually passed in registers, is to cause nameless
1546    arguments to be passed on the stack instead.  This is done by making
1547    `FUNCTION_ARG' return 0 whenever NAMED is 0.
1548
1549    You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of
1550    this macro to determine if this argument is of a type that must be passed in
1551    the stack.  If `REG_PARM_STACK_SPACE' is not defined and `FUNCTION_ARG'
1552    returns non-zero for such an argument, the compiler will abort.  If
1553    `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the
1554    stack and then loaded into a register.  */
1555
1556 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
1557   d30v_function_arg (&CUM, (int)MODE, TYPE, NAMED, FALSE)
1558
1559 /* Define this macro if the target machine has "register windows", so that the
1560    register in which a function sees an arguments is not necessarily the same
1561    as the one in which the caller passed the argument.
1562
1563    For such machines, `FUNCTION_ARG' computes the register in which the caller
1564    passes the value, and `FUNCTION_INCOMING_ARG' should be defined in a similar
1565    fashion to tell the function being called where the arguments will arrive.
1566
1567    If `FUNCTION_INCOMING_ARG' is not defined, `FUNCTION_ARG' serves both
1568    purposes.  */
1569
1570 #define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) \
1571   d30v_function_arg (&CUM, (int)MODE, TYPE, NAMED, TRUE)
1572
1573 /* A C expression for the number of words, at the beginning of an argument,
1574    must be put in registers.  The value must be zero for arguments that are
1575    passed entirely in registers or that are entirely pushed on the stack.
1576
1577    On some machines, certain arguments must be passed partially in registers
1578    and partially in memory.  On these machines, typically the first N words of
1579    arguments are passed in registers, and the rest on the stack.  If a
1580    multi-word argument (a `double' or a structure) crosses that boundary, its
1581    first few words must be passed in registers and the rest must be pushed.
1582    This macro tells the compiler when this occurs, and how many of the words
1583    should go in registers.
1584
1585    `FUNCTION_ARG' for these arguments should return the first register to be
1586    used by the caller for this argument; likewise `FUNCTION_INCOMING_ARG', for
1587    the called function.  */
1588 #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
1589   d30v_function_arg_partial_nregs (&CUM, (int)MODE, TYPE, NAMED)
1590
1591 /* A C expression that indicates when an argument must be passed by reference.
1592    If nonzero for an argument, a copy of that argument is made in memory and a
1593    pointer to the argument is passed instead of the argument itself.  The
1594    pointer is passed in whatever way is appropriate for passing a pointer to
1595    that type.
1596
1597    On machines where `REG_PARM_STACK_SPACE' is not defined, a suitable
1598    definition of this macro might be
1599         #define FUNCTION_ARG_PASS_BY_REFERENCE\
1600         (CUM, MODE, TYPE, NAMED)  \
1601           MUST_PASS_IN_STACK (MODE, TYPE)  */
1602 #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) 0
1603
1604 /* If defined, a C expression that indicates when it is the called function's
1605    responsibility to make a copy of arguments passed by invisible reference.
1606    Normally, the caller makes a copy and passes the address of the copy to the
1607    routine being called.  When FUNCTION_ARG_CALLEE_COPIES is defined and is
1608    nonzero, the caller does not make a copy.  Instead, it passes a pointer to
1609    the "live" value.  The called function must not modify this value.  If it
1610    can be determined that the value won't be modified, it need not make a copy;
1611    otherwise a copy must be made.  */
1612 /* #define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) */
1613
1614 /* A C type for declaring a variable that is used as the first argument of
1615    `FUNCTION_ARG' and other related values.  For some target machines, the type
1616    `int' suffices and can hold the number of bytes of argument so far.
1617
1618    There is no need to record in `CUMULATIVE_ARGS' anything about the arguments
1619    that have been passed on the stack.  The compiler has other variables to
1620    keep track of that.  For target machines on which all arguments are passed
1621    on the stack, there is no need to store anything in `CUMULATIVE_ARGS';
1622    however, the data structure must exist and should not be empty, so use
1623    `int'.  */
1624 typedef int CUMULATIVE_ARGS;
1625
1626 /* A C statement (sans semicolon) for initializing the variable CUM for the
1627    state at the beginning of the argument list.  The variable has type
1628    `CUMULATIVE_ARGS'.  The value of FNTYPE is the tree node for the data type
1629    of the function which will receive the args, or 0 if the args are to a
1630    compiler support library function.  The value of INDIRECT is nonzero when
1631    processing an indirect call, for example a call through a function pointer.
1632    The value of INDIRECT is zero for a call to an explicitly named function, a
1633    library function call, or when `INIT_CUMULATIVE_ARGS' is used to find
1634    arguments for the function being compiled.
1635
1636    When processing a call to a compiler support library function, LIBNAME
1637    identifies which one.  It is a `symbol_ref' rtx which contains the name of
1638    the function, as a string.  LIBNAME is 0 when an ordinary C function call is
1639    being processed.  Thus, each time this macro is called, either LIBNAME or
1640    FNTYPE is nonzero, but never both of them at once.  */
1641
1642 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) \
1643   d30v_init_cumulative_args (&CUM, FNTYPE, LIBNAME, INDIRECT, FALSE)
1644
1645 /* Like `INIT_CUMULATIVE_ARGS' but overrides it for the purposes of finding the
1646    arguments for the function being compiled.  If this macro is undefined,
1647    `INIT_CUMULATIVE_ARGS' is used instead.
1648
1649    The value passed for LIBNAME is always 0, since library routines with
1650    special calling conventions are never compiled with GNU CC.  The argument
1651    LIBNAME exists for symmetry with `INIT_CUMULATIVE_ARGS'.  */
1652
1653 #define INIT_CUMULATIVE_INCOMING_ARGS(CUM, FNTYPE, LIBNAME) \
1654   d30v_init_cumulative_args (&CUM, FNTYPE, LIBNAME, FALSE, TRUE)
1655
1656 /* A C statement (sans semicolon) to update the summarizer variable CUM to
1657    advance past an argument in the argument list.  The values MODE, TYPE and
1658    NAMED describe that argument.  Once this is done, the variable CUM is
1659    suitable for analyzing the *following* argument with `FUNCTION_ARG', etc.
1660
1661    This macro need not do anything if the argument in question was passed on
1662    the stack.  The compiler knows how to track the amount of stack space used
1663    for arguments without any special help.  */
1664
1665 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
1666   d30v_function_arg_advance (&CUM, (int) MODE, TYPE, NAMED)
1667
1668 /* If defined, a C expression which determines whether, and in which direction,
1669    to pad out an argument with extra space.  The value should be of type `enum
1670    direction': either `upward' to pad above the argument, `downward' to pad
1671    below, or `none' to inhibit padding.
1672
1673    The *amount* of padding is always just enough to reach the next multiple of
1674    `FUNCTION_ARG_BOUNDARY'; this macro does not control it.
1675
1676    This macro has a default definition which is right for most systems.  For
1677    little-endian machines, the default is to pad upward.  For big-endian
1678    machines, the default is to pad downward for an argument of constant size
1679    shorter than an `int', and upward otherwise.  */
1680 /* #define FUNCTION_ARG_PADDING(MODE, TYPE) */
1681
1682 /* If defined, a C expression that gives the alignment boundary, in bits, of an
1683    argument with the specified mode and type.  If it is not defined,
1684    `PARM_BOUNDARY' is used for all arguments.  */
1685
1686 #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \
1687   d30v_function_arg_boundary ((int) MODE, TYPE)
1688
1689 /* A C expression that is nonzero if REGNO is the number of a hard register in
1690    which function arguments are sometimes passed.  This does *not* include
1691    implicit arguments such as the static chain and the structure-value address.
1692    On many machines, no registers can be used for this purpose since all
1693    function arguments are pushed on the stack.  */
1694
1695 #define FUNCTION_ARG_REGNO_P(REGNO) \
1696   IN_RANGE_P (REGNO, GPR_ARG_FIRST, GPR_ARG_LAST)
1697
1698 \f
1699 /* How Scalar Function Values are Returned */
1700
1701 /* A C expression to create an RTX representing the place where a function
1702    returns a value of data type VALTYPE.  VALTYPE is a tree node representing a
1703    data type.  Write `TYPE_MODE (VALTYPE)' to get the machine mode used to
1704    represent that type.  On many machines, only the mode is relevant.
1705    (Actually, on most machines, scalar values are returned in the same place
1706    regardless of mode).
1707
1708    If `PROMOTE_FUNCTION_RETURN' is defined, you must apply the same promotion
1709    rules specified in `PROMOTE_MODE' if VALTYPE is a scalar type.
1710
1711    If the precise function being called is known, FUNC is a tree node
1712    (`FUNCTION_DECL') for it; otherwise, FUNC is a null pointer.  This makes it
1713    possible to use a different value-returning convention for specific
1714    functions when all their calls are known.
1715
1716    `FUNCTION_VALUE' is not used for return vales with aggregate data types,
1717    because these are returned in another way.  See `STRUCT_VALUE_REGNUM' and
1718    related macros, below.  */
1719
1720 #define FUNCTION_VALUE(VALTYPE, FUNC) \
1721   gen_rtx (REG, TYPE_MODE (VALTYPE), GPR_RET_VALUE)
1722
1723 /* Define this macro if the target machine has "register windows" so that the
1724    register in which a function returns its value is not the same as the one in
1725    which the caller sees the value.
1726
1727    For such machines, `FUNCTION_VALUE' computes the register in which the
1728    caller will see the value.  `FUNCTION_OUTGOING_VALUE' should be defined in a
1729    similar fashion to tell the function where to put the value.
1730
1731    If `FUNCTION_OUTGOING_VALUE' is not defined, `FUNCTION_VALUE' serves both
1732    purposes.
1733
1734    `FUNCTION_OUTGOING_VALUE' is not used for return vales with aggregate data
1735    types, because these are returned in another way.  See `STRUCT_VALUE_REGNUM'
1736    and related macros, below.  */
1737 /* #define FUNCTION_OUTGOING_VALUE(VALTYPE, FUNC) */
1738
1739 /* A C expression to create an RTX representing the place where a library
1740    function returns a value of mode MODE.  If the precise function being called
1741    is known, FUNC is a tree node (`FUNCTION_DECL') for it; otherwise, FUNC is a
1742    null pointer.  This makes it possible to use a different value-returning
1743    convention for specific functions when all their calls are known.
1744
1745    Note that "library function" in this context means a compiler support
1746    routine, used to perform arithmetic, whose name is known specially by the
1747    compiler and was not mentioned in the C code being compiled.
1748
1749    The definition of `LIBRARY_VALUE' need not be concerned aggregate data
1750    types, because none of the library functions returns such types.  */
1751
1752 #define LIBCALL_VALUE(MODE) gen_rtx (REG, MODE, GPR_RET_VALUE)
1753
1754 /* A C expression that is nonzero if REGNO is the number of a hard register in
1755    which the values of called function may come back.
1756
1757    A register whose use for returning values is limited to serving as the
1758    second of a pair (for a value of type `double', say) need not be recognized
1759    by this macro.  So for most machines, this definition suffices:
1760
1761         #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)
1762
1763    If the machine has register windows, so that the caller and the called
1764    function use different registers for the return value, this macro should
1765    recognize only the caller's register numbers.  */
1766
1767 #define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == GPR_RET_VALUE)
1768
1769 /* Define this macro if `untyped_call' and `untyped_return' need more space
1770    than is implied by `FUNCTION_VALUE_REGNO_P' for saving and restoring an
1771    arbitrary return value.  */
1772 /* #define APPLY_RESULT_SIZE */
1773
1774 \f
1775 /* How Large Values are Returned */
1776
1777 /* A C expression which can inhibit the returning of certain function values in
1778    registers, based on the type of value.  A nonzero value says to return the
1779    function value in memory, just as large structures are always returned.
1780    Here TYPE will be a C expression of type `tree', representing the data type
1781    of the value.
1782
1783    Note that values of mode `BLKmode' must be explicitly handled by this macro.
1784    Also, the option `-fpcc-struct-return' takes effect regardless of this
1785    macro.  On most systems, it is possible to leave the macro undefined; this
1786    causes a default definition to be used, whose value is the constant 1 for
1787    `BLKmode' values, and 0 otherwise.
1788
1789    Do not use this macro to indicate that structures and unions should always
1790    be returned in memory.  You should instead use `DEFAULT_PCC_STRUCT_RETURN'
1791    to indicate this.  */
1792 /* #define RETURN_IN_MEMORY(TYPE) */
1793
1794 /* Define this macro to be 1 if all structure and union return values must be
1795    in memory.  Since this results in slower code, this should be defined only
1796    if needed for compatibility with other compilers or with an ABI.  If you
1797    define this macro to be 0, then the conventions used for structure and union
1798    return values are decided by the `RETURN_IN_MEMORY' macro.
1799
1800    If not defined, this defaults to the value 1.  */
1801 /* #define DEFAULT_PCC_STRUCT_RETURN */
1802
1803 /* If the structure value address is passed in a register, then
1804    `STRUCT_VALUE_REGNUM' should be the number of that register.  */
1805
1806 #define STRUCT_VALUE_REGNUM GPR_ARG_FIRST
1807
1808 /* If the structure value address is not passed in a register, define
1809    `STRUCT_VALUE' as an expression returning an RTX for the place where the
1810    address is passed.  If it returns 0, the address is passed as an "invisible"
1811    first argument.  */
1812
1813 #define STRUCT_VALUE 0
1814
1815 /* On some architectures the place where the structure value address is found
1816    by the called function is not the same place that the caller put it.  This
1817    can be due to register windows, or it could be because the function prologue
1818    moves it to a different place.
1819
1820    If the incoming location of the structure value address is in a register,
1821    define this macro as the register number.  */
1822 /* #define STRUCT_VALUE_INCOMING_REGNUM */
1823
1824 /* If the incoming location is not a register, then you should define
1825    `STRUCT_VALUE_INCOMING' as an expression for an RTX for where the called
1826    function should find the value.  If it should find the value on the stack,
1827    define this to create a `mem' which refers to the frame pointer.  A
1828    definition of 0 means that the address is passed as an "invisible" first
1829    argument.  */
1830 /* #define STRUCT_VALUE_INCOMING */
1831
1832 /* Define this macro if the usual system convention on the target machine for
1833    returning structures and unions is for the called function to return the
1834    address of a static variable containing the value.
1835
1836    Do not define this if the usual system convention is for the caller to pass
1837    an address to the subroutine.
1838
1839    This macro has effect in `-fpcc-struct-return' mode, but it does nothing
1840    when you use `-freg-struct-return' mode.  */
1841 /* #define PCC_STATIC_STRUCT_RETURN */
1842
1843 \f
1844 /* Caller-Saves Register Allocation */
1845
1846 /* Define this macro if function calls on the target machine do not preserve
1847    any registers; in other words, if `CALL_USED_REGISTERS' has 1 for all
1848    registers.  This macro enables `-fcaller-saves' by default.  Eventually that
1849    option will be enabled by default on all machines and both the option and
1850    this macro will be eliminated.  */
1851 /* #define DEFAULT_CALLER_SAVES */
1852
1853 /* A C expression to determine whether it is worthwhile to consider placing a
1854    pseudo-register in a call-clobbered hard register and saving and restoring
1855    it around each function call.  The expression should be 1 when this is worth
1856    doing, and 0 otherwise.
1857
1858    If you don't define this macro, a default is used which is good on most
1859    machines: `4 * CALLS < REFS'.  */
1860 /* #define CALLER_SAVE_PROFITABLE(REFS, CALLS) */
1861
1862 \f
1863 /* #define EXIT_IGNORE_STACK */
1864
1865 /* Define this macro as a C expression that is nonzero for registers
1866    are used by the epilogue or the `return' pattern.  The stack and
1867    frame pointer registers are already be assumed to be used as
1868    needed.  */
1869 #define EPILOGUE_USES(REGNO)  ((REGNO) == GPR_LINK)
1870
1871 /* Define this macro if the function epilogue contains delay slots to which
1872    instructions from the rest of the function can be "moved".  The definition
1873    should be a C expression whose value is an integer representing the number
1874    of delay slots there.  */
1875 /* #define DELAY_SLOTS_FOR_EPILOGUE */
1876
1877 /* A C expression that returns 1 if INSN can be placed in delay slot number N
1878    of the epilogue.
1879
1880    The argument N is an integer which identifies the delay slot now being
1881    considered (since different slots may have different rules of eligibility).
1882    It is never negative and is always less than the number of epilogue delay
1883    slots (what `DELAY_SLOTS_FOR_EPILOGUE' returns).  If you reject a particular
1884    insn for a given delay slot, in principle, it may be reconsidered for a
1885    subsequent delay slot.  Also, other insns may (at least in principle) be
1886    considered for the so far unfilled delay slot.
1887
1888    The insns accepted to fill the epilogue delay slots are put in an
1889    RTL list made with `insn_list' objects, stored in the variable
1890    `current_function_epilogue_delay_list'.  The insn for the first
1891    delay slot comes first in the list.  Your definition of the function
1892    output_function_epilogue() should fill the delay slots by outputting the
1893    insns in this list, usually by calling `final_scan_insn'.
1894
1895    You need not define this macro if you did not define
1896    `DELAY_SLOTS_FOR_EPILOGUE'.  */
1897 /* #define ELIGIBLE_FOR_EPILOGUE_DELAY(INSN, N) */
1898
1899 /* A C compound statement that outputs the assembler code for a thunk function,
1900    used to implement C++ virtual function calls with multiple inheritance.  The
1901    thunk acts as a wrapper around a virtual function, adjusting the implicit
1902    object parameter before handing control off to the real function.
1903
1904    First, emit code to add the integer DELTA to the location that contains the
1905    incoming first argument.  Assume that this argument contains a pointer, and
1906    is the one used to pass the `this' pointer in C++.  This is the incoming
1907    argument *before* the function prologue, e.g. `%o0' on a sparc.  The
1908    addition must preserve the values of all other incoming arguments.
1909
1910    After the addition, emit code to jump to FUNCTION, which is a
1911    `FUNCTION_DECL'.  This is a direct pure jump, not a call, and does not touch
1912    the return address.  Hence returning from FUNCTION will return to whoever
1913    called the current `thunk'.
1914
1915    The effect must be as if FUNCTION had been called directly with the
1916    adjusted first argument.  This macro is responsible for emitting
1917    all of the code for a thunk function; output_function_prologue()
1918    and output_function_epilogue() are not invoked.
1919
1920    The THUNK_FNDECL is redundant.  (DELTA and FUNCTION have already been
1921    extracted from it.)  It might possibly be useful on some targets, but
1922    probably not.
1923
1924    If you do not define this macro, the target-independent code in the C++
1925    frontend will generate a less efficient heavyweight thunk that calls
1926    FUNCTION instead of jumping to it.  The generic approach does not support
1927    varargs.  */
1928 /* #define ASM_OUTPUT_MI_THUNK(FILE, THUNK_FNDECL, DELTA, FUNCTION) */
1929
1930 /* A C structure for machine-specific, per-function data.
1931    This is added to the cfun structure.  */
1932 typedef struct machine_function
1933 {
1934   /* Additionsl stack adjustment in __builtin_eh_throw.  */
1935   struct rtx_def * eh_epilogue_sp_ofs;
1936 } machine_function;
1937
1938 \f
1939 /* Generating Code for Profiling.  */
1940
1941 /* A C statement or compound statement to output to FILE some assembler code to
1942    call the profiling subroutine `mcount'.  Before calling, the assembler code
1943    must load the address of a counter variable into a register where `mcount'
1944    expects to find the address.  The name of this variable is `LP' followed by
1945    the number LABELNO, so you would generate the name using `LP%d' in a
1946    `fprintf'.
1947
1948    The details of how the address should be passed to `mcount' are determined
1949    by your operating system environment, not by GNU CC.  To figure them out,
1950    compile a small program for profiling using the system's installed C
1951    compiler and look at the assembler code that results.  */
1952
1953 #define FUNCTION_PROFILER(FILE, LABELNO) d30v_function_profiler (FILE, LABELNO)
1954
1955 /* Define this macro if the code for function profiling should come before the
1956    function prologue.  Normally, the profiling code comes after.  */
1957 /* #define PROFILE_BEFORE_PROLOGUE */
1958
1959 \f
1960 /* Implementing the Varargs Macros.  */
1961
1962 /* If defined, is a C expression that produces the machine-specific code for a
1963    call to `__builtin_saveregs'.  This code will be moved to the very beginning
1964    of the function, before any parameter access are made.  The return value of
1965    this function should be an RTX that contains the value to use as the return
1966    of `__builtin_saveregs'.
1967
1968    If this macro is not defined, the compiler will output an ordinary call to
1969    the library function `__builtin_saveregs'.  */
1970
1971 #define EXPAND_BUILTIN_SAVEREGS() d30v_expand_builtin_saveregs ()
1972
1973 /* This macro offers an alternative to using `__builtin_saveregs' and defining
1974    the macro `EXPAND_BUILTIN_SAVEREGS'.  Use it to store the anonymous register
1975    arguments into the stack so that all the arguments appear to have been
1976    passed consecutively on the stack.  Once this is done, you can use the
1977    standard implementation of varargs that works for machines that pass all
1978    their arguments on the stack.
1979
1980    The argument ARGS_SO_FAR is the `CUMULATIVE_ARGS' data structure, containing
1981    the values that obtain after processing of the named arguments.  The
1982    arguments MODE and TYPE describe the last named argument--its machine mode
1983    and its data type as a tree node.
1984
1985    The macro implementation should do two things: first, push onto the stack
1986    all the argument registers *not* used for the named arguments, and second,
1987    store the size of the data thus pushed into the `int'-valued variable whose
1988    name is supplied as the argument PRETEND_ARGS_SIZE.  The value that you
1989    store here will serve as additional offset for setting up the stack frame.
1990
1991    Because you must generate code to push the anonymous arguments at compile
1992    time without knowing their data types, `SETUP_INCOMING_VARARGS' is only
1993    useful on machines that have just a single category of argument register and
1994    use it uniformly for all data types.
1995
1996    If the argument SECOND_TIME is nonzero, it means that the arguments of the
1997    function are being analyzed for the second time.  This happens for an inline
1998    function, which is not actually compiled until the end of the source file.
1999    The macro `SETUP_INCOMING_VARARGS' should not generate any instructions in
2000    this case.  */
2001
2002 #define SETUP_INCOMING_VARARGS(ARGS_SO_FAR, MODE, TYPE, PRETEND_ARGS_SIZE, SECOND_TIME) \
2003   d30v_setup_incoming_varargs (&ARGS_SO_FAR, (int) MODE, TYPE,          \
2004                                &PRETEND_ARGS_SIZE, SECOND_TIME)
2005
2006 /* Define this macro if the location where a function argument is passed
2007    depends on whether or not it is a named argument.
2008
2009    This macro controls how the NAMED argument to `FUNCTION_ARG' is set for
2010    varargs and stdarg functions.  With this macro defined, the NAMED argument
2011    is always true for named arguments, and false for unnamed arguments.  If
2012    this is not defined, but `SETUP_INCOMING_VARARGS' is defined, then all
2013    arguments are treated as named.  Otherwise, all named arguments except the
2014    last are treated as named.  */
2015 /* #define STRICT_ARGUMENT_NAMING */
2016
2017 /* Build up the stdarg/varargs va_list type tree, assinging it to NODE.  If not
2018    defined, it is assumed that va_list is a void * pointer.  */
2019
2020 #define BUILD_VA_LIST_TYPE(VALIST) \
2021   (VALIST) = d30v_build_va_list ()
2022
2023
2024 /* Implement the stdarg/varargs va_start macro.  STDARG_P is non-zero if this
2025    is stdarg.h instead of varargs.h.  VALIST is the tree of the va_list
2026    variable to initialize.  NEXTARG is the machine independent notion of the
2027    'next' argument after the variable arguments.  If not defined, a standard
2028    implementation will be defined that works for arguments passed on the stack.  */
2029
2030 #define EXPAND_BUILTIN_VA_START(STDARG_P, VALIST, NEXTARG)              \
2031 (d30v_expand_builtin_va_start(STDARG_P, VALIST, NEXTARG))
2032
2033 /* Implement the stdarg/varargs va_arg macro.  VALIST is the variable of type
2034    va_list as a tree, TYPE is the type passed to va_arg.  */
2035
2036 #define EXPAND_BUILTIN_VA_ARG(VALIST, TYPE)                             \
2037 (d30v_expand_builtin_va_arg (VALIST, TYPE))
2038
2039 /* Implement the stdarg/varargs va_end macro.
2040    VALIST is the variable of type va_list as a tree.  */
2041
2042 /* #define EXPAND_BUILTIN_VA_END(VALIST) */
2043
2044
2045 \f
2046 /* Trampolines for Nested Functions.  */
2047
2048 /* A C statement to output, on the stream FILE, assembler code for a block of
2049    data that contains the constant parts of a trampoline.  This code should not
2050    include a label--the label is taken care of automatically.  */
2051 /* #define TRAMPOLINE_TEMPLATE(FILE) d30v_trampoline_template (FILE) */
2052
2053 /* The name of a subroutine to switch to the section in which the trampoline
2054    template is to be placed (*note Sections::.).  The default is a value of
2055    `readonly_data_section', which places the trampoline in the section
2056    containing read-only data.  */
2057 /* #define TRAMPOLINE_SECTION */
2058
2059 /* A C expression for the size in bytes of the trampoline, as an integer.  */
2060 #define TRAMPOLINE_SIZE (d30v_trampoline_size ())
2061
2062 /* Alignment required for trampolines, in bits.
2063
2064    If you don't define this macro, the value of `BIGGEST_ALIGNMENT' is used for
2065    aligning trampolines.  */
2066 #define TRAMPOLINE_ALIGNMENT 64
2067
2068 /* A C statement to initialize the variable parts of a trampoline.  ADDR is an
2069    RTX for the address of the trampoline; FNADDR is an RTX for the address of
2070    the nested function; STATIC_CHAIN is an RTX for the static chain value that
2071    should be passed to the function when it is called.  */
2072 #define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN) \
2073   d30v_initialize_trampoline (ADDR, FNADDR, STATIC_CHAIN)
2074
2075 /* A C expression to allocate run-time space for a trampoline.  The expression
2076    value should be an RTX representing a memory reference to the space for the
2077    trampoline.
2078
2079    If this macro is not defined, by default the trampoline is allocated as a
2080    stack slot.  This default is right for most machines.  The exceptions are
2081    machines where it is impossible to execute instructions in the stack area.
2082    On such machines, you may have to implement a separate stack, using this
2083    macro in conjunction with output_function_prologue () and
2084    output_function_epilogue ().
2085
2086    FP points to a data structure, a `struct function', which describes the
2087    compilation status of the immediate containing function of the function
2088    which the trampoline is for.  Normally (when `ALLOCATE_TRAMPOLINE' is not
2089    defined), the stack slot for the trampoline is in the stack frame of this
2090    containing function.  Other allocation strategies probably must do something
2091    analogous with this information.  */
2092 /* #define ALLOCATE_TRAMPOLINE(FP) */
2093
2094 /* Implementing trampolines is difficult on many machines because they have
2095    separate instruction and data caches.  Writing into a stack location fails
2096    to clear the memory in the instruction cache, so when the program jumps to
2097    that location, it executes the old contents.
2098
2099    Here are two possible solutions.  One is to clear the relevant parts of the
2100    instruction cache whenever a trampoline is set up.  The other is to make all
2101    trampolines identical, by having them jump to a standard subroutine.  The
2102    former technique makes trampoline execution faster; the latter makes
2103    initialization faster.
2104
2105    To clear the instruction cache when a trampoline is initialized, define the
2106    following macros which describe the shape of the cache.  */
2107
2108 /* The total size in bytes of the cache.  */
2109 /* #define INSN_CACHE_SIZE */
2110
2111 /* The length in bytes of each cache line.  The cache is divided into cache
2112    lines which are disjoint slots, each holding a contiguous chunk of data
2113    fetched from memory.  Each time data is brought into the cache, an entire
2114    line is read at once.  The data loaded into a cache line is always aligned
2115    on a boundary equal to the line size.  */
2116 /* #define INSN_CACHE_LINE_WIDTH */
2117
2118 /* The number of alternative cache lines that can hold any particular memory
2119    location.  */
2120 /* #define INSN_CACHE_DEPTH */
2121
2122 /* Alternatively, if the machine has system calls or instructions to clear the
2123    instruction cache directly, you can define the following macro.  */
2124
2125 /* If defined, expands to a C expression clearing the *instruction cache* in
2126    the specified interval.  If it is not defined, and the macro INSN_CACHE_SIZE
2127    is defined, some generic code is generated to clear the cache.  The
2128    definition of this macro would typically be a series of `asm' statements.
2129    Both BEG and END are both pointer expressions.  */
2130 /* #define CLEAR_INSN_CACHE (BEG, END) */
2131
2132 /* To use a standard subroutine, define the following macro.  In addition, you
2133    must make sure that the instructions in a trampoline fill an entire cache
2134    line with identical instructions, or else ensure that the beginning of the
2135    trampoline code is always aligned at the same point in its cache line.  Look
2136    in `m68k.h' as a guide.  */
2137
2138 /* Define this macro if trampolines need a special subroutine to do their work.
2139    The macro should expand to a series of `asm' statements which will be
2140    compiled with GNU CC.  They go in a library function named
2141    `__transfer_from_trampoline'.
2142
2143    If you need to avoid executing the ordinary prologue code of a compiled C
2144    function when you jump to the subroutine, you can do so by placing a special
2145    label of your own in the assembler code.  Use one `asm' statement to
2146    generate an assembler label, and another to make the label global.  Then
2147    trampolines can use that label to jump directly to your special assembler
2148    code.  */
2149 /* #define TRANSFER_FROM_TRAMPOLINE */
2150
2151 \f
2152 /* Implicit Calls to Library Routines */
2153
2154 /* A C string constant giving the name of the function to call for
2155    multiplication of one signed full-word by another.  If you do not define
2156    this macro, the default name is used, which is `__mulsi3', a function
2157    defined in `libgcc.a'.  */
2158 /* #define MULSI3_LIBCALL */
2159
2160 /* A C string constant giving the name of the function to call for division of
2161    one signed full-word by another.  If you do not define this macro, the
2162    default name is used, which is `__divsi3', a function defined in `libgcc.a'.  */
2163 /* #define DIVSI3_LIBCALL */
2164
2165 /* A C string constant giving the name of the function to call for division of
2166    one unsigned full-word by another.  If you do not define this macro, the
2167    default name is used, which is `__udivsi3', a function defined in
2168    `libgcc.a'.  */
2169 /* #define UDIVSI3_LIBCALL */
2170
2171 /* A C string constant giving the name of the function to call for the
2172    remainder in division of one signed full-word by another.  If you do not
2173    define this macro, the default name is used, which is `__modsi3', a function
2174    defined in `libgcc.a'.  */
2175 /* #define MODSI3_LIBCALL */
2176
2177 /* A C string constant giving the name of the function to call for the
2178    remainder in division of one unsigned full-word by another.  If you do not
2179    define this macro, the default name is used, which is `__umodsi3', a
2180    function defined in `libgcc.a'.  */
2181 /* #define UMODSI3_LIBCALL */
2182
2183 /* A C string constant giving the name of the function to call for
2184    multiplication of one signed double-word by another.  If you do not define
2185    this macro, the default name is used, which is `__muldi3', a function
2186    defined in `libgcc.a'.  */
2187 /* #define MULDI3_LIBCALL */
2188
2189 /* A C string constant giving the name of the function to call for division of
2190    one signed double-word by another.  If you do not define this macro, the
2191    default name is used, which is `__divdi3', a function defined in `libgcc.a'.  */
2192 /* #define DIVDI3_LIBCALL */
2193
2194 /* A C string constant giving the name of the function to call for division of
2195    one unsigned full-word by another.  If you do not define this macro, the
2196    default name is used, which is `__udivdi3', a function defined in
2197    `libgcc.a'.  */
2198 /* #define UDIVDI3_LIBCALL */
2199
2200 /* A C string constant giving the name of the function to call for the
2201    remainder in division of one signed double-word by another.  If you do not
2202    define this macro, the default name is used, which is `__moddi3', a function
2203    defined in `libgcc.a'.  */
2204 /* #define MODDI3_LIBCALL */
2205
2206 /* A C string constant giving the name of the function to call for the
2207    remainder in division of one unsigned full-word by another.  If you do not
2208    define this macro, the default name is used, which is `__umoddi3', a
2209    function defined in `libgcc.a'.  */
2210 /* #define UMODDI3_LIBCALL */
2211
2212 /* Define this macro as a C statement that declares additional library routines
2213    renames existing ones. `init_optabs' calls this macro after initializing all
2214    the normal library routines.  */
2215 /* #define INIT_TARGET_OPTABS */
2216
2217 /* The value of `EDOM' on the target machine, as a C integer constant
2218    expression.  If you don't define this macro, GNU CC does not attempt to
2219    deposit the value of `EDOM' into `errno' directly.  Look in
2220    `/usr/include/errno.h' to find the value of `EDOM' on your system.
2221
2222    If you do not define `TARGET_EDOM', then compiled code reports domain errors
2223    by calling the library function and letting it report the error.  If
2224    mathematical functions on your system use `matherr' when there is an error,
2225    then you should leave `TARGET_EDOM' undefined so that `matherr' is used
2226    normally.  */
2227 /* #define TARGET_EDOM */
2228
2229 /* Define this macro as a C expression to create an rtl expression that refers
2230    to the global "variable" `errno'.  (On certain systems, `errno' may not
2231    actually be a variable.)  If you don't define this macro, a reasonable
2232    default is used.  */
2233 /* #define GEN_ERRNO_RTX */
2234
2235 /* Define this macro if GNU CC should generate calls to the System V (and ANSI
2236    C) library functions `memcpy' and `memset' rather than the BSD functions
2237    `bcopy' and `bzero'.
2238
2239    Defined in svr4.h.  */
2240 /* #define TARGET_MEM_FUNCTIONS */
2241
2242 /* Define this macro to generate code for Objective C message sending using the
2243    calling convention of the NeXT system.  This calling convention involves
2244    passing the object, the selector and the method arguments all at once to the
2245    method-lookup library function.
2246
2247    The default calling convention passes just the object and the selector to
2248    the lookup function, which returns a pointer to the method.  */
2249 /* #define NEXT_OBJC_RUNTIME */
2250
2251 \f
2252 /* Addressing Modes */
2253
2254 /* Define this macro if the machine supports post-increment addressing.  */
2255 #define HAVE_POST_INCREMENT 1
2256
2257 /* Similar for other kinds of addressing.  */
2258 /* #define HAVE_PRE_INCREMENT 0 */
2259 #define HAVE_POST_DECREMENT 1
2260 /* #define HAVE_PRE_DECREMENT 0 */
2261
2262 /* A C expression that is 1 if the RTX X is a constant which is a valid
2263    address.  On most machines, this can be defined as `CONSTANT_P (X)', but a
2264    few machines are more restrictive in which constant addresses are supported.
2265
2266    `CONSTANT_P' accepts integer-values expressions whose values are not
2267    explicitly known, such as `symbol_ref', `label_ref', and `high' expressions
2268    and `const' arithmetic expressions, in addition to `const_int' and
2269    `const_double' expressions.  */
2270 #define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)
2271
2272 /* A number, the maximum number of registers that can appear in a valid memory
2273    address.  Note that it is up to you to specify a value equal to the maximum
2274    number that `GO_IF_LEGITIMATE_ADDRESS' would ever accept.  */
2275 #define MAX_REGS_PER_ADDRESS 2
2276
2277 /* A C compound statement with a conditional `goto LABEL;' executed if X (an
2278    RTX) is a legitimate memory address on the target machine for a memory
2279    operand of mode MODE.
2280
2281    It usually pays to define several simpler macros to serve as subroutines for
2282    this one.  Otherwise it may be too complicated to understand.
2283
2284    This macro must exist in two variants: a strict variant and a non-strict
2285    one.  The strict variant is used in the reload pass.  It must be defined so
2286    that any pseudo-register that has not been allocated a hard register is
2287    considered a memory reference.  In contexts where some kind of register is
2288    required, a pseudo-register with no hard register must be rejected.
2289
2290    The non-strict variant is used in other passes.  It must be defined to
2291    accept all pseudo-registers in every context where some kind of register is
2292    required.
2293
2294    Compiler source files that want to use the strict variant of this macro
2295    define the macro `REG_OK_STRICT'.  You should use an `#ifdef REG_OK_STRICT'
2296    conditional to define the strict variant in that case and the non-strict
2297    variant otherwise.
2298
2299    Subroutines to check for acceptable registers for various purposes (one for
2300    base registers, one for index registers, and so on) are typically among the
2301    subroutines used to define `GO_IF_LEGITIMATE_ADDRESS'.  Then only these
2302    subroutine macros need have two variants; the higher levels of macros may be
2303    the same whether strict or not.
2304
2305    Normally, constant addresses which are the sum of a `symbol_ref' and an
2306    integer are stored inside a `const' RTX to mark them as constant.
2307    Therefore, there is no need to recognize such sums specifically as
2308    legitimate addresses.  Normally you would simply recognize any `const' as
2309    legitimate.
2310
2311    Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant sums that
2312    are not marked with `const'.  It assumes that a naked `plus' indicates
2313    indexing.  If so, then you *must* reject such naked constant sums as
2314    illegitimate addresses, so that none of them will be given to
2315    `PRINT_OPERAND_ADDRESS'.
2316
2317    On some machines, whether a symbolic address is legitimate depends on the
2318    section that the address refers to.  On these machines, define the macro
2319    `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and
2320    then check for it here.  When you see a `const', you will have to look
2321    inside it to find the `symbol_ref' in order to determine the section.  *Note
2322    Assembler Format::.
2323
2324    The best way to modify the name string is by adding text to the beginning,
2325    with suitable punctuation to prevent any ambiguity.  Allocate the new name
2326    in `saveable_obstack'.  You will have to modify `ASM_OUTPUT_LABELREF' to
2327    remove and decode the added text and output the name accordingly, and define
2328    `STRIP_NAME_ENCODING' to access the original name string.
2329
2330    You can check the information stored here into the `symbol_ref' in the
2331    definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and
2332    `PRINT_OPERAND_ADDRESS'.  */
2333
2334 #ifdef  REG_OK_STRICT
2335 #define REG_OK_STRICT_P 1
2336 #else
2337 #define REG_OK_STRICT_P 0
2338 #endif
2339
2340 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)                         \
2341 do {                                                                    \
2342     if (d30v_legitimate_address_p ((int)MODE, X, REG_OK_STRICT_P))      \
2343       goto ADDR;                                                        \
2344 } while (0)
2345
2346 /* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for
2347    use as a base register.  For hard registers, it should always accept those
2348    which the hardware permits and reject the others.  Whether the macro accepts
2349    or rejects pseudo registers must be controlled by `REG_OK_STRICT' as
2350    described above.  This usually requires two variant definitions, of which
2351    `REG_OK_STRICT' controls the one actually used.  */
2352
2353 #ifdef REG_OK_STRICT
2354 #define REG_OK_FOR_BASE_P(X) (GPR_P (REGNO (X)))
2355 #else
2356 #define REG_OK_FOR_BASE_P(X) (GPR_OR_PSEUDO_P (REGNO (X)))
2357 #endif
2358
2359 /* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for
2360    use as an index register.
2361
2362    The difference between an index register and a base register is that the
2363    index register may be scaled.  If an address involves the sum of two
2364    registers, neither one of them scaled, then either one may be labeled the
2365    "base" and the other the "index"; but whichever labeling is used must fit
2366    the machine's constraints of which registers may serve in each capacity.
2367    The compiler will try both labelings, looking for one that is valid, and
2368    will reload one or both registers only if neither labeling works.  */
2369
2370 #define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X)
2371
2372 /* A C compound statement that attempts to replace X with a valid memory
2373    address for an operand of mode MODE.  WIN will be a C statement label
2374    elsewhere in the code; the macro definition may use
2375
2376         GO_IF_LEGITIMATE_ADDRESS (MODE, X, WIN);
2377
2378    to avoid further processing if the address has become legitimate.
2379
2380    X will always be the result of a call to `break_out_memory_refs', and OLDX
2381    will be the operand that was given to that function to produce X.
2382
2383    The code generated by this macro should not alter the substructure of X.  If
2384    it transforms X into a more legitimate form, it should assign X (which will
2385    always be a C variable) a new value.
2386
2387    It is not necessary for this macro to come up with a legitimate address.
2388    The compiler has standard ways of doing so in all cases.  In fact, it is
2389    safe for this macro to do nothing.  But often a machine-dependent strategy
2390    can generate better code.  */
2391
2392 #define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)                          \
2393 do {                                                                    \
2394   rtx y = d30v_legitimize_address (X, OLDX, (int)MODE, REG_OK_STRICT_P); \
2395   if (y)                                                                \
2396     {                                                                   \
2397       X = y;                                                            \
2398       GO_IF_LEGITIMATE_ADDRESS (MODE, X, WIN);                          \
2399     }                                                                   \
2400 } while (0)
2401
2402 /* A C statement or compound statement with a conditional `goto LABEL;'
2403    executed if memory address X (an RTX) can have different meanings depending
2404    on the machine mode of the memory reference it is used for or if the address
2405    is valid for some modes but not others.
2406
2407    Autoincrement and autodecrement addresses typically have mode-dependent
2408    effects because the amount of the increment or decrement is the size of the
2409    operand being addressed.  Some machines have other mode-dependent addresses.
2410    Many RISC machines have no mode-dependent addresses.
2411
2412    You may assume that ADDR is a valid address for the machine.  */
2413
2414 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)                       \
2415 do {                                                                    \
2416   if (d30v_mode_dependent_address_p (ADDR))                             \
2417     goto LABEL;                                                         \
2418 } while (0)                                                             \
2419
2420 /* A C expression that is nonzero if X is a legitimate constant for an
2421    immediate operand on the target machine.  You can assume that X satisfies
2422    `CONSTANT_P', so you need not check this.  In fact, `1' is a suitable
2423    definition for this macro on machines where anything `CONSTANT_P' is valid.  */
2424 #define LEGITIMATE_CONSTANT_P(X) 1
2425
2426 \f
2427 /* Condition Code Status */
2428
2429 /* C code for a data type which is used for declaring the `mdep' component of
2430    `cc_status'.  It defaults to `int'.
2431
2432    This macro is not used on machines that do not use `cc0'.  */
2433 /* #define CC_STATUS_MDEP */
2434
2435 /* A C expression to initialize the `mdep' field to "empty".  The default
2436    definition does nothing, since most machines don't use the field anyway.  If
2437    you want to use the field, you should probably define this macro to
2438    initialize it.
2439
2440    This macro is not used on machines that do not use `cc0'.  */
2441 /* #define CC_STATUS_MDEP_INIT */
2442
2443 /* A C compound statement to set the components of `cc_status' appropriately
2444    for an insn INSN whose body is EXP.  It is this macro's responsibility to
2445    recognize insns that set the condition code as a byproduct of other activity
2446    as well as those that explicitly set `(cc0)'.
2447
2448    This macro is not used on machines that do not use `cc0'.
2449
2450    If there are insns that do not set the condition code but do alter other
2451    machine registers, this macro must check to see whether they invalidate the
2452    expressions that the condition code is recorded as reflecting.  For example,
2453    on the 68000, insns that store in address registers do not set the condition
2454    code, which means that usually `NOTICE_UPDATE_CC' can leave `cc_status'
2455    unaltered for such insns.  But suppose that the previous insn set the
2456    condition code based on location `a4@(102)' and the current insn stores a
2457    new value in `a4'.  Although the condition code is not changed by this, it
2458    will no longer be true that it reflects the contents of `a4@(102)'.
2459    Therefore, `NOTICE_UPDATE_CC' must alter `cc_status' in this case to say
2460    that nothing is known about the condition code value.
2461
2462    The definition of `NOTICE_UPDATE_CC' must be prepared to deal with the
2463    results of peephole optimization: insns whose patterns are `parallel' RTXs
2464    containing various `reg', `mem' or constants which are just the operands.
2465    The RTL structure of these insns is not sufficient to indicate what the
2466    insns actually do.  What `NOTICE_UPDATE_CC' should do when it sees one is
2467    just to run `CC_STATUS_INIT'.
2468
2469    A possible definition of `NOTICE_UPDATE_CC' is to call a function that looks
2470    at an attribute (*note Insn Attributes::.) named, for example, `cc'.  This
2471    avoids having detailed information about patterns in two places, the `md'
2472    file and in `NOTICE_UPDATE_CC'.  */
2473 /* #define NOTICE_UPDATE_CC(EXP, INSN) */
2474
2475 /* A list of names to be used for additional modes for condition code values in
2476    registers (*note Jump Patterns::.).  These names are added to `enum
2477    machine_mode' and all have class `MODE_CC'.  By convention, they should
2478    start with `CC' and end with `mode'.
2479
2480    You should only define this macro if your machine does not use `cc0' and
2481    only if additional modes are required.  */
2482 /* #define EXTRA_CC_MODES */
2483
2484 /* Returns a mode from class `MODE_CC' to be used when comparison operation
2485    code OP is applied to rtx X and Y.  For example, on the Sparc,
2486    `SELECT_CC_MODE' is defined as (see *note Jump Patterns::.  for a
2487    description of the reason for this definition)
2488
2489         #define SELECT_CC_MODE(OP,X,Y) \
2490           (GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT          \
2491            ? ((OP == EQ || OP == NE) ? CCFPmode : CCFPEmode)    \
2492            : ((GET_CODE (X) == PLUS || GET_CODE (X) == MINUS    \
2493                || GET_CODE (X) == NEG) \
2494               ? CC_NOOVmode : CCmode))
2495
2496    You need not define this macro if `EXTRA_CC_MODES' is not defined.  */
2497 /* #define SELECT_CC_MODE(OP, X, Y) */
2498
2499 /* One some machines not all possible comparisons are defined, but you can
2500    convert an invalid comparison into a valid one.  For example, the Alpha does
2501    not have a `GT' comparison, but you can use an `LT' comparison instead and
2502    swap the order of the operands.
2503
2504    On such machines, define this macro to be a C statement to do any required
2505    conversions.  CODE is the initial comparison code and OP0 and OP1 are the
2506    left and right operands of the comparison, respectively.  You should modify
2507    CODE, OP0, and OP1 as required.
2508
2509    GNU CC will not assume that the comparison resulting from this macro is
2510    valid but will see if the resulting insn matches a pattern in the `md' file.
2511
2512    You need not define this macro if it would never change the comparison code
2513    or operands.  */
2514 /* #define CANONICALIZE_COMPARISON(CODE, OP0, OP1) */
2515
2516 /* A C expression whose value is one if it is always safe to reverse a
2517    comparison whose mode is MODE.  If `SELECT_CC_MODE' can ever return MODE for
2518    a floating-point inequality comparison, then `REVERSIBLE_CC_MODE (MODE)'
2519    must be zero.
2520
2521    You need not define this macro if it would always returns zero or if the
2522    floating-point format is anything other than `IEEE_FLOAT_FORMAT'.  For
2523    example, here is the definition used on the Sparc, where floating-point
2524    inequality comparisons are always given `CCFPEmode':
2525
2526         #define REVERSIBLE_CC_MODE(MODE)  ((MODE) != CCFPEmode)  */
2527 /* #define REVERSIBLE_CC_MODE(MODE) */
2528
2529 \f
2530 /* Describing Relative Costs of Operations */
2531
2532 /* A part of a C `switch' statement that describes the relative costs of
2533    constant RTL expressions.  It must contain `case' labels for expression
2534    codes `const_int', `const', `symbol_ref', `label_ref' and `const_double'.
2535    Each case must ultimately reach a `return' statement to return the relative
2536    cost of the use of that kind of constant value in an expression.  The cost
2537    may depend on the precise value of the constant, which is available for
2538    examination in X, and the rtx code of the expression in which it is
2539    contained, found in OUTER_CODE.
2540
2541    CODE is the expression code--redundant, since it can be obtained with
2542    `GET_CODE (X)'.  */
2543
2544 /* On the d30v, consider operatnds that fit in a short instruction very
2545    cheap.  However, at this time, it causes cse to generate incorrect
2546    code, so disable it for now.  */
2547 #if 0
2548 #define CONST_COSTS(X, CODE, OUTER_CODE)                                \
2549   case CONST_INT:                                                       \
2550     if (IN_RANGE_P (INTVAL (X), 0, 31))                                 \
2551       return 0;                                                         \
2552     else if ((OUTER_CODE) == LEU && (OUTER_CODE) == LTU                 \
2553              && (OUTER_CODE) == GEU && (OUTER_CODE) == GTU)             \
2554       return IN_RANGE_P (INTVAL (X), 32, 63) ? 0 : COSTS_N_INSNS (2);   \
2555     else                                                                \
2556       return IN_RANGE_P (INTVAL (X), -31, -1) ? 0 : COSTS_N_INSNS (2);  \
2557   case SYMBOL_REF:                                                      \
2558   case LABEL_REF:                                                       \
2559   case CONST:                                                           \
2560     return COSTS_N_INSNS (2);                                           \
2561   case CONST_DOUBLE:                                                    \
2562     return COSTS_N_INSNS ((GET_MODE (X) == SFmode) ? 2 : 4);
2563 #else
2564 #define CONST_COSTS(X, CODE, OUTER_CODE)
2565 #endif
2566
2567 /* Like `CONST_COSTS' but applies to nonconstant RTL expressions.  This can be
2568    used, for example, to indicate how costly a multiply instruction is.  In
2569    writing this macro, you can use the construct `COSTS_N_INSNS (N)' to specify
2570    a cost equal to N fast instructions.  OUTER_CODE is the code of the
2571    expression in which X is contained.
2572
2573    This macro is optional; do not define it if the default cost assumptions are
2574    adequate for the target machine.  */
2575 #define RTX_COSTS(X, CODE, OUTER_CODE)                                  \
2576   case MULT:                                                            \
2577     return COSTS_N_INSNS ((GET_CODE (XEXP (x, 1)) == CONST_INT          \
2578                            && exact_log2 (INTVAL (XEXP (x, 1))) >= 0)   \
2579                           ? 1 : 2);
2580
2581 /* An expression giving the cost of an addressing mode that contains ADDRESS.
2582    If not defined, the cost is computed from the ADDRESS expression and the
2583    `CONST_COSTS' values.
2584
2585    For most CISC machines, the default cost is a good approximation of the true
2586    cost of the addressing mode.  However, on RISC machines, all instructions
2587    normally have the same length and execution time.  Hence all addresses will
2588    have equal costs.
2589
2590    In cases where more than one form of an address is known, the form with the
2591    lowest cost will be used.  If multiple forms have the same, lowest, cost,
2592    the one that is the most complex will be used.
2593
2594    For example, suppose an address that is equal to the sum of a register and a
2595    constant is used twice in the same basic block.  When this macro is not
2596    defined, the address will be computed in a register and memory references
2597    will be indirect through that register.  On machines where the cost of the
2598    addressing mode containing the sum is no higher than that of a simple
2599    indirect reference, this will produce an additional instruction and possibly
2600    require an additional register.  Proper specification of this macro
2601    eliminates this overhead for such machines.
2602
2603    Similar use of this macro is made in strength reduction of loops.
2604
2605    ADDRESS need not be valid as an address.  In such a case, the cost is not
2606    relevant and can be any value; invalid addresses need not be assigned a
2607    different cost.
2608
2609    On machines where an address involving more than one register is as cheap as
2610    an address computation involving only one register, defining `ADDRESS_COST'
2611    to reflect this can cause two registers to be live over a region of code
2612    where only one would have been if `ADDRESS_COST' were not defined in that
2613    manner.  This effect should be considered in the definition of this macro.
2614    Equivalent costs should probably only be given to addresses with different
2615    numbers of registers on machines with lots of registers.
2616
2617    This macro will normally either not be defined or be defined as a constant.  */
2618 #define ADDRESS_COST(ADDRESS) 0
2619
2620 /* A C expression for the cost of moving data from a register in class FROM to
2621    one in class TO.  The classes are expressed using the enumeration values
2622    such as `GENERAL_REGS'.  A value of 4 is the default; other values are
2623    interpreted relative to that.
2624
2625    It is not required that the cost always equal 2 when FROM is the same as TO;
2626    on some machines it is expensive to move between registers if they are not
2627    general registers.
2628
2629    If reload sees an insn consisting of a single `set' between two hard
2630    registers, and if `REGISTER_MOVE_COST' applied to their classes returns a
2631    value of 2, reload does not check to ensure that the constraints of the insn
2632    are met.  Setting a cost of other than 2 will allow reload to verify that
2633    the constraints are met.  You should do this if the `movM' pattern's
2634    constraints do not allow such copying.  */
2635
2636 #define REGISTER_MOVE_COST(MODE, FROM, TO)                              \
2637   (((FROM) != GPR_REGS && (FROM) != EVEN_REGS                           \
2638    && (TO) != GPR_REGS && (TO) != EVEN_REGS) ? 4 : 2)
2639
2640 /* A C expression for the cost of moving data of mode M between a register and
2641    memory.  A value of 2 is the default; this cost is relative to those in
2642    `REGISTER_MOVE_COST'.
2643
2644    If moving between registers and memory is more expensive than between two
2645    registers, you should define this macro to express the relative cost.  */
2646 #define MEMORY_MOVE_COST(M,C,I) 4
2647
2648 /* A C expression for the cost of a branch instruction.  A value of 1 is the
2649    default; other values are interpreted relative to that.  */
2650
2651 #define BRANCH_COST d30v_branch_cost
2652
2653 #define D30V_DEFAULT_BRANCH_COST 2
2654
2655 /* Values of the -mbranch-cost=n string.  */
2656 extern int d30v_branch_cost;
2657 extern const char *d30v_branch_cost_string;
2658
2659 /* Here are additional macros which do not specify precise relative costs, but
2660    only that certain actions are more expensive than GNU CC would ordinarily
2661    expect.  */
2662
2663 /* Define this macro as a C expression which is nonzero if accessing less than
2664    a word of memory (i.e. a `char' or a `short') is no faster than accessing a
2665    word of memory, i.e., if such access require more than one instruction or if
2666    there is no difference in cost between byte and (aligned) word loads.
2667
2668    When this macro is not defined, the compiler will access a field by finding
2669    the smallest containing object; when it is defined, a fullword load will be
2670    used if alignment permits.  Unless bytes accesses are faster than word
2671    accesses, using word accesses is preferable since it may eliminate
2672    subsequent memory access if subsequent accesses occur to other fields in the
2673    same word of the structure, but to different bytes.  */
2674 #define SLOW_BYTE_ACCESS 1
2675
2676 /* Define this macro to be the value 1 if unaligned accesses have a cost many
2677    times greater than aligned accesses, for example if they are emulated in a
2678    trap handler.
2679
2680    When this macro is non-zero, the compiler will act as if `STRICT_ALIGNMENT'
2681    were non-zero when generating code for block moves.  This can cause
2682    significantly more instructions to be produced.  Therefore, do not set this
2683    macro non-zero if unaligned accesses only add a cycle or two to the time for
2684    a memory access.
2685
2686    If the value of this macro is always zero, it need not be defined.  */
2687 /* #define SLOW_UNALIGNED_ACCESS */
2688
2689 /* Define this macro to inhibit strength reduction of memory addresses.  (On
2690    some machines, such strength reduction seems to do harm rather than good.)  */
2691 /* #define DONT_REDUCE_ADDR */
2692
2693 /* The number of scalar move insns which should be generated instead of a
2694    string move insn or a library call.  Increasing the value will always make
2695    code faster, but eventually incurs high cost in increased code size.
2696
2697    If you don't define this, a reasonable default is used.  */
2698 /* #define MOVE_RATIO */
2699
2700 /* Define this macro if it is as good or better to call a constant function
2701    address than to call an address kept in a register.  */
2702 #define NO_FUNCTION_CSE
2703
2704 /* Define this macro if it is as good or better for a function to call itself
2705    with an explicit address than to call an address kept in a register.  */
2706 /* #define NO_RECURSIVE_FUNCTION_CSE */
2707
2708 \f
2709 /* Dividing the output into sections.  */
2710
2711 /* A C expression whose value is a string containing the assembler operation
2712    that should precede instructions and read-only data.  Normally `".text"' is
2713    right.  */
2714 #define TEXT_SECTION_ASM_OP "\t.text"
2715
2716 /* A C expression whose value is a string containing the assembler operation to
2717    identify the following data as writable initialized data.  Normally
2718    `".data"' is right.  */
2719 #define DATA_SECTION_ASM_OP "\t.data"
2720
2721 /* if defined, a C expression whose value is a string containing the assembler
2722    operation to identify the following data as shared data.  If not defined,
2723    `DATA_SECTION_ASM_OP' will be used.  */
2724 /* #define SHARED_SECTION_ASM_OP */
2725
2726 /* If defined, a C expression whose value is a string containing the
2727    assembler operation to identify the following data as
2728    uninitialized global data.  If not defined, and neither
2729    `ASM_OUTPUT_BSS' nor `ASM_OUTPUT_ALIGNED_BSS' are defined,
2730    uninitialized global data will be output in the data section if
2731    `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be
2732    used.  */
2733 #define BSS_SECTION_ASM_OP "\t.bss"
2734
2735 /* If defined, a C expression whose value is a string containing the
2736    assembler operation to identify the following data as
2737    uninitialized global shared data.  If not defined, and
2738    `BSS_SECTION_ASM_OP' is, the latter will be used.  */
2739 /* #define SHARED_BSS_SECTION_ASM_OP */
2740
2741 /* A list of names for sections other than the standard two, which are
2742    `in_text' and `in_data'.  You need not define this macro on a system with no
2743    other sections (that GCC needs to use).
2744
2745    Defined in svr4.h.  */
2746 /* #define EXTRA_SECTIONS */
2747
2748 /* One or more functions to be defined in `varasm.c'.  These functions should
2749    do jobs analogous to those of `text_section' and `data_section', for your
2750    additional sections.  Do not define this macro if you do not define
2751    `EXTRA_SECTIONS'.
2752
2753    Defined in svr4.h.  */
2754 /* #define EXTRA_SECTION_FUNCTIONS */
2755
2756 /* On most machines, read-only variables, constants, and jump tables are placed
2757    in the text section.  If this is not the case on your machine, this macro
2758    should be defined to be the name of a function (either `data_section' or a
2759    function defined in `EXTRA_SECTIONS') that switches to the section to be
2760    used for read-only items.
2761
2762    If these items should be placed in the text section, this macro should not
2763    be defined.  */
2764 /* #define READONLY_DATA_SECTION */
2765
2766 /* A C statement or statements to switch to the appropriate section for output
2767    of EXP.  You can assume that EXP is either a `VAR_DECL' node or a constant
2768    of some sort.  RELOC indicates whether the initial value of EXP requires
2769    link-time relocations.  Select the section by calling `text_section' or one
2770    of the alternatives for other sections.
2771
2772    Do not define this macro if you put all read-only variables and constants in
2773    the read-only data section (usually the text section).
2774
2775    Defined in svr4.h.  */
2776 /* #define SELECT_SECTION(EXP, RELOC, ALIGN) */
2777
2778 /* A C statement or statements to switch to the appropriate section for output
2779    of RTX in mode MODE.  You can assume that RTX is some kind of constant in
2780    RTL.  The argument MODE is redundant except in the case of a `const_int'
2781    rtx.  Select the section by calling `text_section' or one of the
2782    alternatives for other sections.
2783
2784    Do not define this macro if you put all constants in the read-only data
2785    section.
2786
2787    Defined in svr4.h.  */
2788 /* #define SELECT_RTX_SECTION(MODE, RTX, ALIGN) */
2789
2790 /* Define this macro if jump tables (for `tablejump' insns) should be output in
2791    the text section, along with the assembler instructions.  Otherwise, the
2792    readonly data section is used.
2793
2794    This macro is irrelevant if there is no separate readonly data section.  */
2795 /* #define JUMP_TABLES_IN_TEXT_SECTION */
2796
2797 /* Define this macro if references to a symbol must be treated differently
2798    depending on something about the variable or function named by the symbol
2799    (such as what section it is in).
2800
2801    The macro definition, if any, is executed immediately after the rtl for DECL
2802    has been created and stored in `DECL_RTL (DECL)'.  The value of the rtl will
2803    be a `mem' whose address is a `symbol_ref'.
2804
2805    The usual thing for this macro to do is to record a flag in the `symbol_ref'
2806    (such as `SYMBOL_REF_FLAG') or to store a modified name string in the
2807    `symbol_ref' (if one bit is not enough information).  */
2808 /* #define ENCODE_SECTION_INFO(DECL) */
2809
2810 /* Decode SYM_NAME and store the real name part in VAR, sans the characters
2811    that encode section info.  Define this macro if `ENCODE_SECTION_INFO' alters
2812    the symbol's name string.  */
2813 /* #define STRIP_NAME_ENCODING(VAR, SYM_NAME) */
2814
2815 /* A C statement to build up a unique section name, expressed as a
2816    STRING_CST node, and assign it to `DECL_SECTION_NAME (DECL)'.
2817    RELOC indicates whether the initial value of EXP requires
2818    link-time relocations.  If you do not define this macro, GNU CC
2819    will use the symbol name prefixed by `.' as the section name.
2820
2821    Defined in svr4.h.  */
2822 /* #define UNIQUE_SECTION(DECL, RELOC) */
2823
2824 \f
2825 /* Position Independent Code.  */
2826
2827 /* The register number of the register used to address a table of static data
2828    addresses in memory.  In some cases this register is defined by a
2829    processor's "application binary interface" (ABI).  When this macro is
2830    defined, RTL is generated for this register once, as with the stack pointer
2831    and frame pointer registers.  If this macro is not defined, it is up to the
2832    machine-dependent files to allocate such a register (if necessary).  */
2833 /* #define PIC_OFFSET_TABLE_REGNUM */
2834
2835 /* Define this macro if the register defined by `PIC_OFFSET_TABLE_REGNUM' is
2836    clobbered by calls.  Do not define this macro if `PIC_OFFSET_TABLE_REGNUM'
2837    is not defined.  */
2838 /* #define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED */
2839
2840 /* By generating position-independent code, when two different programs (A and
2841    B) share a common library (libC.a), the text of the library can be shared
2842    whether or not the library is linked at the same address for both programs.
2843    In some of these environments, position-independent code requires not only
2844    the use of different addressing modes, but also special code to enable the
2845    use of these addressing modes.
2846
2847    The `FINALIZE_PIC' macro serves as a hook to emit these special codes once
2848    the function is being compiled into assembly code, but not before.  (It is
2849    not done before, because in the case of compiling an inline function, it
2850    would lead to multiple PIC prologues being included in functions which used
2851    inline functions and were compiled to assembly language.)  */
2852 /* #define FINALIZE_PIC */
2853
2854 /* A C expression that is nonzero if X is a legitimate immediate operand on the
2855    target machine when generating position independent code.  You can assume
2856    that X satisfies `CONSTANT_P', so you need not check this.  You can also
2857    assume FLAG_PIC is true, so you need not check it either.  You need not
2858    define this macro if all constants (including `SYMBOL_REF') can be immediate
2859    operands when generating position independent code.  */
2860 /* #define LEGITIMATE_PIC_OPERAND_P(X) */
2861
2862 \f
2863 /* The Overall Framework of an Assembler File.  */
2864
2865 /* A C expression which outputs to the stdio stream STREAM some appropriate
2866    text to go at the start of an assembler file.
2867
2868    Normally this macro is defined to output a line containing `#NO_APP', which
2869    is a comment that has no effect on most assemblers but tells the GNU
2870    assembler that it can save time by not checking for certain assembler
2871    constructs.
2872
2873    On systems that use SDB, it is necessary to output certain commands; see
2874    `attasm.h'.
2875
2876    Defined in svr4.h.  */
2877
2878 /* #define ASM_FILE_START(STREAM) \
2879   output_file_directive ((STREAM), main_input_filename) */
2880
2881 /* A C expression which outputs to the stdio stream STREAM some appropriate
2882    text to go at the end of an assembler file.
2883
2884    If this macro is not defined, the default is to output nothing special at
2885    the end of the file.  Most systems don't require any definition.
2886
2887    On systems that use SDB, it is necessary to output certain commands; see
2888    `attasm.h'.
2889
2890    Defined in svr4.h.  */
2891 /* #define ASM_FILE_END(STREAM) */
2892
2893 /* A C string constant describing how to begin a comment in the target
2894    assembler language.  The compiler assumes that the comment will end at the
2895    end of the line.  */
2896 #define ASM_COMMENT_START ";"
2897
2898 /* A C string constant for text to be output before each `asm' statement or
2899    group of consecutive ones.  Normally this is `"#APP"', which is a comment
2900    that has no effect on most assemblers but tells the GNU assembler that it
2901    must check the lines that follow for all valid assembler constructs.  */
2902 #define ASM_APP_ON "#APP\n"
2903
2904 /* A C string constant for text to be output after each `asm' statement or
2905    group of consecutive ones.  Normally this is `"#NO_APP"', which tells the
2906    GNU assembler to resume making the time-saving assumptions that are valid
2907    for ordinary compiler output.  */
2908 #define ASM_APP_OFF "#NO_APP\n"
2909
2910 /* A C statement to output COFF information or DWARF debugging information
2911    which indicates that filename NAME is the current source file to the stdio
2912    stream STREAM.
2913
2914    This macro need not be defined if the standard form of output for the file
2915    format in use is appropriate.  */
2916 /* #define ASM_OUTPUT_SOURCE_FILENAME(STREAM, NAME) */
2917
2918 /* A C statement to output DBX or SDB debugging information before code for
2919    line number LINE of the current source file to the stdio stream STREAM.
2920
2921    This macro need not be defined if the standard form of debugging information
2922    for the debugger in use is appropriate.
2923
2924    Defined in svr4.h.  */
2925 /* #define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE) */
2926
2927 /* A C statement to output something to the assembler file to handle a `#ident'
2928    directive containing the text STRING.  If this macro is not defined, nothing
2929    is output for a `#ident' directive.
2930
2931    Defined in svr4.h.  */
2932 /* #define ASM_OUTPUT_IDENT(STREAM, STRING) */
2933
2934 /* A C statement to output any assembler statements which are required to
2935    precede any Objective C object definitions or message sending.  The
2936    statement is executed only when compiling an Objective C program.  */
2937 /* #define OBJC_PROLOGUE */
2938
2939 \f
2940 /* Output of Data.  */
2941
2942 /* A C statement to output to the stdio stream STREAM an assembler instruction
2943    to assemble a string constant containing the LEN bytes at PTR.  PTR will be
2944    a C expression of type `char *' and LEN a C expression of type `int'.
2945
2946    If the assembler has a `.ascii' pseudo-op as found in the Berkeley Unix
2947    assembler, do not define the macro `ASM_OUTPUT_ASCII'.
2948
2949    Defined in svr4.h.  */
2950 /* #define ASM_OUTPUT_ASCII(STREAM, PTR, LEN) */
2951
2952 /* You may define this macro as a C expression.  You should define the
2953    expression to have a non-zero value if GNU CC should output the
2954    constant pool for a function before the code for the function, or
2955    a zero value if GNU CC should output the constant pool after the
2956    function.  If you do not define this macro, the usual case, GNU CC
2957    will output the constant pool before the function.  */
2958 /* #define CONSTANT_POOL_BEFORE_FUNCTION */
2959
2960 /* A C statement to output assembler commands to define the start of the
2961    constant pool for a function.  FUNNAME is a string giving the name of the
2962    function.  Should the return type of the function be required, it can be
2963    obtained via FUNDECL.  SIZE is the size, in bytes, of the constant pool that
2964    will be written immediately after this call.
2965
2966    If no constant-pool prefix is required, the usual case, this macro need not
2967    be defined.  */
2968 /* #define ASM_OUTPUT_POOL_PROLOGUE(FILE FUNNAME FUNDECL SIZE) */
2969
2970 /* A C statement (with or without semicolon) to output a constant in the
2971    constant pool, if it needs special treatment.  (This macro need not do
2972    anything for RTL expressions that can be output normally.)
2973
2974    The argument FILE is the standard I/O stream to output the assembler code
2975    on.  X is the RTL expression for the constant to output, and MODE is the
2976    machine mode (in case X is a `const_int').  ALIGN is the required alignment
2977    for the value X; you should output an assembler directive to force this much
2978    alignment.
2979
2980    The argument LABELNO is a number to use in an internal label for the address
2981    of this pool entry.  The definition of this macro is responsible for
2982    outputting the label definition at the proper place.  Here is how to do
2983    this:
2984
2985         ASM_OUTPUT_INTERNAL_LABEL (FILE, "LC", LABELNO);
2986
2987    When you output a pool entry specially, you should end with a `goto' to the
2988    label JUMPTO.  This will prevent the same pool entry from being output a
2989    second time in the usual manner.
2990
2991    You need not define this macro if it would do nothing.  */
2992 /* #define ASM_OUTPUT_SPECIAL_POOL_ENTRY(FILE, X, MODE, ALIGN, LABELNO, JUMPTO) */
2993
2994 /* Define this macro as a C expression which is nonzero if the constant EXP, of
2995    type `tree', should be output after the code for a function.  The compiler
2996    will normally output all constants before the function; you need not define
2997    this macro if this is OK.  */
2998 /* #define CONSTANT_AFTER_FUNCTION_P(EXP) */
2999
3000 /* A C statement to output assembler commands to at the end of the constant
3001    pool for a function.  FUNNAME is a string giving the name of the function.
3002    Should the return type of the function be required, you can obtain it via
3003    FUNDECL.  SIZE is the size, in bytes, of the constant pool that GNU CC wrote
3004    immediately before this call.
3005
3006    If no constant-pool epilogue is required, the usual case, you need not
3007    define this macro.  */
3008 /* #define ASM_OUTPUT_POOL_EPILOGUE (FILE FUNNAME FUNDECL SIZE) */
3009
3010 /* Define this macro as a C expression which is nonzero if C is used as a
3011    logical line separator by the assembler.
3012
3013    If you do not define this macro, the default is that only the character `;'
3014    is treated as a logical line separator.  */
3015 /* #define IS_ASM_LOGICAL_LINE_SEPARATOR(C) */
3016
3017 /* These macros are provided by `real.h' for writing the definitions of
3018    `ASM_OUTPUT_DOUBLE' and the like: */
3019
3020 /* These translate X, of type `REAL_VALUE_TYPE', to the target's floating point
3021    representation, and store its bit pattern in the array of `long int' whose
3022    address is L.  The number of elements in the output array is determined by
3023    the size of the desired target floating point data type: 32 bits of it go in
3024    each `long int' array element.  Each array element holds 32 bits of the
3025    result, even if `long int' is wider than 32 bits on the host machine.
3026
3027    The array element values are designed so that you can print them out using
3028    `fprintf' in the order they should appear in the target machine's memory.  */
3029 /* #define REAL_VALUE_TO_TARGET_SINGLE(X, L) */
3030 /* #define REAL_VALUE_TO_TARGET_DOUBLE(X, L) */
3031 /* #define REAL_VALUE_TO_TARGET_LONG_DOUBLE(X, L) */
3032
3033 /* This macro converts X, of type `REAL_VALUE_TYPE', to a decimal number and
3034    stores it as a string into STRING.  You must pass, as STRING, the address of
3035    a long enough block of space to hold the result.
3036
3037    The argument FORMAT is a `printf'-specification that serves as a suggestion
3038    for how to format the output string.  */
3039 /* #define REAL_VALUE_TO_DECIMAL(X, FORMAT, STRING) */
3040
3041 \f
3042 /* Output of Uninitialized Variables.  */
3043
3044 /* A C statement (sans semicolon) to output to the stdio stream STREAM the
3045    assembler definition of a common-label named NAME whose size is SIZE bytes.
3046    The variable ROUNDED is the size rounded up to whatever alignment the caller
3047    wants.
3048
3049    Use the expression `assemble_name (STREAM, NAME)' to output the name itself;
3050    before and after that, output the additional assembler syntax for defining
3051    the name, and a newline.
3052
3053    This macro controls how the assembler definitions of uninitialized global
3054    variables are output.  */
3055 /* #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) */
3056
3057 /* Like `ASM_OUTPUT_COMMON' except takes the required alignment as a separate,
3058    explicit argument.  If you define this macro, it is used in place of
3059    `ASM_OUTPUT_COMMON', and gives you more flexibility in handling the required
3060    alignment of the variable.  The alignment is specified as the number of
3061    bits.
3062
3063    Defined in svr4.h.  */
3064 /* #define ASM_OUTPUT_ALIGNED_COMMON(STREAM, NAME, SIZE, ALIGNMENT) */
3065
3066 /* Like ASM_OUTPUT_ALIGNED_COMMON except that it takes an additional argument -
3067    the DECL of the variable to be output, if there is one.  This macro can be
3068    called with DECL == NULL_TREE.  If you define this macro, it is used in
3069    place of both ASM_OUTPUT_COMMON and ASM_OUTPUT_ALIGNED_COMMON, and gives you
3070    more flexibility in handling the destination of the variable.  */
3071 /* #define ASM_OUTPUT_DECL_COMMON (STREAM, DECL, NAME, SIZE, ALIGNMENT) */
3072
3073 /* If defined, it is similar to `ASM_OUTPUT_COMMON', except that it is used
3074    when NAME is shared.  If not defined, `ASM_OUTPUT_COMMON' will be used.  */
3075 /* #define ASM_OUTPUT_SHARED_COMMON(STREAM, NAME, SIZE, ROUNDED) */
3076
3077 /* A C statement (sans semicolon) to output to the stdio stream STREAM the
3078    assembler definition of uninitialized global DECL named NAME whose size is
3079    SIZE bytes.  The variable ROUNDED is the size rounded up to whatever
3080    alignment the caller wants.
3081
3082    Try to use function `asm_output_bss' defined in `varasm.c' when defining
3083    this macro.  If unable, use the expression `assemble_name (STREAM, NAME)' to
3084    output the name itself; before and after that, output the additional
3085    assembler syntax for defining the name, and a newline.
3086
3087    This macro controls how the assembler definitions of uninitialized global
3088    variables are output.  This macro exists to properly support languages like
3089    `c++' which do not have `common' data.  However, this macro currently is not
3090    defined for all targets.  If this macro and `ASM_OUTPUT_ALIGNED_BSS' are not
3091    defined then `ASM_OUTPUT_COMMON' or `ASM_OUTPUT_ALIGNED_COMMON' or
3092    `ASM_OUTPUT_DECL_COMMON' is used.  */
3093 /* #define ASM_OUTPUT_BSS(STREAM, DECL, NAME, SIZE, ROUNDED) */
3094
3095 /* Like `ASM_OUTPUT_BSS' except takes the required alignment as a separate,
3096    explicit argument.  If you define this macro, it is used in place of
3097    `ASM_OUTPUT_BSS', and gives you more flexibility in handling the required
3098    alignment of the variable.  The alignment is specified as the number of
3099    bits.
3100
3101    Try to use function `asm_output_aligned_bss' defined in file `varasm.c' when
3102    defining this macro.  */
3103 /* #define ASM_OUTPUT_ALIGNED_BSS(STREAM, DECL, NAME, SIZE, ALIGNMENT) */
3104
3105 /* If defined, it is similar to `ASM_OUTPUT_BSS', except that it is used when
3106    NAME is shared.  If not defined, `ASM_OUTPUT_BSS' will be used.  */
3107 /* #define ASM_OUTPUT_SHARED_BSS(STREAM, DECL, NAME, SIZE, ROUNDED) */
3108
3109 /* A C statement (sans semicolon) to output to the stdio stream STREAM the
3110    assembler definition of a local-common-label named NAME whose size is SIZE
3111    bytes.  The variable ROUNDED is the size rounded up to whatever alignment
3112    the caller wants.
3113
3114    Use the expression `assemble_name (STREAM, NAME)' to output the name itself;
3115    before and after that, output the additional assembler syntax for defining
3116    the name, and a newline.
3117
3118    This macro controls how the assembler definitions of uninitialized static
3119    variables are output.  */
3120 /* #define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE, ROUNDED) */
3121
3122 /* Like `ASM_OUTPUT_LOCAL' except takes the required alignment as a separate,
3123    explicit argument.  If you define this macro, it is used in place of
3124    `ASM_OUTPUT_LOCAL', and gives you more flexibility in handling the required
3125    alignment of the variable.  The alignment is specified as the number of
3126    bits.
3127
3128    Defined in svr4.h.  */
3129 /* #define ASM_OUTPUT_ALIGNED_LOCAL(STREAM, NAME, SIZE, ALIGNMENT) */
3130
3131 /* Like `ASM_OUTPUT_ALIGNED_LOCAL' except that it takes an additional
3132    parameter - the DECL of variable to be output, if there is one.
3133    This macro can be called with DECL == NULL_TREE.  If you define
3134    this macro, it is used in place of `ASM_OUTPUT_LOCAL' and
3135    `ASM_OUTPUT_ALIGNED_LOCAL', and gives you more flexibility in
3136    handling the destination of the variable.  */
3137 /* #define ASM_OUTPUT_DECL_LOCAL(STREAM, DECL, NAME, SIZE, ALIGNMENT) */
3138
3139 /* If defined, it is similar to `ASM_OUTPUT_LOCAL', except that it is used when
3140    NAME is shared.  If not defined, `ASM_OUTPUT_LOCAL' will be used.  */
3141 /* #define ASM_OUTPUT_SHARED_LOCAL (STREAM, NAME, SIZE, ROUNDED) */
3142
3143 \f
3144 /* Output and Generation of Labels.  */
3145
3146 /* A C statement (sans semicolon) to output to the stdio stream STREAM the
3147    assembler definition of a label named NAME.  Use the expression
3148    `assemble_name (STREAM, NAME)' to output the name itself; before and after
3149    that, output the additional assembler syntax for defining the name, and a
3150    newline.  */
3151
3152 #define ASM_OUTPUT_LABEL(STREAM, NAME)                                  \
3153 do {                                                                    \
3154   assemble_name (STREAM, NAME);                                         \
3155   fputs (":\n", STREAM);                                                \
3156 } while (0)
3157
3158 /* A C statement (sans semicolon) to output to the stdio stream STREAM any text
3159    necessary for declaring the name NAME of a function which is being defined.
3160    This macro is responsible for outputting the label definition (perhaps using
3161    `ASM_OUTPUT_LABEL').  The argument DECL is the `FUNCTION_DECL' tree node
3162    representing the function.
3163
3164    If this macro is not defined, then the function name is defined in the usual
3165    manner as a label (by means of `ASM_OUTPUT_LABEL').
3166
3167    Defined in svr4.h.  */
3168 /* #define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) */
3169
3170 /* A C statement (sans semicolon) to output to the stdio stream STREAM any text
3171    necessary for declaring the size of a function which is being defined.  The
3172    argument NAME is the name of the function.  The argument DECL is the
3173    `FUNCTION_DECL' tree node representing the function.
3174
3175    If this macro is not defined, then the function size is not defined.
3176
3177    Defined in svr4.h.  */
3178 /* #define ASM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL) */
3179
3180 /* A C statement (sans semicolon) to output to the stdio stream STREAM any text
3181    necessary for declaring the name NAME of an initialized variable which is
3182    being defined.  This macro must output the label definition (perhaps using
3183    `ASM_OUTPUT_LABEL').  The argument DECL is the `VAR_DECL' tree node
3184    representing the variable.
3185
3186    If this macro is not defined, then the variable name is defined in the usual
3187    manner as a label (by means of `ASM_OUTPUT_LABEL').
3188
3189    Defined in svr4.h.  */
3190 /* #define ASM_DECLARE_OBJECT_NAME(STREAM, NAME, DECL) */
3191
3192 /* A C statement (sans semicolon) to finish up declaring a variable name once
3193    the compiler has processed its initializer fully and thus has had a chance
3194    to determine the size of an array when controlled by an initializer.  This
3195    is used on systems where it's necessary to declare something about the size
3196    of the object.
3197
3198    If you don't define this macro, that is equivalent to defining it to do
3199    nothing.
3200
3201    Defined in svr4.h.  */
3202 /* #define ASM_FINISH_DECLARE_OBJECT(STREAM, DECL, TOPLEVEL, ATEND) */
3203
3204 /* A C statement (sans semicolon) to output to the stdio stream STREAM some
3205    commands that will make the label NAME global; that is, available for
3206    reference from other files.  Use the expression `assemble_name (STREAM,
3207    NAME)' to output the name itself; before and after that, output the
3208    additional assembler syntax for making that name global, and a newline.  */
3209
3210 #define ASM_GLOBALIZE_LABEL(STREAM,NAME)                                \
3211 do {                                                                    \
3212   fputs ("\t.globl ", STREAM);                                          \
3213   assemble_name (STREAM, NAME);                                         \
3214   fputs ("\n", STREAM);                                                 \
3215 } while (0)
3216
3217 /* A C statement (sans semicolon) to output to the stdio stream STREAM some
3218    commands that will make the label NAME weak; that is, available for
3219    reference from other files but only used if no other definition is
3220    available.  Use the expression `assemble_name (STREAM, NAME)' to output the
3221    name itself; before and after that, output the additional assembler syntax
3222    for making that name weak, and a newline.
3223
3224    If you don't define this macro, GNU CC will not support weak symbols and you
3225    should not define the `SUPPORTS_WEAK' macro.
3226
3227    Defined in svr4.h.  */
3228 /* #define ASM_WEAKEN_LABEL */
3229
3230 /* A C expression which evaluates to true if the target supports weak symbols.
3231
3232    If you don't define this macro, `defaults.h' provides a default definition.
3233    If `ASM_WEAKEN_LABEL' is defined, the default definition is `1'; otherwise,
3234    it is `0'.  Define this macro if you want to control weak symbol support
3235    with a compiler flag such as `-melf'.  */
3236 /* #define SUPPORTS_WEAK */
3237
3238 /* A C statement (sans semicolon) to mark DECL to be emitted as a
3239    public symbol such that extra copies in multiple translation units
3240    will be discarded by the linker.  Define this macro if your object
3241    file format provides support for this concept, such as the `COMDAT'
3242    section flags in the Microsoft Windows PE/COFF format, and this
3243    support requires changes to DECL, such as putting it in a separate
3244    section.
3245
3246    Defined in svr4.h.  */
3247 /* #define MAKE_DECL_ONE_ONLY */
3248
3249 /* A C expression which evaluates to true if the target supports one-only
3250    semantics.
3251
3252    If you don't define this macro, `varasm.c' provides a default definition.
3253    If `MAKE_DECL_ONE_ONLY' is defined, the default definition is `1';
3254    otherwise, it is `0'.  Define this macro if you want to control one-only
3255    symbol support with a compiler flag, or if setting the `DECL_ONE_ONLY' flag
3256    is enough to mark a declaration to be emitted as one-only.  */
3257 /* #define SUPPORTS_ONE_ONLY */
3258
3259 /* A C statement (sans semicolon) to output to the stdio stream STREAM any text
3260    necessary for declaring the name of an external symbol named NAME which is
3261    referenced in this compilation but not defined.  The value of DECL is the
3262    tree node for the declaration.
3263
3264    This macro need not be defined if it does not need to output anything.  The
3265    GNU assembler and most Unix assemblers don't require anything.  */
3266 /* #define ASM_OUTPUT_EXTERNAL(STREAM, DECL, NAME) */
3267
3268 /* A C statement (sans semicolon) to output on STREAM an assembler pseudo-op to
3269    declare a library function name external.  The name of the library function
3270    is given by SYMREF, which has type `rtx' and is a `symbol_ref'.
3271
3272    This macro need not be defined if it does not need to output anything.  The
3273    GNU assembler and most Unix assemblers don't require anything.
3274
3275    Defined in svr4.h.  */
3276 /* #define ASM_OUTPUT_EXTERNAL_LIBCALL(STREAM, SYMREF) */
3277
3278 /* A C statement (sans semicolon) to output to the stdio stream STREAM a
3279    reference in assembler syntax to a label named NAME.  This should add `_' to
3280    the front of the name, if that is customary on your operating system, as it
3281    is in most Berkeley Unix systems.  This macro is used in `assemble_name'.  */
3282 /* #define ASM_OUTPUT_LABELREF(STREAM, NAME) */
3283
3284 /* A C statement to output to the stdio stream STREAM a label whose name is
3285    made from the string PREFIX and the number NUM.
3286
3287    It is absolutely essential that these labels be distinct from the labels
3288    used for user-level functions and variables.  Otherwise, certain programs
3289    will have name conflicts with internal labels.
3290
3291    It is desirable to exclude internal labels from the symbol table of the
3292    object file.  Most assemblers have a naming convention for labels that
3293    should be excluded; on many systems, the letter `L' at the beginning of a
3294    label has this effect.  You should find out what convention your system
3295    uses, and follow it.
3296
3297    The usual definition of this macro is as follows:
3298
3299         fprintf (STREAM, "L%s%d:\n", PREFIX, NUM)
3300
3301    Defined in svr4.h.  */
3302 /* #define ASM_OUTPUT_INTERNAL_LABEL(STREAM, PREFIX, NUM) */
3303
3304 /* A C statement to store into the string STRING a label whose name is made
3305    from the string PREFIX and the number NUM.
3306
3307    This string, when output subsequently by `assemble_name', should produce the
3308    output that `ASM_OUTPUT_INTERNAL_LABEL' would produce with the same PREFIX
3309    and NUM.
3310
3311    If the string begins with `*', then `assemble_name' will output the rest of
3312    the string unchanged.  It is often convenient for
3313    `ASM_GENERATE_INTERNAL_LABEL' to use `*' in this way.  If the string doesn't
3314    start with `*', then `ASM_OUTPUT_LABELREF' gets to output the string, and
3315    may change it.  (Of course, `ASM_OUTPUT_LABELREF' is also part of your
3316    machine description, so you should know what it does on your machine.)
3317
3318    Defined in svr4.h.  */
3319
3320 /*
3321 #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM)                 \
3322 do {                                                                    \
3323   sprintf (LABEL, "*.%s%d", PREFIX, NUM);                               \
3324 } while (0)
3325 */
3326
3327 /* A C expression to assign to OUTVAR (which is a variable of type `char *') a
3328    newly allocated string made from the string NAME and the number NUMBER, with
3329    some suitable punctuation added.  Use `alloca' to get space for the string.
3330
3331    The string will be used as an argument to `ASM_OUTPUT_LABELREF' to produce
3332    an assembler label for an internal static variable whose name is NAME.
3333    Therefore, the string must be such as to result in valid assembler code.
3334    The argument NUMBER is different each time this macro is executed; it
3335    prevents conflicts between similarly-named internal static variables in
3336    different scopes.
3337
3338    Ideally this string should not be a valid C identifier, to prevent any
3339    conflict with the user's own symbols.  Most assemblers allow periods or
3340    percent signs in assembler symbols; putting at least one of these between
3341    the name and the number will suffice.  */
3342
3343 #define ASM_FORMAT_PRIVATE_NAME(OUTVAR, NAME, NUMBER)                   \
3344 do {                                                                    \
3345   (OUTVAR) = (char *) alloca (strlen ((NAME)) + 12);                    \
3346   sprintf ((OUTVAR), "%s.%ld", (NAME), (long)(NUMBER));                 \
3347 } while (0)
3348
3349 /* A C statement to output to the stdio stream STREAM assembler code which
3350    defines (equates) the symbol NAME to have the value VALUE.
3351
3352    If SET_ASM_OP is defined, a default definition is provided which is correct
3353    for most systems.
3354
3355    Defined in svr4.h.  */
3356 /* #define ASM_OUTPUT_DEF(STREAM, NAME, VALUE) */
3357
3358 /* A C statement to output to the stdio stream STREAM assembler code which
3359    defines (equates) the weak symbol NAME to have the value VALUE.
3360
3361    Define this macro if the target only supports weak aliases; define
3362    ASM_OUTPUT_DEF instead if possible.  */
3363 /* #define ASM_OUTPUT_WEAK_ALIAS (STREAM, NAME, VALUE) */
3364
3365 /* Define this macro to override the default assembler names used for Objective
3366    C methods.
3367
3368    The default name is a unique method number followed by the name of the class
3369    (e.g. `_1_Foo').  For methods in categories, the name of the category is
3370    also included in the assembler name (e.g.  `_1_Foo_Bar').
3371
3372    These names are safe on most systems, but make debugging difficult since the
3373    method's selector is not present in the name.  Therefore, particular systems
3374    define other ways of computing names.
3375
3376    BUF is an expression of type `char *' which gives you a buffer in which to
3377    store the name; its length is as long as CLASS_NAME, CAT_NAME and SEL_NAME
3378    put together, plus 50 characters extra.
3379
3380    The argument IS_INST specifies whether the method is an instance method or a
3381    class method; CLASS_NAME is the name of the class; CAT_NAME is the name of
3382    the category (or NULL if the method is not in a category); and SEL_NAME is
3383    the name of the selector.
3384
3385    On systems where the assembler can handle quoted names, you can use this
3386    macro to provide more human-readable names.  */
3387 /* #define OBJC_GEN_METHOD_LABEL(BUF, IS_INST, CLASS_NAME, CAT_NAME, SEL_NAME) */
3388
3389 \f
3390 /* Macros Controlling Initialization Routines.  */
3391
3392 /* If defined, a C string constant for the assembler operation to identify the
3393    following data as initialization code.  If not defined, GNU CC will assume
3394    such a section does not exist.  When you are using special sections for
3395    initialization and termination functions, this macro also controls how
3396    `crtstuff.c' and `libgcc2.c' arrange to run the initialization functions.
3397
3398    Defined in svr4.h.  */
3399 /* #define INIT_SECTION_ASM_OP */
3400 #undef INIT_SECTION_ASM_OP
3401
3402 /* If defined, `main' will not call `__main' as described above.  This macro
3403    should be defined for systems that control the contents of the init section
3404    on a symbol-by-symbol basis, such as OSF/1, and should not be defined
3405    explicitly for systems that support `INIT_SECTION_ASM_OP'.  */
3406 /* #define HAS_INIT_SECTION */
3407
3408 /* If defined, a C string constant for a switch that tells the linker that the
3409    following symbol is an initialization routine.  */
3410 /* #define LD_INIT_SWITCH */
3411
3412 /* If defined, a C string constant for a switch that tells the linker that the
3413    following symbol is a finalization routine.  */
3414 /* #define LD_FINI_SWITCH */
3415
3416 /* If defined, `main' will call `__main' despite the presence of
3417    `INIT_SECTION_ASM_OP'.  This macro should be defined for systems where the
3418    init section is not actually run automatically, but is still useful for
3419    collecting the lists of constructors and destructors.  */
3420 #define INVOKE__main
3421
3422 /* If your system uses `collect2' as the means of processing constructors, then
3423    that program normally uses `nm' to scan an object file for constructor
3424    functions to be called.  On certain kinds of systems, you can define these
3425    macros to make `collect2' work faster (and, in some cases, make it work at
3426    all): */
3427
3428 /* Define this macro if the system uses COFF (Common Object File Format) object
3429    files, so that `collect2' can assume this format and scan object files
3430    directly for dynamic constructor/destructor functions.  */
3431 /* #define OBJECT_FORMAT_COFF */
3432
3433 /* Define this macro if the system uses ROSE format object files, so that
3434    `collect2' can assume this format and scan object files directly for dynamic
3435    constructor/destructor functions.
3436
3437    These macros are effective only in a native compiler; `collect2' as
3438    part of a cross compiler always uses `nm' for the target machine.  */
3439 /* #define OBJECT_FORMAT_ROSE */
3440
3441 /* Define this macro if the system uses ELF format object files.
3442
3443    Defined in svr4.h.  */
3444 /* #define OBJECT_FORMAT_ELF */
3445
3446 /* Define this macro as a C string constant containing the file name to use to
3447    execute `nm'.  The default is to search the path normally for `nm'.
3448
3449    If your system supports shared libraries and has a program to list the
3450    dynamic dependencies of a given library or executable, you can define these
3451    macros to enable support for running initialization and termination
3452    functions in shared libraries: */
3453 /* #define REAL_NM_FILE_NAME */
3454
3455 /* Define this macro to a C string constant containing the name of the program
3456    which lists dynamic dependencies, like `"ldd"' under SunOS 4.  */
3457 /* #define LDD_SUFFIX */
3458
3459 /* Define this macro to be C code that extracts filenames from the output of
3460    the program denoted by `LDD_SUFFIX'.  PTR is a variable of type `char *'
3461    that points to the beginning of a line of output from `LDD_SUFFIX'.  If the
3462    line lists a dynamic dependency, the code must advance PTR to the beginning
3463    of the filename on that line.  Otherwise, it must set PTR to `NULL'.  */
3464 /* #define PARSE_LDD_OUTPUT (PTR) */
3465
3466 \f
3467 /* Output of Assembler Instructions.  */
3468
3469 /* A C initializer containing the assembler's names for the machine registers,
3470    each one as a C string constant.  This is what translates register numbers
3471    in the compiler into assembler language.  */
3472 #define REGISTER_NAMES                                                  \
3473 {                                                                       \
3474   "r0",         "r1",           "r2",           "r3",                   \
3475   "r4",         "r5",           "r6",           "r7",                   \
3476   "r8",         "r9",           "r10",          "r11",                  \
3477   "r12",        "r13",          "r14",          "r15",                  \
3478   "r16",        "r17",          "r18",          "r19",                  \
3479   "r20",        "r21",          "r22",          "r23",                  \
3480   "r24",        "r25",          "r26",          "r27",                  \
3481   "r28",        "r29",          "r30",          "r31",                  \
3482   "r32",        "r33",          "r34",          "r35",                  \
3483   "r36",        "r37",          "r38",          "r39",                  \
3484   "r40",        "r41",          "r42",          "r43",                  \
3485   "r44",        "r45",          "r46",          "r47",                  \
3486   "r48",        "r49",          "r50",          "r51",                  \
3487   "r52",        "r53",          "r54",          "r55",                  \
3488   "r56",        "r57",          "r58",          "r59",                  \
3489   "r60",        "r61",          "link",         "sp",                   \
3490   "ap",                                                                 \
3491   "f0",         "f1",           "f2",           "f3",                   \
3492   "s",          "v",            "va",           "c",                    \
3493   "a0",         "a1",                                                   \
3494   "psw",        "bpsw",         "pc",           "bpc",                  \
3495   "dpsw",       "dpc",          "rpt_c",        "rpt_s",                \
3496   "rpt_e",      "mod_s",        "mod_e",        "iba",                  \
3497   "eit_vb",     "int_s",        "int_m",                                \
3498 }
3499
3500 /* If defined, a C initializer for an array of structures containing a name and
3501    a register number.  This macro defines additional names for hard registers,
3502    thus allowing the `asm' option in declarations to refer to registers using
3503    alternate names.  */
3504 #define ADDITIONAL_REGISTER_NAMES               \
3505 {                                               \
3506   {"r62",       GPR_LINK},                      \
3507   {"r63",       GPR_SP},                        \
3508   {"f4",        FLAG_SAT},                      \
3509   {"f5",        FLAG_OVERFLOW},                 \
3510   {"f6",        FLAG_ACC_OVER},                 \
3511   {"f7",        FLAG_CARRY},                    \
3512   {"carry",     FLAG_CARRY},                    \
3513   {"borrow",    FLAG_BORROW},                   \
3514   {"b",         FLAG_BORROW},                   \
3515   {"cr0",       CR_PSW},                        \
3516   {"cr1",       CR_BPSW},                       \
3517   {"cr2",       CR_PC},                         \
3518   {"cr3",       CR_BPC},                        \
3519   {"cr4",       CR_DPSW},                       \
3520   {"cr5",       CR_DPC},                        \
3521   {"cr7",       CR_RPT_C},                      \
3522   {"cr8",       CR_RPT_S},                      \
3523   {"cr9",       CR_RPT_E},                      \
3524   {"cr10",      CR_MOD_S},                      \
3525   {"cr11",      CR_MOD_E},                      \
3526   {"cr14",      CR_IBA},                        \
3527   {"cr15",      CR_EIT_VB},                     \
3528   {"cr16",      CR_INT_S},                      \
3529   {"cr17",      CR_INT_M}                       \
3530 }
3531
3532 /* Define this macro if you are using an unusual assembler that requires
3533    different names for the machine instructions.
3534
3535    The definition is a C statement or statements which output an assembler
3536    instruction opcode to the stdio stream STREAM.  The macro-operand PTR is a
3537    variable of type `char *' which points to the opcode name in its "internal"
3538    form--the form that is written in the machine description.  The definition
3539    should output the opcode name to STREAM, performing any translation you
3540    desire, and increment the variable PTR to point at the end of the opcode so
3541    that it will not be output twice.
3542
3543    In fact, your macro definition may process less than the entire opcode name,
3544    or more than the opcode name; but if you want to process text that includes
3545    `%'-sequences to substitute operands, you must take care of the substitution
3546    yourself.  Just be sure to increment PTR over whatever text should not be
3547    output normally.
3548
3549    If you need to look at the operand values, they can be found as the elements
3550    of `recog_data.operand'.
3551
3552    If the macro definition does nothing, the instruction is output in the usual
3553    way.  */
3554 /* #define ASM_OUTPUT_OPCODE(STREAM, PTR) */
3555
3556 /* If defined, a C statement to be executed just prior to the output of
3557    assembler code for INSN, to modify the extracted operands so they will be
3558    output differently.
3559
3560    Here the argument OPVEC is the vector containing the operands extracted from
3561    INSN, and NOPERANDS is the number of elements of the vector which contain
3562    meaningful data for this insn.  The contents of this vector are what will be
3563    used to convert the insn template into assembler code, so you can change the
3564    assembler output by changing the contents of the vector.
3565
3566    This macro is useful when various assembler syntaxes share a single file of
3567    instruction patterns; by defining this macro differently, you can cause a
3568    large class of instructions to be output differently (such as with
3569    rearranged operands).  Naturally, variations in assembler syntax affecting
3570    individual insn patterns ought to be handled by writing conditional output
3571    routines in those patterns.
3572
3573    If this macro is not defined, it is equivalent to a null statement.  */
3574 /* #define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS) */
3575
3576 /* If defined, `FINAL_PRESCAN_INSN' will be called on each
3577    `CODE_LABEL'.  In that case, OPVEC will be a null pointer and
3578    NOPERANDS will be zero.  */
3579 /* #define FINAL_PRESCAN_LABEL */
3580
3581 /* A C compound statement to output to stdio stream STREAM the assembler syntax
3582    for an instruction operand X.  X is an RTL expression.
3583
3584    CODE is a value that can be used to specify one of several ways of printing
3585    the operand.  It is used when identical operands must be printed differently
3586    depending on the context.  CODE comes from the `%' specification that was
3587    used to request printing of the operand.  If the specification was just
3588    `%DIGIT' then CODE is 0; if the specification was `%LTR DIGIT' then CODE is
3589    the ASCII code for LTR.
3590
3591    If X is a register, this macro should print the register's name.  The names
3592    can be found in an array `reg_names' whose type is `char *[]'.  `reg_names'
3593    is initialized from `REGISTER_NAMES'.
3594
3595    When the machine description has a specification `%PUNCT' (a `%' followed by
3596    a punctuation character), this macro is called with a null pointer for X and
3597    the punctuation character for CODE.
3598
3599    Standard operand flags that are handled elsewhere:
3600         `='  Output a number unique to each instruction in the compilation.
3601         `a'  Substitute an operand as if it were a memory reference.
3602         `c'  Omit the syntax that indicates an immediate operand.
3603         `l'  Substitute a LABEL_REF into a jump instruction.
3604         `n'  Like %cDIGIT, except negate the value before printing.
3605
3606    The d30v specific operand flags are:
3607         `.'  Print r0.
3608         `f'  Print a SF constant as an int.
3609         `s'  Subtract 32 and negate.
3610         `A'  Print accumulator number without an `a' in front of it.
3611         `B'  Print bit offset for BSET, etc. instructions.
3612         `E'  Print u if this is zero extend, nothing if this is sign extend.
3613         `F'  Emit /{f,t,x}{f,t,x} for executing a false condition.
3614         `L'  Print the lower half of a 64 bit item.
3615         `M'  Print a memory reference for ld/st instructions.
3616         `R'  Return appropriate cmp instruction for relational test.
3617         `S'  Subtract 32.
3618         `T'  Emit /{f,t,x}{f,t,x} for executing a true condition.
3619         `U'  Print the upper half of a 64 bit item.  */
3620
3621 #define PRINT_OPERAND(STREAM, X, CODE) d30v_print_operand (STREAM, X, CODE)
3622
3623 /* A C expression which evaluates to true if CODE is a valid punctuation
3624    character for use in the `PRINT_OPERAND' macro.  If
3625    `PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no punctuation
3626    characters (except for the standard one, `%') are used in this way.  */
3627
3628 #define PRINT_OPERAND_PUNCT_VALID_P(CODE) ((CODE) == '.' || (CODE) == ':')
3629
3630 /* A C compound statement to output to stdio stream STREAM the assembler syntax
3631    for an instruction operand that is a memory reference whose address is X.  X
3632    is an RTL expression.
3633
3634    On some machines, the syntax for a symbolic address depends on the section
3635    that the address refers to.  On these machines, define the macro
3636    `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and
3637    then check for it here.  *Note Assembler Format::.  */
3638
3639 #define PRINT_OPERAND_ADDRESS(STREAM, X) d30v_print_operand_address (STREAM, X)
3640
3641 /* A C statement, to be executed after all slot-filler instructions have been
3642    output.  If necessary, call `dbr_sequence_length' to determine the number of
3643    slots filled in a sequence (zero if not currently outputting a sequence), to
3644    decide how many no-ops to output, or whatever.
3645
3646    Don't define this macro if it has nothing to do, but it is helpful in
3647    reading assembly output if the extent of the delay sequence is made explicit
3648    (e.g. with white space).
3649
3650    Note that output routines for instructions with delay slots must be prepared
3651    to deal with not being output as part of a sequence (i.e.  when the
3652    scheduling pass is not run, or when no slot fillers could be found.)  The
3653    variable `final_sequence' is null when not processing a sequence, otherwise
3654    it contains the `sequence' rtx being output.  */
3655 /* #define DBR_OUTPUT_SEQEND(FILE) */
3656
3657 /* If defined, C string expressions to be used for the `%R', `%L', `%U', and
3658    `%I' options of `asm_fprintf' (see `final.c').  These are useful when a
3659    single `md' file must support multiple assembler formats.  In that case, the
3660    various `tm.h' files can define these macros differently.
3661
3662    USER_LABEL_PREFIX is defined in svr4.h.  */
3663
3664 #define REGISTER_PREFIX "%"
3665 #define LOCAL_LABEL_PREFIX "."
3666 #define USER_LABEL_PREFIX ""
3667 #define IMMEDIATE_PREFIX ""
3668
3669 /* If your target supports multiple dialects of assembler language (such as
3670    different opcodes), define this macro as a C expression that gives the
3671    numeric index of the assembler language dialect to use, with zero as the
3672    first variant.
3673
3674    If this macro is defined, you may use `{option0|option1|option2...}'
3675    constructs in the output templates of patterns (*note Output Template::.) or
3676    in the first argument of `asm_fprintf'.  This construct outputs `option0',
3677    `option1' or `option2', etc., if the value of `ASSEMBLER_DIALECT' is zero,
3678    one or two, etc.  Any special characters within these strings retain their
3679    usual meaning.
3680
3681    If you do not define this macro, the characters `{', `|' and `}' do not have
3682    any special meaning when used in templates or operands to `asm_fprintf'.
3683
3684    Define the macros `REGISTER_PREFIX', `LOCAL_LABEL_PREFIX',
3685    `USER_LABEL_PREFIX' and `IMMEDIATE_PREFIX' if you can express the variations
3686    in assemble language syntax with that mechanism.  Define `ASSEMBLER_DIALECT'
3687    and use the `{option0|option1}' syntax if the syntax variant are larger and
3688    involve such things as different opcodes or operand order.  */
3689 /* #define ASSEMBLER_DIALECT */
3690
3691 /* A C expression to output to STREAM some assembler code which will push hard
3692    register number REGNO onto the stack.  The code need not be optimal, since
3693    this macro is used only when profiling.  */
3694 /* #define ASM_OUTPUT_REG_PUSH (STREAM, REGNO) */
3695
3696 /* A C expression to output to STREAM some assembler code which will pop hard
3697    register number REGNO off of the stack.  The code need not be optimal, since
3698    this macro is used only when profiling.  */
3699 /* #define ASM_OUTPUT_REG_POP (STREAM, REGNO) */
3700
3701 \f
3702 /* Output of dispatch tables.  */
3703
3704 /* This macro should be provided on machines where the addresses in a dispatch
3705    table are relative to the table's own address.
3706
3707    The definition should be a C statement to output to the stdio stream STREAM
3708    an assembler pseudo-instruction to generate a difference between two labels.
3709    VALUE and REL are the numbers of two internal labels.  The definitions of
3710    these labels are output using `ASM_OUTPUT_INTERNAL_LABEL', and they must be
3711    printed in the same way here.  For example,
3712
3713         fprintf (STREAM, "\t.word L%d-L%d\n", VALUE, REL)  */
3714
3715 #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \
3716 fprintf (STREAM, "\t.word .L%d-.L%d\n", VALUE, REL)
3717
3718 /* This macro should be provided on machines where the addresses in a dispatch
3719    table are absolute.
3720
3721    The definition should be a C statement to output to the stdio stream STREAM
3722    an assembler pseudo-instruction to generate a reference to a label.  VALUE
3723    is the number of an internal label whose definition is output using
3724    `ASM_OUTPUT_INTERNAL_LABEL'.  For example,
3725
3726         fprintf (STREAM, "\t.word L%d\n", VALUE)  */
3727
3728 #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \
3729 fprintf (STREAM, "\t.word .L%d\n", VALUE)
3730
3731 /* Define this if the label before a jump-table needs to be output specially.
3732    The first three arguments are the same as for `ASM_OUTPUT_INTERNAL_LABEL';
3733    the fourth argument is the jump-table which follows (a `jump_insn'
3734    containing an `addr_vec' or `addr_diff_vec').
3735
3736    This feature is used on system V to output a `swbeg' statement for the
3737    table.
3738
3739    If this macro is not defined, these labels are output with
3740    `ASM_OUTPUT_INTERNAL_LABEL'.
3741
3742    Defined in svr4.h.  */
3743 /* #define ASM_OUTPUT_CASE_LABEL(STREAM, PREFIX, NUM, TABLE) */
3744
3745 /* Define this if something special must be output at the end of a jump-table.
3746    The definition should be a C statement to be executed after the assembler
3747    code for the table is written.  It should write the appropriate code to
3748    stdio stream STREAM.  The argument TABLE is the jump-table insn, and NUM is
3749    the label-number of the preceding label.
3750
3751    If this macro is not defined, nothing special is output at the end of the
3752    jump-table.  */
3753 /* #define ASM_OUTPUT_CASE_END(STREAM, NUM, TABLE) */
3754
3755 \f
3756 /* Assembler Commands for Exception Regions.  */
3757
3758 /* An rtx used to mask the return address found via RETURN_ADDR_RTX, so that it
3759    does not contain any extraneous set bits in it.  */
3760 /* #define MASK_RETURN_ADDR */
3761
3762 /* Define this macro to 0 if your target supports DWARF 2 frame unwind
3763    information, but it does not yet work with exception handling.  Otherwise,
3764    if your target supports this information (if it defines
3765    `INCOMING_RETURN_ADDR_RTX'), GCC will provide a default definition of 1.
3766
3767    If this macro is defined to 1, the DWARF 2 unwinder will be the default
3768    exception handling mechanism; otherwise, setjmp/longjmp will be used by
3769    default.
3770
3771    If this macro is defined to anything, the DWARF 2 unwinder will be used
3772    instead of inline unwinders and __unwind_function in the non-setjmp case.  */
3773 /* #define DWARF2_UNWIND_INFO */
3774
3775 \f
3776 /* Assembler Commands for Alignment.  */
3777
3778 /* The alignment (log base 2) to put in front of LABEL, which follows
3779    a BARRIER.
3780
3781    This macro need not be defined if you don't want any special alignment to be
3782    done at such a time.  Most machine descriptions do not currently define the
3783    macro.  */
3784 /* #define LABEL_ALIGN_AFTER_BARRIER(LABEL) */
3785
3786 /* The desired alignment for the location counter at the beginning
3787    of a loop.
3788
3789    This macro need not be defined if you don't want any special alignment to be
3790    done at such a time.  Most machine descriptions do not currently define the
3791    macro.  */
3792 /* #define LOOP_ALIGN(LABEL) */
3793
3794 /* A C statement to output to the stdio stream STREAM an assembler instruction
3795    to advance the location counter by NBYTES bytes.  Those bytes should be zero
3796    when loaded.  NBYTES will be a C expression of type `int'.
3797
3798    Defined in svr4.h.  */
3799 /* #define ASM_OUTPUT_SKIP(STREAM, NBYTES) \
3800   fprintf (STREAM, "\t.zero\t%u\n", (NBYTES)) */
3801
3802 /* Define this macro if `ASM_OUTPUT_SKIP' should not be used in the text
3803    section because it fails put zeros in the bytes that are skipped.  This is
3804    true on many Unix systems, where the pseudo-op to skip bytes produces no-op
3805    instructions rather than zeros when used in the text section.  */
3806 /* #define ASM_NO_SKIP_IN_TEXT */
3807
3808 /* A C statement to output to the stdio stream STREAM an assembler command to
3809    advance the location counter to a multiple of 2 to the POWER bytes.  POWER
3810    will be a C expression of type `int'.  */
3811 #define ASM_OUTPUT_ALIGN(STREAM, POWER) \
3812   fprintf ((STREAM), "\t.p2align %d\n", (POWER))
3813
3814 \f
3815 /* Macros Affecting all Debug Formats.  */
3816
3817 /* A C expression that returns the DBX register number for the compiler
3818    register number REGNO.  In simple cases, the value of this expression may be
3819    REGNO itself.  But sometimes there are some registers that the compiler
3820    knows about and DBX does not, or vice versa.  In such cases, some register
3821    may need to have one number in the compiler and another for DBX.
3822
3823    If two registers have consecutive numbers inside GNU CC, and they can be
3824    used as a pair to hold a multiword value, then they *must* have consecutive
3825    numbers after renumbering with `DBX_REGISTER_NUMBER'.  Otherwise, debuggers
3826    will be unable to access such a pair, because they expect register pairs to
3827    be consecutive in their own numbering scheme.
3828
3829    If you find yourself defining `DBX_REGISTER_NUMBER' in way that does not
3830    preserve register pairs, then what you must do instead is redefine the
3831    actual register numbering scheme.  */
3832 #define DBX_REGISTER_NUMBER(REGNO)                                      \
3833 (GPR_P (REGNO)                   ? ((REGNO) - GPR_FIRST)                \
3834  : ACCUM_P (REGNO)               ? ((REGNO) - ACCUM_FIRST + 84)         \
3835  : FLAG_P (REGNO)                ? 66 /* return psw for all flags */    \
3836  : (REGNO) == ARG_POINTER_REGNUM ? (GPR_SP - GPR_FIRST)                 \
3837  : (REGNO) == CR_PSW             ? (66 + 0)                             \
3838  : (REGNO) == CR_BPSW            ? (66 + 1)                             \
3839  : (REGNO) == CR_PC              ? (66 + 2)                             \
3840  : (REGNO) == CR_BPC             ? (66 + 3)                             \
3841  : (REGNO) == CR_DPSW            ? (66 + 4)                             \
3842  : (REGNO) == CR_DPC             ? (66 + 5)                             \
3843  : (REGNO) == CR_RPT_C           ? (66 + 7)                             \
3844  : (REGNO) == CR_RPT_S           ? (66 + 8)                             \
3845  : (REGNO) == CR_RPT_E           ? (66 + 9)                             \
3846  : (REGNO) == CR_MOD_S           ? (66 + 10)                            \
3847  : (REGNO) == CR_MOD_E           ? (66 + 11)                            \
3848  : (REGNO) == CR_IBA             ? (66 + 14)                            \
3849  : (REGNO) == CR_EIT_VB          ? (66 + 15)                            \
3850  : (REGNO) == CR_INT_S           ? (66 + 16)                            \
3851  : (REGNO) == CR_INT_M           ? (66 + 17)                            \
3852  :                                 -1)
3853
3854 /* A C expression that returns the integer offset value for an automatic
3855    variable having address X (an RTL expression).  The default computation
3856    assumes that X is based on the frame-pointer and gives the offset from the
3857    frame-pointer.  This is required for targets that produce debugging output
3858    for DBX or COFF-style debugging output for SDB and allow the frame-pointer
3859    to be eliminated when the `-g' options is used.  */
3860 /* #define DEBUGGER_AUTO_OFFSET(X) */
3861
3862 /* A C expression that returns the integer offset value for an argument having
3863    address X (an RTL expression).  The nominal offset is OFFSET.  */
3864 /* #define DEBUGGER_ARG_OFFSET(OFFSET, X) */
3865
3866 /* A C expression that returns the type of debugging output GNU CC produces
3867    when the user specifies `-g' or `-ggdb'.  Define this if you have arranged
3868    for GNU CC to support more than one format of debugging output.  Currently,
3869    the allowable values are `DBX_DEBUG', `SDB_DEBUG', `DWARF_DEBUG',
3870    `DWARF2_DEBUG', and `XCOFF_DEBUG'.
3871
3872    The value of this macro only affects the default debugging output; the user
3873    can always get a specific type of output by using `-gstabs', `-gcoff',
3874    `-gdwarf-1', `-gdwarf-2', or `-gxcoff'.
3875
3876    Defined in svr4.h.  */
3877
3878 #undef  PREFERRED_DEBUGGING_TYPE
3879 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
3880
3881 \f
3882 /* Specific Options for DBX Output.  */
3883
3884 /* Define this macro if GNU CC should produce debugging output for DBX in
3885    response to the `-g' option.
3886
3887    Defined in svr4.h.  */
3888 /* #define DBX_DEBUGGING_INFO */
3889
3890 /* Define this macro if GNU CC should produce XCOFF format debugging output in
3891    response to the `-g' option.  This is a variant of DBX format.  */
3892 /* #define XCOFF_DEBUGGING_INFO */
3893
3894 /* Define this macro to control whether GNU CC should by default generate GDB's
3895    extended version of DBX debugging information (assuming DBX-format debugging
3896    information is enabled at all).  If you don't define the macro, the default
3897    is 1: always generate the extended information if there is any occasion to.  */
3898 /* #define DEFAULT_GDB_EXTENSIONS */
3899
3900 /* Define this macro if all `.stabs' commands should be output while in the
3901    text section.  */
3902 /* #define DEBUG_SYMS_TEXT */
3903
3904 /* A C string constant naming the assembler pseudo op to use instead of
3905    `.stabs' to define an ordinary debugging symbol.  If you don't define this
3906    macro, `.stabs' is used.  This macro applies only to DBX debugging
3907    information format.  */
3908 /* #define ASM_STABS_OP */
3909
3910 /* A C string constant naming the assembler pseudo op to use instead of
3911    `.stabd' to define a debugging symbol whose value is the current location.
3912    If you don't define this macro, `.stabd' is used.  This macro applies only
3913    to DBX debugging information format.  */
3914 /* #define ASM_STABD_OP */
3915
3916 /* A C string constant naming the assembler pseudo op to use instead of
3917    `.stabn' to define a debugging symbol with no name.  If you don't define
3918    this macro, `.stabn' is used.  This macro applies only to DBX debugging
3919    information format.  */
3920 /* #define ASM_STABN_OP */
3921
3922 /* Define this macro if DBX on your system does not support the construct
3923    `xsTAGNAME'.  On some systems, this construct is used to describe a forward
3924    reference to a structure named TAGNAME.  On other systems, this construct is
3925    not supported at all.  */
3926 /* #define DBX_NO_XREFS */
3927
3928 /* A symbol name in DBX-format debugging information is normally continued
3929    (split into two separate `.stabs' directives) when it exceeds a certain
3930    length (by default, 80 characters).  On some operating systems, DBX requires
3931    this splitting; on others, splitting must not be done.  You can inhibit
3932    splitting by defining this macro with the value zero.  You can override the
3933    default splitting-length by defining this macro as an expression for the
3934    length you desire.  */
3935 /* #define DBX_CONTIN_LENGTH */
3936
3937 /* Normally continuation is indicated by adding a `\' character to the end of a
3938    `.stabs' string when a continuation follows.  To use a different character
3939    instead, define this macro as a character constant for the character you
3940    want to use.  Do not define this macro if backslash is correct for your
3941    system.  */
3942 /* #define DBX_CONTIN_CHAR */
3943
3944 /* Define this macro if it is necessary to go to the data section before
3945    outputting the `.stabs' pseudo-op for a non-global static variable.  */
3946 /* #define DBX_STATIC_STAB_DATA_SECTION */
3947
3948 /* The value to use in the "code" field of the `.stabs' directive for a
3949    typedef.  The default is `N_LSYM'.  */
3950 /* #define DBX_TYPE_DECL_STABS_CODE */
3951
3952 /* The value to use in the "code" field of the `.stabs' directive for a static
3953    variable located in the text section.  DBX format does not provide any
3954    "right" way to do this.  The default is `N_FUN'.  */
3955 /* #define DBX_STATIC_CONST_VAR_CODE */
3956
3957 /* The value to use in the "code" field of the `.stabs' directive for a
3958    parameter passed in registers.  DBX format does not provide any "right" way
3959    to do this.  The default is `N_RSYM'.  */
3960 /* #define DBX_REGPARM_STABS_CODE */
3961
3962 /* The letter to use in DBX symbol data to identify a symbol as a parameter
3963    passed in registers.  DBX format does not customarily provide any way to do
3964    this.  The default is `'P''.  */
3965 /* #define DBX_REGPARM_STABS_LETTER */
3966
3967 /* The letter to use in DBX symbol data to identify a symbol as a stack
3968    parameter.  The default is `'p''.  */
3969 /* #define DBX_MEMPARM_STABS_LETTER */
3970
3971 /* Define this macro if the DBX information for a function and its arguments
3972    should precede the assembler code for the function.  Normally, in DBX
3973    format, the debugging information entirely follows the assembler code.
3974
3975    Defined in svr4.h.  */
3976 /* #define DBX_FUNCTION_FIRST */
3977
3978 /* Define this macro if the `N_LBRAC' symbol for a block should precede the
3979    debugging information for variables and functions defined in that block.
3980    Normally, in DBX format, the `N_LBRAC' symbol comes first.  */
3981 /* #define DBX_LBRAC_FIRST */
3982
3983 /* Define this macro if the value of a symbol describing the scope of a block
3984    (`N_LBRAC' or `N_RBRAC') should be relative to the start of the enclosing
3985    function.  Normally, GNU C uses an absolute address.
3986
3987    Defined in svr4.h.  */
3988 /* #define DBX_BLOCKS_FUNCTION_RELATIVE */
3989
3990 /* Define this macro if GNU C should generate `N_BINCL' and `N_EINCL'
3991    stabs for included header files, as on Sun systems.  This macro
3992    also directs GNU C to output a type number as a pair of a file
3993    number and a type number within the file.  Normally, GNU C does not
3994    generate `N_BINCL' or `N_EINCL' stabs, and it outputs a single
3995    number for a type number.  */
3996 /* #define DBX_USE_BINCL */
3997
3998 \f
3999 /* Open ended Hooks for DBX Output.  */
4000
4001 /* Define this macro to say how to output to STREAM the debugging information
4002    for the start of a scope level for variable names.  The argument NAME is the
4003    name of an assembler symbol (for use with `assemble_name') whose value is
4004    the address where the scope begins.  */
4005 /* #define DBX_OUTPUT_LBRAC(STREAM, NAME) */
4006
4007 /* Like `DBX_OUTPUT_LBRAC', but for the end of a scope level.  */
4008 /* #define DBX_OUTPUT_RBRAC(STREAM, NAME) */
4009
4010 /* Define this macro if the target machine requires special handling to output
4011    an enumeration type.  The definition should be a C statement (sans
4012    semicolon) to output the appropriate information to STREAM for the type
4013    TYPE.  */
4014 /* #define DBX_OUTPUT_ENUM(STREAM, TYPE) */
4015
4016 /* Define this macro if the target machine requires special output at the end
4017    of the debugging information for a function.  The definition should be a C
4018    statement (sans semicolon) to output the appropriate information to STREAM.
4019    FUNCTION is the `FUNCTION_DECL' node for the function.  */
4020 /* #define DBX_OUTPUT_FUNCTION_END(STREAM, FUNCTION) */
4021
4022 /* Define this macro if you need to control the order of output of the standard
4023    data types at the beginning of compilation.  The argument SYMS is a `tree'
4024    which is a chain of all the predefined global symbols, including names of
4025    data types.
4026
4027    Normally, DBX output starts with definitions of the types for integers and
4028    characters, followed by all the other predefined types of the particular
4029    language in no particular order.
4030
4031    On some machines, it is necessary to output different particular types
4032    first.  To do this, define `DBX_OUTPUT_STANDARD_TYPES' to output those
4033    symbols in the necessary order.  Any predefined types that you don't
4034    explicitly output will be output afterward in no particular order.
4035
4036    Be careful not to define this macro so that it works only for C.  There are
4037    no global variables to access most of the built-in types, because another
4038    language may have another set of types.  The way to output a particular type
4039    is to look through SYMS to see if you can find it.  Here is an example:
4040
4041         {
4042           tree decl;
4043           for (decl = syms; decl; decl = TREE_CHAIN (decl))
4044             if (!strcmp (IDENTIFIER_POINTER (DECL_NAME (decl)),
4045                          "long int"))
4046               dbxout_symbol (decl);
4047           ...
4048         }
4049
4050    This does nothing if the expected type does not exist.
4051
4052    See the function `init_decl_processing' in `c-decl.c' to find the names to
4053    use for all the built-in C types. */
4054 /* #define DBX_OUTPUT_STANDARD_TYPES(SYMS) */
4055
4056 /* Some stabs encapsulation formats (in particular ECOFF), cannot
4057    handle the `.stabs "",N_FUN,,0,0,Lscope-function-1' gdb dbx
4058    extension construct.  On those machines, define this macro to turn
4059    this feature off without disturbing the rest of the gdb extensions.  */
4060 /* #define NO_DBX_FUNCTION_END */
4061
4062 \f
4063 /* File names in DBX format.  */
4064
4065 /* Define this if DBX wants to have the current directory recorded in each
4066    object file.
4067
4068    Note that the working directory is always recorded if GDB extensions are
4069    enabled.  */
4070 /* #define DBX_WORKING_DIRECTORY */
4071
4072 /* A C statement to output DBX debugging information to the stdio stream STREAM
4073    which indicates that file NAME is the main source file--the file specified
4074    as the input file for compilation.  This macro is called only once, at the
4075    beginning of compilation.
4076
4077    This macro need not be defined if the standard form of output for DBX
4078    debugging information is appropriate.
4079
4080    Defined in svr4.h.  */
4081 /* #define DBX_OUTPUT_MAIN_SOURCE_FILENAME(STREAM, NAME) */
4082
4083 /* A C statement to output DBX debugging information to the stdio stream STREAM
4084    which indicates that the current directory during compilation is named NAME.
4085
4086    This macro need not be defined if the standard form of output for DBX
4087    debugging information is appropriate.  */
4088 /* #define DBX_OUTPUT_MAIN_SOURCE_DIRECTORY(STREAM, NAME) */
4089
4090 /* A C statement to output DBX debugging information at the end of compilation
4091    of the main source file NAME.
4092
4093    If you don't define this macro, nothing special is output at the end of
4094    compilation, which is correct for most machines.  */
4095 /* #define DBX_OUTPUT_MAIN_SOURCE_FILE_END(STREAM, NAME) */
4096
4097 /* A C statement to output DBX debugging information to the stdio stream STREAM
4098    which indicates that file NAME is the current source file.  This output is
4099    generated each time input shifts to a different source file as a result of
4100    `#include', the end of an included file, or a `#line' command.
4101
4102    This macro need not be defined if the standard form of output for DBX
4103    debugging information is appropriate.  */
4104 /* #define DBX_OUTPUT_SOURCE_FILENAME(STREAM, NAME) */
4105
4106 \f
4107 /* Macros for SDB and Dwarf Output.  */
4108
4109 /* Define this macro if GNU CC should produce COFF-style debugging output for
4110    SDB in response to the `-g' option.  */
4111 /* #define SDB_DEBUGGING_INFO */
4112
4113 /* Define this macro if GNU CC should produce dwarf format debugging output in
4114    response to the `-g' option.
4115
4116    Defined in svr4.h.  */
4117 /* #define DWARF_DEBUGGING_INFO */
4118
4119 /* Define this macro if GNU CC should produce dwarf version 2 format debugging
4120    output in response to the `-g' option.
4121
4122    To support optional call frame debugging information, you must also define
4123    `INCOMING_RETURN_ADDR_RTX' and either set `RTX_FRAME_RELATED_P' on the
4124    prologue insns if you use RTL for the prologue, or call `dwarf2out_def_cfa'
4125    and `dwarf2out_reg_save' as appropriate from output_function_prologue() if
4126    you don't.
4127
4128    Defined in svr4.h.  */
4129 /* #define DWARF2_DEBUGGING_INFO */
4130
4131 /* Define these macros to override the assembler syntax for the special SDB
4132    assembler directives.  See `sdbout.c' for a list of these macros and their
4133    arguments.  If the standard syntax is used, you need not define them
4134    yourself.  */
4135 /* #define PUT_SDB_... */
4136
4137 /* Some assemblers do not support a semicolon as a delimiter, even between SDB
4138    assembler directives.  In that case, define this macro to be the delimiter
4139    to use (usually `\n').  It is not necessary to define a new set of
4140    `PUT_SDB_OP' macros if this is the only change required.  */
4141 /* #define SDB_DELIM */
4142
4143 /* Define this macro to override the usual method of constructing a dummy name
4144    for anonymous structure and union types.  See `sdbout.c' for more
4145    information.  */
4146 /* #define SDB_GENERATE_FAKE */
4147
4148 /* Define this macro to allow references to unknown structure, union, or
4149    enumeration tags to be emitted.  Standard COFF does not allow handling of
4150    unknown references, MIPS ECOFF has support for it.  */
4151 /* #define SDB_ALLOW_UNKNOWN_REFERENCES */
4152
4153 /* Define this macro to allow references to structure, union, or enumeration
4154    tags that have not yet been seen to be handled.  Some assemblers choke if
4155    forward tags are used, while some require it.  */
4156 /* #define SDB_ALLOW_FORWARD_REFERENCES */
4157
4158 \f
4159 /* Cross Compilation and Floating Point.  */
4160
4161 /* While all modern machines use 2's complement representation for integers,
4162    there are a variety of representations for floating point numbers.  This
4163    means that in a cross-compiler the representation of floating point numbers
4164    in the compiled program may be different from that used in the machine doing
4165    the compilation.
4166
4167    Because different representation systems may offer different amounts of
4168    range and precision, the cross compiler cannot safely use the host machine's
4169    floating point arithmetic.  Therefore, floating point constants must be
4170    represented in the target machine's format.  This means that the cross
4171    compiler cannot use `atof' to parse a floating point constant; it must have
4172    its own special routine to use instead.  Also, constant folding must emulate
4173    the target machine's arithmetic (or must not be done at all).
4174
4175    The macros in the following table should be defined only if you are cross
4176    compiling between different floating point formats.
4177
4178    Otherwise, don't define them.  Then default definitions will be set up which
4179    use `double' as the data type, `==' to test for equality, etc.
4180
4181    You don't need to worry about how many times you use an operand of any of
4182    these macros.  The compiler never uses operands which have side effects.  */
4183
4184 /* A macro for the C data type to be used to hold a floating point value in the
4185    target machine's format.  Typically this would be a `struct' containing an
4186    array of `int'.  */
4187 /* #define REAL_VALUE_TYPE */
4188
4189 /* A macro for a C expression which compares for equality the two values, X and
4190    Y, both of type `REAL_VALUE_TYPE'.  */
4191 /* #define REAL_VALUES_EQUAL(X, Y) */
4192
4193 /* A macro for a C expression which tests whether X is less than Y, both values
4194    being of type `REAL_VALUE_TYPE' and interpreted as floating point numbers in
4195    the target machine's representation.  */
4196 /* #define REAL_VALUES_LESS(X, Y) */
4197
4198 /* A macro for a C expression which performs the standard library function
4199    `ldexp', but using the target machine's floating point representation.  Both
4200    X and the value of the expression have type `REAL_VALUE_TYPE'.  The second
4201    argument, SCALE, is an integer.  */
4202 /* #define REAL_VALUE_LDEXP(X, SCALE) */
4203
4204 /* A macro whose definition is a C expression to convert the target-machine
4205    floating point value X to a signed integer.  X has type `REAL_VALUE_TYPE'.  */
4206 /* #define REAL_VALUE_FIX(X) */
4207
4208 /* A macro whose definition is a C expression to convert the target-machine
4209    floating point value X to an unsigned integer.  X has type
4210    `REAL_VALUE_TYPE'.  */
4211 /* #define REAL_VALUE_UNSIGNED_FIX(X) */
4212
4213 /* A macro whose definition is a C expression to round the target-machine
4214    floating point value X towards zero to an integer value (but still as a
4215    floating point number).  X has type `REAL_VALUE_TYPE', and so does the
4216    value.  */
4217 /* #define REAL_VALUE_RNDZINT(X) */
4218
4219 /* A macro whose definition is a C expression to round the target-machine
4220    floating point value X towards zero to an unsigned integer value (but still
4221    represented as a floating point number).  X has type `REAL_VALUE_TYPE', and
4222    so does the value.  */
4223 /* #define REAL_VALUE_UNSIGNED_RNDZINT(X) */
4224
4225 /* A macro for a C expression which converts STRING, an expression of type
4226    `char *', into a floating point number in the target machine's
4227    representation for mode MODE.  The value has type `REAL_VALUE_TYPE'.  */
4228 /* #define REAL_VALUE_ATOF(STRING, MODE) */
4229
4230 /* Define this macro if infinity is a possible floating point value, and
4231    therefore division by 0 is legitimate.  */
4232 /* #define REAL_INFINITY */
4233
4234 /* A macro for a C expression which determines whether X, a floating point
4235    value, is infinity.  The value has type `int'.  By default, this is defined
4236    to call `isinf'.  */
4237 /* #define REAL_VALUE_ISINF(X) */
4238
4239 /* A macro for a C expression which determines whether X, a floating point
4240    value, is a "nan" (not-a-number).  The value has type `int'.  By default,
4241    this is defined to call `isnan'.  */
4242 /* #define REAL_VALUE_ISNAN(X) */
4243
4244 /* Define the following additional macros if you want to make floating point
4245    constant folding work while cross compiling.  If you don't define them,
4246    cross compilation is still possible, but constant folding will not happen
4247    for floating point values.  */
4248
4249 /* A macro for a C statement which calculates an arithmetic operation of the
4250    two floating point values X and Y, both of type `REAL_VALUE_TYPE' in the
4251    target machine's representation, to produce a result of the same type and
4252    representation which is stored in OUTPUT (which will be a variable).
4253
4254    The operation to be performed is specified by CODE, a tree code which will
4255    always be one of the following: `PLUS_EXPR', `MINUS_EXPR', `MULT_EXPR',
4256    `RDIV_EXPR', `MAX_EXPR', `MIN_EXPR'.
4257
4258    The expansion of this macro is responsible for checking for overflow.  If
4259    overflow happens, the macro expansion should execute the statement `return
4260    0;', which indicates the inability to perform the arithmetic operation
4261    requested.  */
4262 /* #define REAL_ARITHMETIC(OUTPUT, CODE, X, Y) */
4263
4264 /* The real.h file actually defines REAL_ARITHMETIC appropriately if it was
4265    defined at all before entering into the code, by using #undef first.  */
4266 #define REAL_ARITHMETIC
4267
4268 /* A macro for a C expression which returns the negative of the floating point
4269    value X.  Both X and the value of the expression have type `REAL_VALUE_TYPE'
4270    and are in the target machine's floating point representation.
4271
4272    There is no way for this macro to report overflow, since overflow can't
4273    happen in the negation operation.  */
4274 /* #define REAL_VALUE_NEGATE(X) */
4275
4276 /* A macro for a C expression which converts the floating point value X to mode
4277    MODE.
4278
4279    Both X and the value of the expression are in the target machine's floating
4280    point representation and have type `REAL_VALUE_TYPE'.  However, the value
4281    should have an appropriate bit pattern to be output properly as a floating
4282    constant whose precision accords with mode MODE.
4283
4284    There is no way for this macro to report overflow.  */
4285 /* #define REAL_VALUE_TRUNCATE(MODE, X) */
4286
4287 /* A macro for a C expression which converts a floating point value X into a
4288    double-precision integer which is then stored into LOW and HIGH, two
4289    variables of type INT.  */
4290 /* #define REAL_VALUE_TO_INT(LOW, HIGH, X) */
4291
4292 /* A macro for a C expression which converts a double-precision integer found
4293    in LOW and HIGH, two variables of type INT, into a floating point value
4294    which is then stored into X.  */
4295 /* #define REAL_VALUE_FROM_INT(X, LOW, HIGH) */
4296
4297 \f
4298 /* Miscellaneous Parameters.  */
4299
4300 /* Define this if you have defined special-purpose predicates in the file
4301    `MACHINE.c'.  This macro is called within an initializer of an array of
4302    structures.  The first field in the structure is the name of a predicate and
4303    the second field is an array of rtl codes.  For each predicate, list all rtl
4304    codes that can be in expressions matched by the predicate.  The list should
4305    have a trailing comma.  Here is an example of two entries in the list for a
4306    typical RISC machine:
4307
4308         #define PREDICATE_CODES \
4309           {"gen_reg_rtx_operand", {SUBREG, REG}},  \
4310           {"reg_or_short_cint_operand", {SUBREG, REG, CONST_INT}},
4311
4312    Defining this macro does not affect the generated code (however, incorrect
4313    definitions that omit an rtl code that may be matched by the predicate can
4314    cause the compiler to malfunction).  Instead, it allows the table built by
4315    `genrecog' to be more compact and efficient, thus speeding up the compiler.
4316    The most important predicates to include in the list specified by this macro
4317    are thoses used in the most insn patterns.  */
4318
4319 #define PREDICATE_CODES                                                 \
4320   { "short_memory_operand",             { MEM }},                       \
4321   { "long_memory_operand",              { MEM }},                       \
4322   { "d30v_memory_operand",              { MEM }},                       \
4323   { "single_reg_memory_operand",        { MEM }},                       \
4324   { "const_addr_memory_operand",        { MEM }},                       \
4325   { "call_operand",                     { MEM }},                       \
4326   { "gpr_operand",                      { REG, SUBREG }},               \
4327   { "accum_operand",                    { REG, SUBREG }},               \
4328   { "gpr_or_accum_operand",             { REG, SUBREG }},               \
4329   { "cr_operand",                       { REG, SUBREG }},               \
4330   { "repeat_operand",                   { REG, SUBREG }},               \
4331   { "flag_operand",                     { REG, SUBREG }},               \
4332   { "br_flag_operand",                  { REG, SUBREG }},               \
4333   { "br_flag_or_constant_operand",      { REG, SUBREG, CONST_INT }},    \
4334   { "gpr_or_br_flag_operand",           { REG, SUBREG }},               \
4335   { "f0_operand",                       { REG, SUBREG }},               \
4336   { "f1_operand",                       { REG, SUBREG }},               \
4337   { "carry_operand",                    { REG, SUBREG }},               \
4338   { "reg_or_0_operand",                 { REG, SUBREG, CONST_INT,       \
4339                                           CONST_DOUBLE }},              \
4340   { "gpr_or_signed6_operand",           { REG, SUBREG, CONST_INT }},    \
4341   { "gpr_or_unsigned5_operand",         { REG, SUBREG, CONST_INT }},    \
4342   { "gpr_or_unsigned6_operand",         { REG, SUBREG, CONST_INT }},    \
4343   { "gpr_or_constant_operand",          { REG, SUBREG, CONST_INT,       \
4344                                           CONST, SYMBOL_REF,            \
4345                                           LABEL_REF }},                 \
4346   { "gpr_or_dbl_const_operand",         { REG, SUBREG, CONST_INT,       \
4347                                           CONST, SYMBOL_REF,            \
4348                                           LABEL_REF, CONST_DOUBLE }},   \
4349   { "gpr_or_memory_operand",            { REG, SUBREG, MEM }},          \
4350   { "move_input_operand",               { REG, SUBREG, MEM, CONST_INT,  \
4351                                           CONST, SYMBOL_REF,            \
4352                                           LABEL_REF, CONST_DOUBLE }},   \
4353   { "move_output_operand",              { REG, SUBREG, MEM }},          \
4354   { "signed6_operand",                  { CONST_INT }},                 \
4355   { "unsigned5_operand",                { CONST_INT }},                 \
4356   { "unsigned6_operand",                { CONST_INT }},                 \
4357   { "bitset_operand",                   { CONST_INT }},                 \
4358   { "condexec_test_operator",           { EQ, NE }},                    \
4359   { "condexec_branch_operator",         { EQ, NE }},                    \
4360   { "condexec_unary_operator",          { ABS, NEG, NOT, ZERO_EXTEND }}, \
4361   { "condexec_addsub_operator",         { PLUS, MINUS }},               \
4362   { "condexec_binary_operator",         { MULT, AND, IOR, XOR,          \
4363                                           ASHIFT, ASHIFTRT, LSHIFTRT,   \
4364                                           ROTATE, ROTATERT }},          \
4365   { "condexec_shiftl_operator",         { ASHIFT, ROTATE }},            \
4366   { "condexec_extend_operator",         { SIGN_EXTEND, ZERO_EXTEND }},  \
4367   { "branch_zero_operator",             { EQ, NE }},                    \
4368   { "cond_move_dest_operand",           { REG, SUBREG, MEM }},          \
4369   { "cond_move_operand",                { REG, SUBREG, CONST_INT,       \
4370                                           CONST, SYMBOL_REF,            \
4371                                           LABEL_REF, MEM }},            \
4372   { "cond_exec_operand",                { REG, SUBREG, CONST_INT,       \
4373                                           CONST, SYMBOL_REF,            \
4374                                           LABEL_REF, MEM }},            \
4375   { "srelational_si_operator",          { EQ, NE, LT, LE, GT, GE }},    \
4376   { "urelational_si_operator",          { LTU, LEU, GTU, GEU }},        \
4377   { "relational_di_operator",           { EQ, NE, LT, LE, GT, GE,       \
4378                                           LTU, LEU, GTU, GEU }},
4379
4380 /* An alias for a machine mode name.  This is the machine mode that elements of
4381    a jump-table should have.  */
4382 #define CASE_VECTOR_MODE SImode
4383
4384 /* Define as C expression which evaluates to nonzero if the tablejump
4385    instruction expects the table to contain offsets from the address of the
4386    table.
4387    Do not define this if the table should contain absolute addresses. */
4388 /* #define CASE_VECTOR_PC_RELATIVE 1 */
4389
4390 /* Define this if control falls through a `case' insn when the index value is
4391    out of range.  This means the specified default-label is actually ignored by
4392    the `case' insn proper.  */
4393 /* #define CASE_DROPS_THROUGH */
4394
4395 /* Define this to be the smallest number of different values for which it is
4396    best to use a jump-table instead of a tree of conditional branches.  The
4397    default is four for machines with a `casesi' instruction and five otherwise.
4398    This is best for most machines.  */
4399 /* #define CASE_VALUES_THRESHOLD */
4400
4401 /* Define this macro if operations between registers with integral mode smaller
4402    than a word are always performed on the entire register.  Most RISC machines
4403    have this property and most CISC machines do not.  */
4404 #define WORD_REGISTER_OPERATIONS 1
4405
4406 /* Define this macro to be a C expression indicating when insns that read
4407    memory in MODE, an integral mode narrower than a word, set the bits outside
4408    of MODE to be either the sign-extension or the zero-extension of the data
4409    read.  Return `SIGN_EXTEND' for values of MODE for which the insn
4410    sign-extends, `ZERO_EXTEND' for which it zero-extends, and `NIL' for other
4411    modes.
4412
4413    This macro is not called with MODE non-integral or with a width greater than
4414    or equal to `BITS_PER_WORD', so you may return any value in this case.  Do
4415    not define this macro if it would always return `NIL'.  On machines where
4416    this macro is defined, you will normally define it as the constant
4417    `SIGN_EXTEND' or `ZERO_EXTEND'.  */
4418
4419 #define LOAD_EXTEND_OP(MODE) SIGN_EXTEND
4420
4421 /* Define if loading short immediate values into registers sign extends.  */
4422 #define SHORT_IMMEDIATES_SIGN_EXTEND
4423
4424 /* Define this macro if the same instructions that convert a floating point
4425    number to a signed fixed point number also convert validly to an unsigned
4426    one.  */
4427 /* #define FIXUNS_TRUNC_LIKE_FIX_TRUNC */
4428
4429 /* The maximum number of bytes that a single instruction can move quickly from
4430    memory to memory.  */
4431 #define MOVE_MAX 8
4432
4433 /* The maximum number of bytes that a single instruction can move quickly from
4434    memory to memory.  If this is undefined, the default is `MOVE_MAX'.
4435    Otherwise, it is the constant value that is the largest value that
4436    `MOVE_MAX' can have at run-time.  */
4437 /* #define MAX_MOVE_MAX */
4438
4439 /* A C expression that is nonzero if on this machine the number of bits
4440    actually used for the count of a shift operation is equal to the number of
4441    bits needed to represent the size of the object being shifted.  When this
4442    macro is non-zero, the compiler will assume that it is safe to omit a
4443    sign-extend, zero-extend, and certain bitwise `and' instructions that
4444    truncates the count of a shift operation.  On machines that have
4445    instructions that act on bitfields at variable positions, which may include
4446    `bit test' instructions, a nonzero `SHIFT_COUNT_TRUNCATED' also enables
4447    deletion of truncations of the values that serve as arguments to bitfield
4448    instructions.
4449
4450    If both types of instructions truncate the count (for shifts) and position
4451    (for bitfield operations), or if no variable-position bitfield instructions
4452    exist, you should define this macro.
4453
4454    However, on some machines, such as the 80386 and the 680x0, truncation only
4455    applies to shift operations and not the (real or pretended) bitfield
4456    operations.  Define `SHIFT_COUNT_TRUNCATED' to be zero on such machines.
4457    Instead, add patterns to the `md' file that include the implied truncation
4458    of the shift instructions.
4459
4460    You need not define this macro if it would always have the value of zero.  */
4461 /* #define SHIFT_COUNT_TRUNCATED */
4462
4463 /* A C expression which is nonzero if on this machine it is safe to "convert"
4464    an integer of INPREC bits to one of OUTPREC bits (where OUTPREC is smaller
4465    than INPREC) by merely operating on it as if it had only OUTPREC bits.
4466
4467    On many machines, this expression can be 1.
4468
4469    When `TRULY_NOOP_TRUNCATION' returns 1 for a pair of sizes for modes for
4470    which `MODES_TIEABLE_P' is 0, suboptimal code can result.  If this is the
4471    case, making `TRULY_NOOP_TRUNCATION' return 0 in such cases may improve
4472    things.  */
4473 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
4474
4475 /* A C expression describing the value returned by a comparison operator with
4476    an integral mode and stored by a store-flag instruction (`sCOND') when the
4477    condition is true.  This description must apply to *all* the `sCOND'
4478    patterns and all the comparison operators whose results have a `MODE_INT'
4479    mode.
4480
4481    A value of 1 or -1 means that the instruction implementing the comparison
4482    operator returns exactly 1 or -1 when the comparison is true and 0 when the
4483    comparison is false.  Otherwise, the value indicates which bits of the
4484    result are guaranteed to be 1 when the comparison is true.  This value is
4485    interpreted in the mode of the comparison operation, which is given by the
4486    mode of the first operand in the `sCOND' pattern.  Either the low bit or the
4487    sign bit of `STORE_FLAG_VALUE' be on.  Presently, only those bits are used
4488    by the compiler.
4489
4490    If `STORE_FLAG_VALUE' is neither 1 or -1, the compiler will generate code
4491    that depends only on the specified bits.  It can also replace comparison
4492    operators with equivalent operations if they cause the required bits to be
4493    set, even if the remaining bits are undefined.  For example, on a machine
4494    whose comparison operators return an `SImode' value and where
4495    `STORE_FLAG_VALUE' is defined as `0x80000000', saying that just the sign bit
4496    is relevant, the expression
4497
4498         (ne:SI (and:SI X (const_int POWER-OF-2)) (const_int 0))
4499
4500    can be converted to
4501
4502         (ashift:SI X (const_int N))
4503
4504    where N is the appropriate shift count to move the bit being tested into the
4505    sign bit.
4506
4507    There is no way to describe a machine that always sets the low-order bit for
4508    a true value, but does not guarantee the value of any other bits, but we do
4509    not know of any machine that has such an instruction.  If you are trying to
4510    port GNU CC to such a machine, include an instruction to perform a
4511    logical-and of the result with 1 in the pattern for the comparison operators
4512    and let us know (*note How to Report Bugs: Bug Reporting.).
4513
4514    Often, a machine will have multiple instructions that obtain a value from a
4515    comparison (or the condition codes).  Here are rules to guide the choice of
4516    value for `STORE_FLAG_VALUE', and hence the instructions to be used:
4517
4518       * Use the shortest sequence that yields a valid definition for
4519         `STORE_FLAG_VALUE'.  It is more efficient for the compiler to
4520         "normalize" the value (convert it to, e.g., 1 or 0) than for
4521         the comparison operators to do so because there may be
4522         opportunities to combine the normalization with other
4523         operations.
4524
4525       * For equal-length sequences, use a value of 1 or -1, with -1
4526         being slightly preferred on machines with expensive jumps and
4527         1 preferred on other machines.
4528
4529       * As a second choice, choose a value of `0x80000001' if
4530         instructions exist that set both the sign and low-order bits
4531         but do not define the others.
4532
4533       * Otherwise, use a value of `0x80000000'.
4534
4535    Many machines can produce both the value chosen for `STORE_FLAG_VALUE' and
4536    its negation in the same number of instructions.  On those machines, you
4537    should also define a pattern for those cases, e.g., one matching
4538
4539         (set A (neg:M (ne:M B C)))
4540
4541    Some machines can also perform `and' or `plus' operations on condition code
4542    values with less instructions than the corresponding `sCOND' insn followed
4543    by `and' or `plus'.  On those machines, define the appropriate patterns.
4544    Use the names `incscc' and `decscc', respectively, for the the patterns
4545    which perform `plus' or `minus' operations on condition code values.  See
4546    `rs6000.md' for some examples.  The GNU Superoptizer can be used to find
4547    such instruction sequences on other machines.
4548
4549    You need not define `STORE_FLAG_VALUE' if the machine has no store-flag
4550    instructions.  */
4551 /* #define STORE_FLAG_VALUE */
4552
4553 /* A C expression that gives a non-zero floating point value that is returned
4554    when comparison operators with floating-point results are true.  Define this
4555    macro on machine that have comparison operations that return floating-point
4556    values.  If there are no such operations, do not define this macro.  */
4557 /* #define FLOAT_STORE_FLAG_VALUE */
4558
4559 /* An alias for the machine mode for pointers.  On most machines, define this
4560    to be the integer mode corresponding to the width of a hardware pointer;
4561    `SImode' on 32-bit machine or `DImode' on 64-bit machines.  On some machines
4562    you must define this to be one of the partial integer modes, such as
4563    `PSImode'.
4564
4565    The width of `Pmode' must be at least as large as the value of
4566    `POINTER_SIZE'.  If it is not equal, you must define the macro
4567    `POINTERS_EXTEND_UNSIGNED' to specify how pointers are extended to `Pmode'.  */
4568 #define Pmode SImode
4569
4570 /* An alias for the machine mode used for memory references to functions being
4571    called, in `call' RTL expressions.  On most machines this should be
4572    `QImode'.  */
4573 #define FUNCTION_MODE QImode
4574
4575 /* A C expression for the maximum number of instructions above which the
4576    function DECL should not be inlined.  DECL is a `FUNCTION_DECL' node.
4577
4578    The default definition of this macro is 64 plus 8 times the number of
4579    arguments that the function accepts.  Some people think a larger threshold
4580    should be used on RISC machines.  */
4581 /* #define INTEGRATE_THRESHOLD(DECL) */
4582
4583 /* Define this if the preprocessor should ignore `#sccs' directives and print
4584    no error message.
4585
4586    Defined in svr4.h.  */
4587 /* #define SCCS_DIRECTIVE */
4588
4589 /* Define this macro if the system header files support C++ as well as C.  This
4590    macro inhibits the usual method of using system header files in C++, which
4591    is to pretend that the file's contents are enclosed in `extern "C" {...}'.  */
4592 /* #define NO_IMPLICIT_EXTERN_C */
4593
4594 /* Define this macro to handle System V style pragmas (particularly #pack).
4595
4596    Defined in svr4.h.  */
4597 #define HANDLE_SYSV_PRAGMA
4598
4599 /* Define this macro if you want to handle #pragma weak (HANDLE_SYSV_PRAGMA
4600    must also be defined).  */
4601 /* #define HANDLE_WEAK_PRAGMA */
4602
4603 /* Define this macro if the assembler does not accept the character `$' in
4604    label names.  By default constructors and destructors in G++ have `$' in the
4605    identifiers.  If this macro is defined, `.' is used instead.
4606
4607    Defined in svr4.h.  */
4608 /* #define NO_DOLLAR_IN_LABEL */
4609
4610 /* Define this macro if the assembler does not accept the character `.' in
4611    label names.  By default constructors and destructors in G++ have names that
4612    use `.'.  If this macro is defined, these names are rewritten to avoid `.'.  */
4613 /* #define NO_DOT_IN_LABEL */
4614
4615 /* Define this macro if the target system expects every program's `main'
4616    function to return a standard "success" value by default (if no other value
4617    is explicitly returned).
4618
4619    The definition should be a C statement (sans semicolon) to generate the
4620    appropriate rtl instructions.  It is used only when compiling the end of
4621    `main'.  */
4622 /* #define DEFAULT_MAIN_RETURN */
4623
4624 /* Define this if your `exit' function needs to do something besides calling an
4625    external function `_cleanup' before terminating with `_exit'.  The
4626    `EXIT_BODY' macro is only needed if `NEED_ATEXIT' is defined and
4627    `ON_EXIT' is not defined.  */
4628 /* #define EXIT_BODY */
4629
4630 /* Define this macro as a C expression that is nonzero if it is safe for the
4631    delay slot scheduler to place instructions in the delay slot of INSN, even
4632    if they appear to use a resource set or clobbered in INSN.  INSN is always a
4633    `jump_insn' or an `insn'; GNU CC knows that every `call_insn' has this
4634    behavior.  On machines where some `insn' or `jump_insn' is really a function
4635    call and hence has this behavior, you should define this macro.
4636
4637    You need not define this macro if it would always return zero.  */
4638 /* #define INSN_SETS_ARE_DELAYED(INSN) */
4639
4640 /* Define this macro as a C expression that is nonzero if it is safe for the
4641    delay slot scheduler to place instructions in the delay slot of INSN, even
4642    if they appear to set or clobber a resource referenced in INSN.  INSN is
4643    always a `jump_insn' or an `insn'.  On machines where some `insn' or
4644    `jump_insn' is really a function call and its operands are registers whose
4645    use is actually in the subroutine it calls, you should define this macro.
4646    Doing so allows the delay slot scheduler to move instructions which copy
4647    arguments into the argument registers into the delay slot of INSN.
4648
4649    You need not define this macro if it would always return zero.  */
4650 /* #define INSN_REFERENCES_ARE_DELAYED(INSN) */
4651
4652 /* In rare cases, correct code generation requires extra machine dependent
4653    processing between the second jump optimization pass and delayed branch
4654    scheduling.  On those machines, define this macro as a C statement to act on
4655    the code starting at INSN.  */
4656 #define MACHINE_DEPENDENT_REORG(INSN) d30v_machine_dependent_reorg (INSN)
4657
4658 /* Define this macro if in some cases global symbols from one translation unit
4659    may not be bound to undefined symbols in another translation unit without
4660    user intervention.  For instance, under Microsoft Windows symbols must be
4661    explicitly imported from shared libraries (DLLs).  */
4662 /* #define MULTIPLE_SYMBOL_SPACES */
4663
4664 /* A C expression for the maximum number of instructions to execute via
4665    conditional execution instructions instead of a branch.  A value of
4666    BRANCH_COST+1 is the default if the machine does not use cc0, and 1 if it
4667    does use cc0. */
4668 #define MAX_CONDITIONAL_EXECUTE d30v_cond_exec
4669
4670 #define D30V_DEFAULT_MAX_CONDITIONAL_EXECUTE 4
4671
4672 /* Values of the -mcond-exec=n string.  */
4673 extern int d30v_cond_exec;
4674 extern const char *d30v_cond_exec_string;
4675
4676 #endif /* GCC_D30V_H */