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