OSDN Git Service

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