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