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