OSDN Git Service

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