* alpha.h: NULL_PTR -> NULL.
[official-gcc.git] / gcc / config / avr / avr.h
blob09399805744b0902aae52ae112969a8aff018dd7
1 /* Definitions of target machine for GNU compiler,
2 for ATMEL AVR at90s8515, ATmega103/103L, ATmega603/603L microcontrollers.
3 Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
4 Contributed by Denis Chertykov (denisc@overta.ru)
6 This file is part of GNU CC.
8 GNU CC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
13 GNU CC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GNU CC; see the file COPYING. If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA. */
23 /* Names to predefine in the preprocessor for this target machine. */
25 #define CPP_PREDEFINES "-DAVR"
26 /* Define this to be a string constant containing `-D' options to
27 define the predefined macros that identify this machine and system.
28 These macros will be predefined unless the `-ansi' option is
29 specified.
31 In addition, a parallel set of macros are predefined, whose names
32 are made by appending `__' at the beginning and at the end. These
33 `__' macros are permitted by the ANSI standard, so they are
34 predefined regardless of whether `-ansi' is specified.
36 For example, on the Sun, one can use the following value:
38 "-Dmc68000 -Dsun -Dunix"
40 The result is to define the macros `__mc68000__', `__sun__' and
41 `__unix__' unconditionally, and the macros `mc68000', `sun' and
42 `unix' provided `-ansi' is not specified. */
45 /* This declaration should be present. */
46 extern int target_flags;
48 #define MASK_RTL_DUMP 0x00000010
49 #define MASK_ALL_DEBUG 0x00000FE0
50 #define MASK_ORDER_1 0x00001000
51 #define MASK_INSN_SIZE_DUMP 0x00002000
52 #define MASK_ORDER_2 0x00004000
53 #define MASK_NO_TABLEJUMP 0x00008000
54 #define MASK_INT8 0x00010000
55 #define MASK_NO_INTERRUPTS 0x00020000
56 #define MASK_CALL_PROLOGUES 0x00040000
57 #define MASK_TINY_STACK 0x00080000
59 #define TARGET_ORDER_1 (target_flags & MASK_ORDER_1)
60 #define TARGET_ORDER_2 (target_flags & MASK_ORDER_2)
61 #define TARGET_INT8 (target_flags & MASK_INT8)
62 #define TARGET_NO_INTERRUPTS (target_flags & MASK_NO_INTERRUPTS)
63 #define TARGET_INSN_SIZE_DUMP (target_flags & MASK_INSN_SIZE_DUMP)
64 #define TARGET_CALL_PROLOGUES (target_flags & MASK_CALL_PROLOGUES)
65 #define TARGET_TINY_STACK (target_flags & MASK_TINY_STACK)
66 #define TARGET_NO_TABLEJUMP (target_flags & MASK_NO_TABLEJUMP)
68 /* Dump each assembler insn's rtl into the output file.
69 This is for debugging the compiler itself. */
71 #define TARGET_RTL_DUMP (target_flags & MASK_RTL_DUMP)
72 #define TARGET_ALL_DEBUG (target_flags & MASK_ALL_DEBUG)
74 /* `TARGET_...'
75 This series of macros is to allow compiler command arguments to
76 enable or disable the use of optional features of the target
77 machine. For example, one machine description serves both the
78 68000 and the 68020; a command argument tells the compiler whether
79 it should use 68020-only instructions or not. This command
80 argument works by means of a macro `TARGET_68020' that tests a bit
81 in `target_flags'.
83 Define a macro `TARGET_FEATURENAME' for each such option. Its
84 definition should test a bit in `target_flags'; for example:
86 #define TARGET_68020 (target_flags & 1)
88 One place where these macros are used is in the
89 condition-expressions of instruction patterns. Note how
90 `TARGET_68020' appears frequently in the 68000 machine description
91 file, `m68k.md'. Another place they are used is in the
92 definitions of the other macros in the `MACHINE.h' file. */
96 #define TARGET_SWITCHES { \
97 { "order1", MASK_ORDER_1, NULL }, \
98 { "order2", MASK_ORDER_2, NULL }, \
99 { "int8", MASK_INT8, N_("Assume int to be 8 bit integer") }, \
100 { "no-interrupts", MASK_NO_INTERRUPTS, \
101 N_("Change the stack pointer without disabling interrupts") }, \
102 { "call-prologues", MASK_CALL_PROLOGUES, \
103 N_("Use subroutines for function prologue/epilogue") }, \
104 { "tiny-stack", MASK_TINY_STACK, \
105 N_("Change only the low 8 bits of the stack pointer") }, \
106 { "no-tablejump", MASK_NO_TABLEJUMP, \
107 N_("Do not generate tablejump insns") }, \
108 { "rtl", MASK_RTL_DUMP, NULL }, \
109 { "size", MASK_INSN_SIZE_DUMP, \
110 N_("Output instruction sizes to the asm file") }, \
111 { "deb", MASK_ALL_DEBUG, NULL }, \
112 { "", 0, NULL } }
113 /* This macro defines names of command options to set and clear bits
114 in `target_flags'. Its definition is an initializer with a
115 subgrouping for each command option.
117 Each subgrouping contains a string constant, that defines the
118 option name, and a number, which contains the bits to set in
119 `target_flags'. A negative number says to clear bits instead; the
120 negative of the number is which bits to clear. The actual option
121 name is made by appending `-m' to the specified name.
123 One of the subgroupings should have a null string. The number in
124 this grouping is the default value for `target_flags'. Any target
125 options act starting with that value.
127 Here is an example which defines `-m68000' and `-m68020' with
128 opposite meanings, and picks the latter as the default:
130 #define TARGET_SWITCHES \
131 { { "68020", 1}, \
132 { "68000", -1}, \
133 { "", 1}} */
135 extern const char *avr_init_stack;
136 extern const char *avr_mcu_name;
137 extern int avr_mega_p;
138 extern int avr_enhanced_p;
140 #define AVR_MEGA (avr_mega_p)
141 #define AVR_ENHANCED (avr_enhanced_p)
143 #define TARGET_OPTIONS { \
144 { "init-stack=", &avr_init_stack, N_("Specify the initial stack address") }, \
145 { "mcu=", &avr_mcu_name, N_("Specify the MCU name") } }
146 /* This macro is similar to `TARGET_SWITCHES' but defines names of
147 command options that have values. Its definition is an
148 initializer with a subgrouping for each command option.
150 Each subgrouping contains a string constant, that defines the
151 fixed part of the option name, and the address of a variable. The
152 variable, type `char *', is set to the variable part of the given
153 option if the fixed part matches. The actual option name is made
154 by appending `-m' to the specified name.
156 Here is an example which defines `-mshort-data-NUMBER'. If the
157 given option is `-mshort-data-512', the variable `m88k_short_data'
158 will be set to the string `"512"'.
160 extern char *m88k_short_data;
161 #define TARGET_OPTIONS \
162 { { "short-data-", &m88k_short_data } } */
164 #define TARGET_VERSION fprintf (stderr, " (GNU assembler syntax)");
165 /* This macro is a C statement to print on `stderr' a string
166 describing the particular machine description choice. Every
167 machine description should define `TARGET_VERSION'. For example:
169 #ifdef MOTOROLA
170 #define TARGET_VERSION \
171 fprintf (stderr, " (68k, Motorola syntax)");
172 #else
173 #define TARGET_VERSION \
174 fprintf (stderr, " (68k, MIT syntax)");
175 #endif */
177 #define OVERRIDE_OPTIONS avr_override_options()
178 /* `OVERRIDE_OPTIONS'
179 Sometimes certain combinations of command options do not make
180 sense on a particular target machine. You can define a macro
181 `OVERRIDE_OPTIONS' to take account of this. This macro, if
182 defined, is executed once just after all the command options have
183 been parsed.
185 Don't use this macro to turn on various extra optimizations for
186 `-O'. That is what `OPTIMIZATION_OPTIONS' is for. */
188 #define CAN_DEBUG_WITHOUT_FP
189 /* Define this macro if debugging can be performed even without a
190 frame pointer. If this macro is defined, GNU CC will turn on the
191 `-fomit-frame-pointer' option whenever `-O' is specified. */
193 /* Define this if most significant byte of a word is the lowest numbered. */
194 #define BITS_BIG_ENDIAN 0
196 /* Define this if most significant byte of a word is the lowest numbered. */
197 #define BYTES_BIG_ENDIAN 0
199 /* Define this if most significant word of a multiword number is the lowest
200 numbered. */
201 #define WORDS_BIG_ENDIAN 0
203 /* number of bits in an addressable storage unit */
204 #define BITS_PER_UNIT 8
206 /* Width in bits of a "word", which is the contents of a machine register.
207 Note that this is not necessarily the width of data type `int'; */
208 #define BITS_PER_WORD 8
210 #ifdef IN_LIBGCC2
211 /* This is to get correct SI and DI modes in libgcc2.c (32 and 64 bits). */
212 #define UNITS_PER_WORD 4
213 #else
214 /* Width of a word, in units (bytes). */
215 #define UNITS_PER_WORD 1
216 #endif
218 /* Width in bits of a pointer.
219 See also the macro `Pmode' defined below. */
220 #define POINTER_SIZE 16
223 /* Maximum sized of reasonable data type
224 DImode or Dfmode ... */
225 #define MAX_FIXED_MODE_SIZE 32
227 /* Allocation boundary (in *bits*) for storing arguments in argument list. */
228 #define PARM_BOUNDARY 8
230 /* Allocation boundary (in *bits*) for the code of a function. */
231 #define FUNCTION_BOUNDARY 8
233 /* Alignment of field after `int : 0' in a structure. */
234 #define EMPTY_FIELD_BOUNDARY 8
236 /* No data type wants to be aligned rounder than this. */
237 #define BIGGEST_ALIGNMENT 8
240 /* Define this if move instructions will actually fail to work
241 when given unaligned data. */
242 #define STRICT_ALIGNMENT 0
244 /* A C expression for the size in bits of the type `int' on the
245 target machine. If you don't define this, the default is one word. */
246 #define INT_TYPE_SIZE (TARGET_INT8 ? 8 : 16)
249 /* A C expression for the size in bits of the type `short' on the
250 target machine. If you don't define this, the default is half a
251 word. (If this would be less than one storage unit, it is rounded
252 up to one unit.) */
253 #define SHORT_TYPE_SIZE (INT_TYPE_SIZE == 8 ? INT_TYPE_SIZE : 16)
255 /* A C expression for the size in bits of the type `long' on the
256 target machine. If you don't define this, the default is one word. */
257 #define LONG_TYPE_SIZE (INT_TYPE_SIZE == 8 ? 16 : 32)
259 #define MAX_LONG_TYPE_SIZE 32
260 /* Maximum number for the size in bits of the type `long' on the
261 target machine. If this is undefined, the default is
262 `LONG_TYPE_SIZE'. Otherwise, it is the constant value that is the
263 largest value that `LONG_TYPE_SIZE' can have at run-time. This is
264 used in `cpp'. */
267 #define LONG_LONG_TYPE_SIZE 64
268 /* A C expression for the size in bits of the type `long long' on the
269 target machine. If you don't define this, the default is two
270 words. If you want to support GNU Ada on your machine, the value
271 of macro must be at least 64. */
274 #define CHAR_TYPE_SIZE 8
275 /* A C expression for the size in bits of the type `char' on the
276 target machine. If you don't define this, the default is one
277 quarter of a word. (If this would be less than one storage unit,
278 it is rounded up to one unit.) */
280 #define FLOAT_TYPE_SIZE 32
281 /* A C expression for the size in bits of the type `float' on the
282 target machine. If you don't define this, the default is one word. */
284 #define DOUBLE_TYPE_SIZE 32
285 /* A C expression for the size in bits of the type `double' on the
286 target machine. If you don't define this, the default is two
287 words. */
290 #define LONG_DOUBLE_TYPE_SIZE 32
291 /* A C expression for the size in bits of the type `long double' on
292 the target machine. If you don't define this, the default is two
293 words. */
295 #define DEFAULT_SIGNED_CHAR 1
296 /* An expression whose value is 1 or 0, according to whether the type
297 `char' should be signed or unsigned by default. The user can
298 always override this default with the options `-fsigned-char' and
299 `-funsigned-char'. */
301 /* `DEFAULT_SHORT_ENUMS'
302 A C expression to determine whether to give an `enum' type only as
303 many bytes as it takes to represent the range of possible values
304 of that type. A nonzero value means to do that; a zero value
305 means all `enum' types should be allocated like `int'.
307 If you don't define the macro, the default is 0. */
309 #define SIZE_TYPE (INT_TYPE_SIZE == 8 ? "long unsigned int" : "unsigned int")
310 /* A C expression for a string describing the name of the data type
311 to use for size values. The typedef name `size_t' is defined
312 using the contents of the string.
314 The string can contain more than one keyword. If so, separate
315 them with spaces, and write first any length keyword, then
316 `unsigned' if appropriate, and finally `int'. The string must
317 exactly match one of the data type names defined in the function
318 `init_decl_processing' in the file `c-decl.c'. You may not omit
319 `int' or change the order--that would cause the compiler to crash
320 on startup.
322 If you don't define this macro, the default is `"long unsigned
323 int"'. */
325 #define PTRDIFF_TYPE (INT_TYPE_SIZE == 8 ? "long int" :"int")
326 /* A C expression for a string describing the name of the data type
327 to use for the result of subtracting two pointers. The typedef
328 name `ptrdiff_t' is defined using the contents of the string. See
329 `SIZE_TYPE' above for more information.
331 If you don't define this macro, the default is `"long int"'. */
334 #define WCHAR_TYPE_SIZE 16
335 /* A C expression for the size in bits of the data type for wide
336 characters. This is used in `cpp', which cannot make use of
337 `WCHAR_TYPE'. */
339 #define FIRST_PSEUDO_REGISTER 36
340 /* Number of hardware registers known to the compiler. They receive
341 numbers 0 through `FIRST_PSEUDO_REGISTER-1'; thus, the first
342 pseudo register's number really is assigned the number
343 `FIRST_PSEUDO_REGISTER'. */
345 #define FIXED_REGISTERS {\
346 1,1,/* r0 r1 */\
347 0,0,/* r2 r3 */\
348 0,0,/* r4 r5 */\
349 0,0,/* r6 r7 */\
350 0,0,/* r8 r9 */\
351 0,0,/* r10 r11 */\
352 0,0,/* r12 r13 */\
353 0,0,/* r14 r15 */\
354 0,0,/* r16 r17 */\
355 0,0,/* r18 r19 */\
356 0,0,/* r20 r21 */\
357 0,0,/* r22 r23 */\
358 0,0,/* r24 r25 */\
359 0,0,/* r26 r27 */\
360 0,0,/* r28 r29 */\
361 0,0,/* r30 r31 */\
362 1,1,/* STACK */\
363 1,1 /* arg pointer */ }
364 /* An initializer that says which registers are used for fixed
365 purposes all throughout the compiled code and are therefore not
366 available for general allocation. These would include the stack
367 pointer, the frame pointer (except on machines where that can be
368 used as a general register when no frame pointer is needed), the
369 program counter on machines where that is considered one of the
370 addressable registers, and any other numbered register with a
371 standard use.
373 This information is expressed as a sequence of numbers, separated
374 by commas and surrounded by braces. The Nth number is 1 if
375 register N is fixed, 0 otherwise.
377 The table initialized from this macro, and the table initialized by
378 the following one, may be overridden at run time either
379 automatically, by the actions of the macro
380 `CONDITIONAL_REGISTER_USAGE', or by the user with the command
381 options `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG'. */
383 #define CALL_USED_REGISTERS { \
384 1,1,/* r0 r1 */ \
385 0,0,/* r2 r3 */ \
386 0,0,/* r4 r5 */ \
387 0,0,/* r6 r7 */ \
388 0,0,/* r8 r9 */ \
389 0,0,/* r10 r11 */ \
390 0,0,/* r12 r13 */ \
391 0,0,/* r14 r15 */ \
392 0,0,/* r16 r17 */ \
393 1,1,/* r18 r19 */ \
394 1,1,/* r20 r21 */ \
395 1,1,/* r22 r23 */ \
396 1,1,/* r24 r25 */ \
397 1,1,/* r26 r27 */ \
398 0,0,/* r28 r29 */ \
399 1,1,/* r30 r31 */ \
400 1,1,/* STACK */ \
401 1,1 /* arg pointer */ }
402 /* Like `FIXED_REGISTERS' but has 1 for each register that is
403 clobbered (in general) by function calls as well as for fixed
404 registers. This macro therefore identifies the registers that are
405 not available for general allocation of values that must live
406 across function calls.
408 If a register has 0 in `CALL_USED_REGISTERS', the compiler
409 automatically saves it on function entry and restores it on
410 function exit, if the register is used within the function. */
412 #define NON_SAVING_SETJMP 0
413 /* If this macro is defined and has a nonzero value, it means that
414 `setjmp' and related functions fail to save the registers, or that
415 `longjmp' fails to restore them. To compensate, the compiler
416 avoids putting variables in registers in functions that use
417 `setjmp'. */
419 #define REG_ALLOC_ORDER { \
420 24,25, \
421 18,19, \
422 20,21, \
423 22,23, \
424 30,31, \
425 26,27, \
426 28,29, \
427 17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2, \
428 0,1, \
429 32,33,34,35 \
431 /* If defined, an initializer for a vector of integers, containing the
432 numbers of hard registers in the order in which GNU CC should
433 prefer to use them (from most preferred to least).
435 If this macro is not defined, registers are used lowest numbered
436 first (all else being equal).
438 One use of this macro is on machines where the highest numbered
439 registers must always be saved and the save-multiple-registers
440 instruction supports only sequences of consetionve registers. On
441 such machines, define `REG_ALLOC_ORDER' to be an initializer that
442 lists the highest numbered allocatable register first. */
444 #define ORDER_REGS_FOR_LOCAL_ALLOC order_regs_for_local_alloc ()
445 /* ORDER_REGS_FOR_LOCAL_ALLOC'
446 A C statement (sans semicolon) to choose the order in which to
447 allocate hard registers for pseudo-registers local to a basic
448 block.
450 Store the desired register order in the array `reg_alloc_order'.
451 Element 0 should be the register to allocate first; element 1, the
452 next register; and so on.
454 The macro body should not assume anything about the contents of
455 `reg_alloc_order' before execution of the macro.
457 On most machines, it is not necessary to define this macro. */
460 #define HARD_REGNO_NREGS(REGNO, MODE) ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
462 /* A C expression for the number of consecutive hard registers,
463 starting at register number REGNO, required to hold a value of mode
464 MODE.
466 On a machine where all registers are exactly one word, a suitable
467 definition of this macro is
469 #define HARD_REGNO_NREGS(REGNO, MODE) \
470 ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) \
471 / UNITS_PER_WORD)) */
473 #define HARD_REGNO_MODE_OK(REGNO, MODE) avr_hard_regno_mode_ok(REGNO, MODE)
474 /* A C expression that is nonzero if it is permissible to store a
475 value of mode MODE in hard register number REGNO (or in several
476 registers starting with that one). For a machine where all
477 registers are equivalent, a suitable definition is
479 #define HARD_REGNO_MODE_OK(REGNO, MODE) 1
481 It is not necessary for this macro to check for the numbers of
482 fixed registers, because the allocation mechanism considers them
483 to be always occupied.
485 On some machines, double-precision values must be kept in even/odd
486 register pairs. The way to implement that is to define this macro
487 to reject odd register numbers for such modes.
489 The minimum requirement for a mode to be OK in a register is that
490 the `movMODE' instruction pattern support moves between the
491 register and any other hard register for which the mode is OK; and
492 that moving a value into the register and back out not alter it.
494 Since the same instruction used to move `SImode' will work for all
495 narrower integer modes, it is not necessary on any machine for
496 `HARD_REGNO_MODE_OK' to distinguish between these modes, provided
497 you define patterns `movhi', etc., to take advantage of this. This
498 is useful because of the interaction between `HARD_REGNO_MODE_OK'
499 and `MODES_TIEABLE_P'; it is very desirable for all integer modes
500 to be tieable.
502 Many machines have special registers for floating point arithmetic.
503 Often people assume that floating point machine modes are allowed
504 only in floating point registers. This is not true. Any
505 registers that can hold integers can safely *hold* a floating
506 point machine mode, whether or not floating arithmetic can be done
507 on it in those registers. Integer move instructions can be used
508 to move the values.
510 On some machines, though, the converse is true: fixed-point machine
511 modes may not go in floating registers. This is true if the
512 floating registers normalize any value stored in them, because
513 storing a non-floating value there would garble it. In this case,
514 `HARD_REGNO_MODE_OK' should reject fixed-point machine modes in
515 floating registers. But if the floating registers do not
516 automatically normalize, if you can store any bit pattern in one
517 and retrieve it unchanged without a trap, then any machine mode
518 may go in a floating register, so you can define this macro to say
521 The primary significance of special floating registers is rather
522 that they are the registers acceptable in floating point arithmetic
523 instructions. However, this is of no concern to
524 `HARD_REGNO_MODE_OK'. You handle it by writing the proper
525 constraints for those instructions.
527 On some machines, the floating registers are especially slow to
528 access, so that it is better to store a value in a stack frame
529 than in such a register if floating point arithmetic is not being
530 done. As long as the floating registers are not in class
531 `GENERAL_REGS', they will not be used unless some pattern's
532 constraint asks for one. */
534 #define MODES_TIEABLE_P(MODE1, MODE2) 0
535 /* A C expression that is nonzero if it is desirable to choose
536 register allocation so as to avoid move instructions between a
537 value of mode MODE1 and a value of mode MODE2.
539 If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R,
540 MODE2)' are ever different for any R, then `MODES_TIEABLE_P (MODE1,
541 MODE2)' must be zero. */
543 enum reg_class {
544 NO_REGS,
545 R0_REG, /* r0 */
546 POINTER_X_REGS, /* r26 - r27 */
547 POINTER_Y_REGS, /* r28 - r29 */
548 POINTER_Z_REGS, /* r30 - r31 */
549 STACK_REG, /* STACK */
550 BASE_POINTER_REGS, /* r28 - r31 */
551 POINTER_REGS, /* r26 - r31 */
552 ADDW_REGS, /* r24 - r31 */
553 SIMPLE_LD_REGS, /* r16 - r23 */
554 LD_REGS, /* r16 - r31 */
555 NO_LD_REGS, /* r0 - r15 */
556 GENERAL_REGS, /* r0 - r31 */
557 ALL_REGS, LIM_REG_CLASSES
559 /* An enumeral type that must be defined with all the register class
560 names as enumeral values. `NO_REGS' must be first. `ALL_REGS'
561 must be the last register class, followed by one more enumeral
562 value, `LIM_REG_CLASSES', which is not a register class but rather
563 tells how many classes there are.
565 Each register class has a number, which is the value of casting
566 the class name to type `int'. The number serves as an index in
567 many of the tables described below. */
570 #define N_REG_CLASSES (int)LIM_REG_CLASSES
571 /* The number of distinct register classes, defined as follows:
573 #define N_REG_CLASSES (int) LIM_REG_CLASSES */
575 #define REG_CLASS_NAMES { \
576 "NO_REGS", \
577 "R0_REG", /* r0 */ \
578 "POINTER_X_REGS", /* r26 - r27 */ \
579 "POINTER_Y_REGS", /* r28 - r29 */ \
580 "POINTER_Z_REGS", /* r30 - r31 */ \
581 "STACK_REG", /* STACK */ \
582 "BASE_POINTER_REGS", /* r28 - r31 */ \
583 "POINTER_REGS", /* r26 - r31 */ \
584 "ADDW_REGS", /* r24 - r31 */ \
585 "SIMPLE_LD_REGS", /* r16 - r23 */ \
586 "LD_REGS", /* r16 - r31 */ \
587 "NO_LD_REGS", /* r0 - r15 */ \
588 "GENERAL_REGS", /* r0 - r31 */ \
589 "ALL_REGS" }
590 /* An initializer containing the names of the register classes as C
591 string constants. These names are used in writing some of the
592 debugging dumps. */
594 #define REG_X 26
595 #define REG_Y 28
596 #define REG_Z 30
597 #define REG_W 24
599 #define REG_CLASS_CONTENTS { \
600 {0x00000000,0x00000000}, /* NO_REGS */ \
601 {0x00000001,0x00000000}, /* R0_REG */ \
602 {3 << REG_X,0x00000000}, /* POINTER_X_REGS, r26 - r27 */ \
603 {3 << REG_Y,0x00000000}, /* POINTER_Y_REGS, r28 - r29 */ \
604 {3 << REG_Z,0x00000000}, /* POINTER_Z_REGS, r30 - r31 */ \
605 {0x00000000,0x00000003}, /* STACK_REG, STACK */ \
606 {(3 << REG_Y) | (3 << REG_Z), \
607 0x00000000}, /* BASE_POINTER_REGS, r28 - r31 */ \
608 {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z), \
609 0x00000000}, /* POINTER_REGS, r26 - r31 */ \
610 {(3 << REG_X) | (3 << REG_Y) | (3 << REG_Z) | (3 << REG_W), \
611 0x00000000}, /* ADDW_REGS, r24 - r31 */ \
612 {0x00ff0000,0x00000000}, /* SIMPLE_LD_REGS r16 - r23 */ \
613 {(3 << REG_X)|(3 << REG_Y)|(3 << REG_Z)|(3 << REG_W)|(0xff << 16), \
614 0x00000000}, /* LD_REGS, r16 - r31 */ \
615 {0x0000ffff,0x00000000}, /* NO_LD_REGS r0 - r15 */ \
616 {0xffffffffu,0x00000000}, /* GENERAL_REGS, r0 - r31 */ \
617 {0xffffffffu,0x00000003} /* ALL_REGS */ \
619 /* An initializer containing the contents of the register classes, as
620 integers which are bit masks. The Nth integer specifies the
621 contents of class N. The way the integer MASK is interpreted is
622 that register R is in the class if `MASK & (1 << R)' is 1.
624 When the machine has more than 32 registers, an integer does not
625 suffice. Then the integers are replaced by sub-initializers,
626 braced groupings containing several integers. Each
627 sub-initializer must be suitable as an initializer for the type
628 `HARD_REG_SET' which is defined in `hard-reg-set.h'. */
630 #define REGNO_REG_CLASS(R) avr_regno_reg_class(R)
631 /* A C expression whose value is a register class containing hard
632 register REGNO. In general there is more than one such class;
633 choose a class which is "minimal", meaning that no smaller class
634 also contains the register. */
636 #define BASE_REG_CLASS POINTER_REGS
637 /* A macro whose definition is the name of the class to which a valid
638 base register must belong. A base register is one used in an
639 address which is the register value plus a displacement. */
641 #define INDEX_REG_CLASS NO_REGS
642 /* A macro whose definition is the name of the class to which a valid
643 index register must belong. An index register is one used in an
644 address where its value is either multiplied by a scale factor or
645 added to another register (as well as added to a displacement). */
647 #define REG_CLASS_FROM_LETTER(C) avr_reg_class_from_letter(C)
648 /* A C expression which defines the machine-dependent operand
649 constraint letters for register classes. If CHAR is such a
650 letter, the value should be the register class corresponding to
651 it. Otherwise, the value should be `NO_REGS'. The register
652 letter `r', corresponding to class `GENERAL_REGS', will not be
653 passed to this macro; you do not need to handle it. */
655 #define REGNO_OK_FOR_BASE_P(r) (((r) < FIRST_PSEUDO_REGISTER \
656 && ((r) == REG_X \
657 || (r) == REG_Y \
658 || (r) == REG_Z \
659 || (r) == ARG_POINTER_REGNUM)) \
660 || (reg_renumber \
661 && (reg_renumber[r] == REG_X \
662 || reg_renumber[r] == REG_Y \
663 || reg_renumber[r] == REG_Z \
664 || (reg_renumber[r] \
665 == ARG_POINTER_REGNUM))))
666 /* A C expression which is nonzero if register number NUM is suitable
667 for use as a base register in operand addresses. It may be either
668 a suitable hard register or a pseudo register that has been
669 allocated such a hard register. */
671 /* #define REGNO_MODE_OK_FOR_BASE_P(r, m) regno_mode_ok_for_base_p(r, m)
672 A C expression that is just like `REGNO_OK_FOR_BASE_P', except that
673 that expression may examine the mode of the memory reference in
674 MODE. You should define this macro if the mode of the memory
675 reference affects whether a register may be used as a base
676 register. If you define this macro, the compiler will use it
677 instead of `REGNO_OK_FOR_BASE_P'. */
679 #define REGNO_OK_FOR_INDEX_P(NUM) 0
680 /* A C expression which is nonzero if register number NUM is suitable
681 for use as an index register in operand addresses. It may be
682 either a suitable hard register or a pseudo register that has been
683 allocated such a hard register.
685 The difference between an index register and a base register is
686 that the index register may be scaled. If an address involves the
687 sum of two registers, neither one of them scaled, then either one
688 may be labeled the "base" and the other the "index"; but whichever
689 labeling is used must fit the machine's constraints of which
690 registers may serve in each capacity. The compiler will try both
691 labelings, looking for one that is valid, and will reload one or
692 both registers only if neither labeling works. */
694 #define PREFERRED_RELOAD_CLASS(X, CLASS) preferred_reload_class(X,CLASS)
695 /* A C expression that places additional restrictions on the register
696 class to use when it is necessary to copy value X into a register
697 in class CLASS. The value is a register class; perhaps CLASS, or
698 perhaps another, smaller class. On many machines, the following
699 definition is safe:
701 #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS
703 Sometimes returning a more restrictive class makes better code.
704 For example, on the 68000, when X is an integer constant that is
705 in range for a `moveq' instruction, the value of this macro is
706 always `DATA_REGS' as long as CLASS includes the data registers.
707 Requiring a data register guarantees that a `moveq' will be used.
709 If X is a `const_double', by returning `NO_REGS' you can force X
710 into a memory constant. This is useful on certain machines where
711 immediate floating values cannot be loaded into certain kinds of
712 registers. */
713 /* `PREFERRED_OUTPUT_RELOAD_CLASS (X, CLASS)'
714 Like `PREFERRED_RELOAD_CLASS', but for output reloads instead of
715 input reloads. If you don't define this macro, the default is to
716 use CLASS, unchanged. */
718 /* `LIMIT_RELOAD_CLASS (MODE, CLASS)'
719 A C expression that places additional restrictions on the register
720 class to use when it is necessary to be able to hold a value of
721 mode MODE in a reload register for which class CLASS would
722 ordinarily be used.
724 Unlike `PREFERRED_RELOAD_CLASS', this macro should be used when
725 there are certain modes that simply can't go in certain reload
726 classes.
728 The value is a register class; perhaps CLASS, or perhaps another,
729 smaller class.
731 Don't define this macro unless the target machine has limitations
732 which require the macro to do something nontrivial. */
734 /* SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X)
735 `SECONDARY_RELOAD_CLASS (CLASS, MODE, X)'
736 `SECONDARY_OUTPUT_RELOAD_CLASS (CLASS, MODE, X)'
737 Many machines have some registers that cannot be copied directly
738 to or from memory or even from other types of registers. An
739 example is the `MQ' register, which on most machines, can only be
740 copied to or from general registers, but not memory. Some
741 machines allow copying all registers to and from memory, but
742 require a scratch register for stores to some memory locations
743 (e.g., those with symbolic address on the RT, and those with
744 certain symbolic address on the Sparc when compiling PIC). In
745 some cases, both an intermediate and a scratch register are
746 required.
748 You should define these macros to indicate to the reload phase
749 that it may need to allocate at least one register for a reload in
750 addition to the register to contain the data. Specifically, if
751 copying X to a register CLASS in MODE requires an intermediate
752 register, you should define `SECONDARY_INPUT_RELOAD_CLASS' to
753 return the largest register class all of whose registers can be
754 used as intermediate registers or scratch registers.
756 If copying a register CLASS in MODE to X requires an intermediate
757 or scratch register, `SECONDARY_OUTPUT_RELOAD_CLASS' should be
758 defined to return the largest register class required. If the
759 requirements for input and output reloads are the same, the macro
760 `SECONDARY_RELOAD_CLASS' should be used instead of defining both
761 macros identically.
763 The values returned by these macros are often `GENERAL_REGS'.
764 Return `NO_REGS' if no spare register is needed; i.e., if X can be
765 directly copied to or from a register of CLASS in MODE without
766 requiring a scratch register. Do not define this macro if it
767 would always return `NO_REGS'.
769 If a scratch register is required (either with or without an
770 intermediate register), you should define patterns for
771 `reload_inM' or `reload_outM', as required (*note Standard
772 Names::.. These patterns, which will normally be implemented with
773 a `define_expand', should be similar to the `movM' patterns,
774 except that operand 2 is the scratch register.
776 Define constraints for the reload register and scratch register
777 that contain a single register class. If the original reload
778 register (whose class is CLASS) can meet the constraint given in
779 the pattern, the value returned by these macros is used for the
780 class of the scratch register. Otherwise, two additional reload
781 registers are required. Their classes are obtained from the
782 constraints in the insn pattern.
784 X might be a pseudo-register or a `subreg' of a pseudo-register,
785 which could either be in a hard register or in memory. Use
786 `true_regnum' to find out; it will return -1 if the pseudo is in
787 memory and the hard register number if it is in a register.
789 These macros should not be used in the case where a particular
790 class of registers can only be copied to memory and not to another
791 class of registers. In that case, secondary reload registers are
792 not needed and would not be helpful. Instead, a stack location
793 must be used to perform the copy and the `movM' pattern should use
794 memory as a intermediate storage. This case often occurs between
795 floating-point and general registers. */
797 /* `SECONDARY_MEMORY_NEEDED (CLASS1, CLASS2, M)'
798 Certain machines have the property that some registers cannot be
799 copied to some other registers without using memory. Define this
800 macro on those machines to be a C expression that is non-zero if
801 objects of mode M in registers of CLASS1 can only be copied to
802 registers of class CLASS2 by storing a register of CLASS1 into
803 memory and loading that memory location into a register of CLASS2.
805 Do not define this macro if its value would always be zero.
807 `SECONDARY_MEMORY_NEEDED_RTX (MODE)'
808 Normally when `SECONDARY_MEMORY_NEEDED' is defined, the compiler
809 allocates a stack slot for a memory location needed for register
810 copies. If this macro is defined, the compiler instead uses the
811 memory location defined by this macro.
813 Do not define this macro if you do not define
814 `SECONDARY_MEMORY_NEEDED'. */
816 #define SMALL_REGISTER_CLASSES 1
817 /* Normally the compiler avoids choosing registers that have been
818 explicitly mentioned in the rtl as spill registers (these
819 registers are normally those used to pass parameters and return
820 values). However, some machines have so few registers of certain
821 classes that there would not be enough registers to use as spill
822 registers if this were done.
824 Define `SMALL_REGISTER_CLASSES' to be an expression with a non-zero
825 value on these machines. When this macro has a non-zero value, the
826 compiler allows registers explicitly used in the rtl to be used as
827 spill registers but avoids extending the lifetime of these
828 registers.
830 It is always safe to define this macro with a non-zero value, but
831 if you unnecessarily define it, you will reduce the amount of
832 optimizations that can be performed in some cases. If you do not
833 define this macro with a non-zero value when it is required, the
834 compiler will run out of spill registers and print a fatal error
835 message. For most machines, you should not define this macro at
836 all. */
838 #define CLASS_LIKELY_SPILLED_P(c) class_likely_spilled_p(c)
839 /* A C expression whose value is nonzero if pseudos that have been
840 assigned to registers of class CLASS would likely be spilled
841 because registers of CLASS are needed for spill registers.
843 The default value of this macro returns 1 if CLASS has exactly one
844 register and zero otherwise. On most machines, this default
845 should be used. Only define this macro to some other expression
846 if pseudo allocated by `local-alloc.c' end up in memory because
847 their hard registers were needed for spill registers. If this
848 macro returns nonzero for those classes, those pseudos will only
849 be allocated by `global.c', which knows how to reallocate the
850 pseudo to another register. If there would not be another
851 register available for reallocation, you should not change the
852 definition of this macro since the only effect of such a
853 definition would be to slow down register allocation. */
855 #define CLASS_MAX_NREGS(CLASS, MODE) class_max_nregs (CLASS, MODE)
856 /* A C expression for the maximum number of consecutive registers of
857 class CLASS needed to hold a value of mode MODE.
859 This is closely related to the macro `HARD_REGNO_NREGS'. In fact,
860 the value of the macro `CLASS_MAX_NREGS (CLASS, MODE)' should be
861 the maximum value of `HARD_REGNO_NREGS (REGNO, MODE)' for all
862 REGNO values in the class CLASS.
864 This macro helps control the handling of multiple-word values in
865 the reload pass. */
867 #define CONST_OK_FOR_LETTER_P(VALUE, C) \
868 ((C) == 'I' ? (VALUE) >= 0 && (VALUE) <= 63 : \
869 (C) == 'J' ? (VALUE) <= 0 && (VALUE) >= -63: \
870 (C) == 'K' ? (VALUE) == 2 : \
871 (C) == 'L' ? (VALUE) == 0 : \
872 (C) == 'M' ? (VALUE) >= 0 && (VALUE) <= 0xff : \
873 (C) == 'N' ? (VALUE) == -1: \
874 (C) == 'O' ? (VALUE) == 8 || (VALUE) == 16 || (VALUE) == 24: \
875 (C) == 'P' ? (VALUE) == 1 : \
878 /* A C expression that defines the machine-dependent operand
879 constraint letters (`I', `J', `K', ... `P') that specify
880 particular ranges of integer values. If C is one of those
881 letters, the expression should check that VALUE, an integer, is in
882 the appropriate range and return 1 if so, 0 otherwise. If C is
883 not one of those letters, the value should be 0 regardless of
884 VALUE. */
886 #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \
887 ((C) == 'G' ? (VALUE) == CONST0_RTX (SFmode) \
888 : 0)
889 /* `CONST_DOUBLE_OK_FOR_LETTER_P (VALUE, C)'
890 A C expression that defines the machine-dependent operand
891 constraint letters that specify particular ranges of
892 `const_double' values (`G' or `H').
894 If C is one of those letters, the expression should check that
895 VALUE, an RTX of code `const_double', is in the appropriate range
896 and return 1 if so, 0 otherwise. If C is not one of those
897 letters, the value should be 0 regardless of VALUE.
899 `const_double' is used for all floating-point constants and for
900 `DImode' fixed-point constants. A given letter can accept either
901 or both kinds of values. It can use `GET_MODE' to distinguish
902 between these kinds. */
904 #define EXTRA_CONSTRAINT(x, c) extra_constraint(x, c)
905 /* A C expression that defines the optional machine-dependent
906 constraint letters (``Q', `R', `S', `T', `U') that can'
907 be used to segregate specific types of operands, usually memory
908 references, for the target machine. Normally this macro will not
909 be defined. If it is required for a particular target machine, it
910 should return 1 if VALUE corresponds to the operand type
911 represented by the constraint letter C. If C is not defined as an
912 extra constraint, the value returned should be 0 regardless of
913 VALUE.
915 For example, on the ROMP, load instructions cannot have their
916 output in r0 if the memory reference contains a symbolic address.
917 Constraint letter `Q' is defined as representing a memory address
918 that does *not* contain a symbolic address. An alternative is
919 specified with a `Q' constraint on the input and `r' on the
920 output. The next alternative specifies `m' on the input and a
921 register class that does not include r0 on the output. */
923 /* This is an undocumented variable which describes
924 how GCC will push a data */
925 #define STACK_PUSH_CODE POST_DEC
927 #define STACK_GROWS_DOWNWARD
928 /* Define this macro if pushing a word onto the stack moves the stack
929 pointer to a smaller address.
931 When we say, "define this macro if ...," it means that the
932 compiler checks this macro only with `#ifdef' so the precise
933 definition used does not matter. */
935 #define STARTING_FRAME_OFFSET 1
936 /* Offset from the frame pointer to the first local variable slot to
937 be allocated.
939 If `FRAME_GROWS_DOWNWARD', find the next slot's offset by
940 subtracting the first slot's length from `STARTING_FRAME_OFFSET'.
941 Otherwise, it is found by adding the length of the first slot to
942 the value `STARTING_FRAME_OFFSET'. */
944 #define STACK_POINTER_OFFSET 1
945 /* Offset from the stack pointer register to the first location at
946 which outgoing arguments are placed. If not specified, the
947 default value of zero is used. This is the proper value for most
948 machines.
950 If `ARGS_GROW_DOWNWARD', this is the offset to the location above
951 the first location at which outgoing arguments are placed. */
953 #define FIRST_PARM_OFFSET(FUNDECL) 0
954 /* Offset from the argument pointer register to the first argument's
955 address. On some machines it may depend on the data type of the
956 function.
958 If `ARGS_GROW_DOWNWARD', this is the offset to the location above
959 the first argument's address. */
961 /* `STACK_DYNAMIC_OFFSET (FUNDECL)'
962 Offset from the stack pointer register to an item dynamically
963 allocated on the stack, e.g., by `alloca'.
965 The default value for this macro is `STACK_POINTER_OFFSET' plus the
966 length of the outgoing arguments. The default is correct for most
967 machines. See `function.c' for details. */
969 #define STACK_BOUNDARY 8
970 /* Define this macro if there is a guaranteed alignment for the stack
971 pointer on this machine. The definition is a C expression for the
972 desired alignment (measured in bits). This value is used as a
973 default if PREFERRED_STACK_BOUNDARY is not defined. */
975 #define STACK_POINTER_REGNUM 32
976 /* The register number of the stack pointer register, which must also
977 be a fixed register according to `FIXED_REGISTERS'. On most
978 machines, the hardware determines which register this is. */
980 #define FRAME_POINTER_REGNUM REG_Y
981 /* The register number of the frame pointer register, which is used to
982 access automatic variables in the stack frame. On some machines,
983 the hardware determines which register this is. On other
984 machines, you can choose any register you wish for this purpose. */
986 #define ARG_POINTER_REGNUM 34
987 /* The register number of the arg pointer register, which is used to
988 access the function's argument list. On some machines, this is
989 the same as the frame pointer register. On some machines, the
990 hardware determines which register this is. On other machines,
991 you can choose any register you wish for this purpose. If this is
992 not the same register as the frame pointer register, then you must
993 mark it as a fixed register according to `FIXED_REGISTERS', or
994 arrange to be able to eliminate it (*note Elimination::.). */
996 #define STATIC_CHAIN_REGNUM 2
997 /* Register numbers used for passing a function's static chain
998 pointer. If register windows are used, the register number as
999 seen by the called function is `STATIC_CHAIN_INCOMING_REGNUM',
1000 while the register number as seen by the calling function is
1001 `STATIC_CHAIN_REGNUM'. If these registers are the same,
1002 `STATIC_CHAIN_INCOMING_REGNUM' need not be defined.
1004 The static chain register need not be a fixed register.
1006 If the static chain is passed in memory, these macros should not be
1007 defined; instead, the next two macros should be defined. */
1009 #define FRAME_POINTER_REQUIRED frame_pointer_required_p()
1010 /* A C expression which is nonzero if a function must have and use a
1011 frame pointer. This expression is evaluated in the reload pass.
1012 If its value is nonzero the function will have a frame pointer.
1014 The expression can in principle examine the current function and
1015 decide according to the facts, but on most machines the constant 0
1016 or the constant 1 suffices. Use 0 when the machine allows code to
1017 be generated with no frame pointer, and doing so saves some time
1018 or space. Use 1 when there is no possible advantage to avoiding a
1019 frame pointer.
1021 In certain cases, the compiler does not know how to produce valid
1022 code without a frame pointer. The compiler recognizes those cases
1023 and automatically gives the function a frame pointer regardless of
1024 what `FRAME_POINTER_REQUIRED' says. You don't need to worry about
1025 them.
1027 In a function that does not require a frame pointer, the frame
1028 pointer register can be allocated for ordinary usage, unless you
1029 mark it as a fixed register. See `FIXED_REGISTERS' for more
1030 information. */
1032 #define ELIMINABLE_REGS { \
1033 {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \
1034 {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM} \
1035 ,{FRAME_POINTER_REGNUM+1,STACK_POINTER_REGNUM+1}}
1036 /* If defined, this macro specifies a table of register pairs used to
1037 eliminate unneeded registers that point into the stack frame. If
1038 it is not defined, the only elimination attempted by the compiler
1039 is to replace references to the frame pointer with references to
1040 the stack pointer.
1042 The definition of this macro is a list of structure
1043 initializations, each of which specifies an original and
1044 replacement register.
1046 On some machines, the position of the argument pointer is not
1047 known until the compilation is completed. In such a case, a
1048 separate hard register must be used for the argument pointer.
1049 This register can be eliminated by replacing it with either the
1050 frame pointer or the argument pointer, depending on whether or not
1051 the frame pointer has been eliminated.
1053 In this case, you might specify:
1054 #define ELIMINABLE_REGS \
1055 {{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
1056 {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \
1057 {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}}
1059 Note that the elimination of the argument pointer with the stack
1060 pointer is specified first since that is the preferred elimination. */
1062 #define CAN_ELIMINATE(FROM, TO) (((FROM) == ARG_POINTER_REGNUM \
1063 && (TO) == FRAME_POINTER_REGNUM) \
1064 || (((FROM) == FRAME_POINTER_REGNUM \
1065 || (FROM) == FRAME_POINTER_REGNUM+1) \
1066 && ! FRAME_POINTER_REQUIRED \
1068 /* A C expression that returns non-zero if the compiler is allowed to
1069 try to replace register number FROM-REG with register number
1070 TO-REG. This macro need only be defined if `ELIMINABLE_REGS' is
1071 defined, and will usually be the constant 1, since most of the
1072 cases preventing register elimination are things that the compiler
1073 already knows about. */
1075 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
1076 OFFSET = initial_elimination_offset (FROM, TO)
1077 /* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'. It
1078 specifies the initial difference between the specified pair of
1079 registers. This macro must be defined if `ELIMINABLE_REGS' is
1080 defined. */
1082 #define RETURN_ADDR_RTX(count, x) \
1083 gen_rtx_MEM (Pmode, memory_address (Pmode, plus_constant (tem, 1)))
1085 #define PUSH_ROUNDING(NPUSHED) (NPUSHED)
1086 /* A C expression that is the number of bytes actually pushed onto the
1087 stack when an instruction attempts to push NPUSHED bytes.
1089 If the target machine does not have a push instruction, do not
1090 define this macro. That directs GNU CC to use an alternate
1091 strategy: to allocate the entire argument block and then store the
1092 arguments into it.
1094 On some machines, the definition
1096 #define PUSH_ROUNDING(BYTES) (BYTES)
1098 will suffice. But on other machines, instructions that appear to
1099 push one byte actually push two bytes in an attempt to maintain
1100 alignment. Then the definition should be
1102 #define PUSH_ROUNDING(BYTES) (((BYTES) + 1) & ~1) */
1104 #define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACK_SIZE) 0
1105 /* A C expression that should indicate the number of bytes of its own
1106 arguments that a function pops on returning, or 0 if the function
1107 pops no arguments and the caller must therefore pop them all after
1108 the function returns.
1110 FUNDECL is a C variable whose value is a tree node that describes
1111 the function in question. Normally it is a node of type
1112 `FUNCTION_DECL' that describes the declaration of the function.
1113 From this you can obtain the DECL_MACHINE_ATTRIBUTES of the
1114 function.
1116 FUNTYPE is a C variable whose value is a tree node that describes
1117 the function in question. Normally it is a node of type
1118 `FUNCTION_TYPE' that describes the data type of the function.
1119 From this it is possible to obtain the data types of the value and
1120 arguments (if known).
1122 When a call to a library function is being considered, FUNDECL
1123 will contain an identifier node for the library function. Thus, if
1124 you need to distinguish among various library functions, you can
1125 do so by their names. Note that "library function" in this
1126 context means a function used to perform arithmetic, whose name is
1127 known specially in the compiler and was not mentioned in the C
1128 code being compiled.
1130 STACK-SIZE is the number of bytes of arguments passed on the
1131 stack. If a variable number of bytes is passed, it is zero, and
1132 argument popping will always be the responsibility of the calling
1133 function.
1135 On the Vax, all functions always pop their arguments, so the
1136 definition of this macro is STACK-SIZE. On the 68000, using the
1137 standard calling convention, no functions pop their arguments, so
1138 the value of the macro is always 0 in this case. But an
1139 alternative calling convention is available in which functions
1140 that take a fixed number of arguments pop them but other functions
1141 (such as `printf') pop nothing (the caller pops all). When this
1142 convention is in use, FUNTYPE is examined to determine whether a
1143 function takes a fixed number of arguments. */
1145 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) (function_arg (&(CUM), MODE, TYPE, NAMED))
1146 /* A C expression that controls whether a function argument is passed
1147 in a register, and which register.
1149 The arguments are CUM, which summarizes all the previous
1150 arguments; MODE, the machine mode of the argument; TYPE, the data
1151 type of the argument as a tree node or 0 if that is not known
1152 (which happens for C support library functions); and NAMED, which
1153 is 1 for an ordinary argument and 0 for nameless arguments that
1154 correspond to `...' in the called function's prototype.
1156 The value of the expression is usually either a `reg' RTX for the
1157 hard register in which to pass the argument, or zero to pass the
1158 argument on the stack.
1160 For machines like the Vax and 68000, where normally all arguments
1161 are pushed, zero suffices as a definition.
1163 The value of the expression can also be a `parallel' RTX. This is
1164 used when an argument is passed in multiple locations. The mode
1165 of the of the `parallel' should be the mode of the entire
1166 argument. The `parallel' holds any number of `expr_list' pairs;
1167 each one describes where part of the argument is passed. In each
1168 `expr_list', the first operand can be either a `reg' RTX for the
1169 hard register in which to pass this part of the argument, or zero
1170 to pass the argument on the stack. If this operand is a `reg',
1171 then the mode indicates how large this part of the argument is.
1172 The second operand of the `expr_list' is a `const_int' which gives
1173 the offset in bytes into the entire argument where this part
1174 starts.
1176 The usual way to make the ANSI library `stdarg.h' work on a machine
1177 where some arguments are usually passed in registers, is to cause
1178 nameless arguments to be passed on the stack instead. This is done
1179 by making `FUNCTION_ARG' return 0 whenever NAMED is 0.
1181 You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the
1182 definition of this macro to determine if this argument is of a
1183 type that must be passed in the stack. If `REG_PARM_STACK_SPACE'
1184 is not defined and `FUNCTION_ARG' returns non-zero for such an
1185 argument, the compiler will abort. If `REG_PARM_STACK_SPACE' is
1186 defined, the argument will be computed in the stack and then
1187 loaded into a register. */
1189 typedef struct avr_args {
1190 int nregs; /* # registers available for passing */
1191 int regno; /* next available register number */
1192 } CUMULATIVE_ARGS;
1193 /* A C type for declaring a variable that is used as the first
1194 argument of `FUNCTION_ARG' and other related values. For some
1195 target machines, the type `int' suffices and can hold the number
1196 of bytes of argument so far.
1198 There is no need to record in `CUMULATIVE_ARGS' anything about the
1199 arguments that have been passed on the stack. The compiler has
1200 other variables to keep track of that. For target machines on
1201 which all arguments are passed on the stack, there is no need to
1202 store anything in `CUMULATIVE_ARGS'; however, the data structure
1203 must exist and should not be empty, so use `int'. */
1205 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) init_cumulative_args (&(CUM), FNTYPE, LIBNAME, INDIRECT)
1207 /* A C statement (sans semicolon) for initializing the variable CUM
1208 for the state at the beginning of the argument list. The variable
1209 has type `CUMULATIVE_ARGS'. The value of FNTYPE is the tree node
1210 for the data type of the function which will receive the args, or 0
1211 if the args are to a compiler support library function. The value
1212 of INDIRECT is nonzero when processing an indirect call, for
1213 example a call through a function pointer. The value of INDIRECT
1214 is zero for a call to an explicitly named function, a library
1215 function call, or when `INIT_CUMULATIVE_ARGS' is used to find
1216 arguments for the function being compiled.
1218 When processing a call to a compiler support library function,
1219 LIBNAME identifies which one. It is a `symbol_ref' rtx which
1220 contains the name of the function, as a string. LIBNAME is 0 when
1221 an ordinary C function call is being processed. Thus, each time
1222 this macro is called, either LIBNAME or FNTYPE is nonzero, but
1223 never both of them at once. */
1225 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
1226 (function_arg_advance (&CUM, MODE, TYPE, NAMED))
1228 /* A C statement (sans semicolon) to update the summarizer variable
1229 CUM to advance past an argument in the argument list. The values
1230 MODE, TYPE and NAMED describe that argument. Once this is done,
1231 the variable CUM is suitable for analyzing the *following*
1232 argument with `FUNCTION_ARG', etc.
1234 This macro need not do anything if the argument in question was
1235 passed on the stack. The compiler knows how to track the amount
1236 of stack space used for arguments without any special help. */
1238 #define FUNCTION_ARG_REGNO_P(r) function_arg_regno_p(r)
1239 /* A C expression that is nonzero if REGNO is the number of a hard
1240 register in which function arguments are sometimes passed. This
1241 does *not* include implicit arguments such as the static chain and
1242 the structure-value address. On many machines, no registers can be
1243 used for this purpose since all function arguments are pushed on
1244 the stack. */
1246 extern int avr_reg_order[];
1248 #define RET_REGISTER avr_ret_register ()
1250 #define FUNCTION_VALUE(VALTYPE, FUNC) avr_function_value (VALTYPE, FUNC)
1251 /* A C expression to create an RTX representing the place where a
1252 function returns a value of data type VALTYPE. VALTYPE is a tree
1253 node representing a data type. Write `TYPE_MODE (VALTYPE)' to get
1254 the machine mode used to represent that type. On many machines,
1255 only the mode is relevant. (Actually, on most machines, scalar
1256 values are returned in the same place regardless of mode).
1258 The value of the expression is usually a `reg' RTX for the hard
1259 register where the return value is stored. The value can also be a
1260 `parallel' RTX, if the return value is in multiple places. See
1261 `FUNCTION_ARG' for an explanation of the `parallel' form.
1263 If `PROMOTE_FUNCTION_RETURN' is defined, you must apply the same
1264 promotion rules specified in `PROMOTE_MODE' if VALTYPE is a scalar
1265 type.
1267 If the precise function being called is known, FUNC is a tree node
1268 (`FUNCTION_DECL') for it; otherwise, FUNC is a null pointer. This
1269 makes it possible to use a different value-returning convention
1270 for specific functions when all their calls are known.
1272 `FUNCTION_VALUE' is not used for return vales with aggregate data
1273 types, because these are returned in another way. See
1274 `STRUCT_VALUE_REGNUM' and related macros, below. */
1276 #define LIBCALL_VALUE(MODE) avr_libcall_value (MODE)
1277 /* A C expression to create an RTX representing the place where a
1278 library function returns a value of mode MODE. If the precise
1279 function being called is known, FUNC is a tree node
1280 (`FUNCTION_DECL') for it; otherwise, FUNC is a null pointer. This
1281 makes it possible to use a different value-returning convention
1282 for specific functions when all their calls are known.
1284 Note that "library function" in this context means a compiler
1285 support routine, used to perform arithmetic, whose name is known
1286 specially by the compiler and was not mentioned in the C code being
1287 compiled.
1289 The definition of `LIBRARY_VALUE' need not be concerned aggregate
1290 data types, because none of the library functions returns such
1291 types. */
1293 #define FUNCTION_VALUE_REGNO_P(N) ((N) == RET_REGISTER)
1294 /* A C expression that is nonzero if REGNO is the number of a hard
1295 register in which the values of called function may come back.
1297 A register whose use for returning values is limited to serving as
1298 the second of a pair (for a value of type `double', say) need not
1299 be recognized by this macro. So for most machines, this definition
1300 suffices:
1302 #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)
1304 If the machine has register windows, so that the caller and the
1305 called function use different registers for the return value, this
1306 macro should recognize only the caller's register numbers. */
1308 #define RETURN_IN_MEMORY(TYPE) ((TYPE_MODE (TYPE) == BLKmode) \
1309 ? int_size_in_bytes (TYPE) > 8 \
1310 : 0)
1311 /* A C expression which can inhibit the returning of certain function
1312 values in registers, based on the type of value. A nonzero value
1313 says to return the function value in memory, just as large
1314 structures are always returned. Here TYPE will be a C expression
1315 of type `tree', representing the data type of the value.
1317 Note that values of mode `BLKmode' must be explicitly handled by
1318 this macro. Also, the option `-fpcc-struct-return' takes effect
1319 regardless of this macro. On most systems, it is possible to
1320 leave the macro undefined; this causes a default definition to be
1321 used, whose value is the constant 1 for `BLKmode' values, and 0
1322 otherwise.
1324 Do not use this macro to indicate that structures and unions
1325 should always be returned in memory. You should instead use
1326 `DEFAULT_PCC_STRUCT_RETURN' to indicate this. */
1328 #define DEFAULT_PCC_STRUCT_RETURN 0
1329 /* Define this macro to be 1 if all structure and union return values
1330 must be in memory. Since this results in slower code, this should
1331 be defined only if needed for compatibility with other compilers
1332 or with an ABI. If you define this macro to be 0, then the
1333 conventions used for structure and union return values are decided
1334 by the `RETURN_IN_MEMORY' macro.
1336 If not defined, this defaults to the value 1. */
1338 #define STRUCT_VALUE 0
1339 /* If the structure value address is not passed in a register, define
1340 `STRUCT_VALUE' as an expression returning an RTX for the place
1341 where the address is passed. If it returns 0, the address is
1342 passed as an "invisible" first argument. */
1344 #define STRUCT_VALUE_INCOMING 0
1345 /* If the incoming location is not a register, then you should define
1346 `STRUCT_VALUE_INCOMING' as an expression for an RTX for where the
1347 called function should find the value. If it should find the
1348 value on the stack, define this to create a `mem' which refers to
1349 the frame pointer. A definition of 0 means that the address is
1350 passed as an "invisible" first argument. */
1352 #define FUNCTION_PROLOGUE(FILE, SIZE) function_prologue (FILE, SIZE)
1353 /* A C compound statement that outputs the assembler code for entry
1354 to a function. The prologue is responsible for setting up the
1355 stack frame, initializing the frame pointer register, saving
1356 registers that must be saved, and allocating SIZE additional bytes
1357 of storage for the local variables. SIZE is an integer. FILE is
1358 a stdio stream to which the assembler code should be output.
1360 The label for the beginning of the function need not be output by
1361 this macro. That has already been done when the macro is run.
1363 To determine which registers to save, the macro can refer to the
1364 array `regs_ever_live': element R is nonzero if hard register R is
1365 used anywhere within the function. This implies the function
1366 prologue should save register R, provided it is not one of the
1367 call-used registers. (`FUNCTION_EPILOGUE' must likewise use
1368 `regs_ever_live'.)
1370 On machines that have "register windows", the function entry code
1371 does not save on the stack the registers that are in the windows,
1372 even if they are supposed to be preserved by function calls;
1373 instead it takes appropriate steps to "push" the register stack,
1374 if any non-call-used registers are used in the function.
1376 On machines where functions may or may not have frame-pointers, the
1377 function entry code must vary accordingly; it must set up the frame
1378 pointer if one is wanted, and not otherwise. To determine whether
1379 a frame pointer is in wanted, the macro can refer to the variable
1380 `frame_pointer_needed'. The variable's value will be 1 at run
1381 time in a function that needs a frame pointer. *Note
1382 Elimination::.
1384 The function entry code is responsible for allocating any stack
1385 space required for the function. This stack space consists of the
1386 regions listed below. In most cases, these regions are allocated
1387 in the order listed, with the last listed region closest to the
1388 top of the stack (the lowest address if `STACK_GROWS_DOWNWARD' is
1389 defined, and the highest address if it is not defined). You can
1390 use a different order for a machine if doing so is more convenient
1391 or required for compatibility reasons. Except in cases where
1392 required by standard or by a debugger, there is no reason why the
1393 stack layout used by GCC need agree with that used by other
1394 compilers for a machine.
1396 * A region of `current_function_pretend_args_size' bytes of
1397 uninitialized space just underneath the first argument
1398 arriving on the stack. (This may not be at the very start of
1399 the allocated stack region if the calling sequence has pushed
1400 anything else since pushing the stack arguments. But
1401 usually, on such machines, nothing else has been pushed yet,
1402 because the function prologue itself does all the pushing.)
1403 This region is used on machines where an argument may be
1404 passed partly in registers and partly in memory, and, in some
1405 cases to support the features in `varargs.h' and `stdargs.h'.
1407 * An area of memory used to save certain registers used by the
1408 function. The size of this area, which may also include
1409 space for such things as the return address and pointers to
1410 previous stack frames, is machine-specific and usually
1411 depends on which registers have been used in the function.
1412 Machines with register windows often do not require a save
1413 area.
1415 * A region of at least SIZE bytes, possibly rounded up to an
1416 allocation boundary, to contain the local variables of the
1417 function. On some machines, this region and the save area
1418 may occur in the opposite order, with the save area closer to
1419 the top of the stack.
1421 * Optionally, when `ACCUMULATE_OUTGOING_ARGS' is defined, a
1422 region of `current_function_outgoing_args_size' bytes to be
1423 used for outgoing argument lists of the function. *Note
1424 Stack Arguments::.
1426 Normally, it is necessary for the macros `FUNCTION_PROLOGUE' and
1427 `FUNCTION_EPILOGE' to treat leaf functions specially. The C
1428 variable `leaf_function' is nonzero for such a function. */
1430 #define EPILOGUE_USES(REGNO) 0
1431 /* Define this macro as a C expression that is nonzero for registers
1432 are used by the epilogue or the `return' pattern. The stack and
1433 frame pointer registers are already be assumed to be used as
1434 needed. */
1436 #define FUNCTION_EPILOGUE(FILE, SIZE) function_epilogue (FILE, SIZE)
1437 /* A C compound statement that outputs the assembler code for exit
1438 from a function. The epilogue is responsible for restoring the
1439 saved registers and stack pointer to their values when the
1440 function was called, and returning control to the caller. This
1441 macro takes the same arguments as the macro `FUNCTION_PROLOGUE',
1442 and the registers to restore are determined from `regs_ever_live'
1443 and `CALL_USED_REGISTERS' in the same way.
1445 On some machines, there is a single instruction that does all the
1446 work of returning from the function. On these machines, give that
1447 instruction the name `return' and do not define the macro
1448 `FUNCTION_EPILOGUE' at all.
1450 Do not define a pattern named `return' if you want the
1451 `FUNCTION_EPILOGUE' to be used. If you want the target switches
1452 to control whether return instructions or epilogues are used,
1453 define a `return' pattern with a validity condition that tests the
1454 target switches appropriately. If the `return' pattern's validity
1455 condition is false, epilogues will be used.
1457 On machines where functions may or may not have frame-pointers, the
1458 function exit code must vary accordingly. Sometimes the code for
1459 these two cases is completely different. To determine whether a
1460 frame pointer is wanted, the macro can refer to the variable
1461 `frame_pointer_needed'. The variable's value will be 1 when
1462 compiling a function that needs a frame pointer.
1464 Normally, `FUNCTION_PROLOGUE' and `FUNCTION_EPILOGUE' must treat
1465 leaf functions specially. The C variable `leaf_function' is
1466 nonzero for such a function. *Note Leaf Functions::.
1468 On some machines, some functions pop their arguments on exit while
1469 others leave that for the caller to do. For example, the 68020
1470 when given `-mrtd' pops arguments in functions that take a fixed
1471 number of arguments.
1473 Your definition of the macro `RETURN_POPS_ARGS' decides which
1474 functions pop their own arguments. `FUNCTION_EPILOGUE' needs to
1475 know what was decided. The variable that is called
1476 `current_function_pops_args' is the number of bytes of its
1477 arguments that a function should pop. *Note Scalar Return::. */
1479 #define STRICT_ARGUMENT_NAMING 1
1480 /* Define this macro if the location where a function argument is
1481 passed depends on whether or not it is a named argument.
1483 This macro controls how the NAMED argument to `FUNCTION_ARG' is
1484 set for varargs and stdarg functions. With this macro defined,
1485 the NAMED argument is always true for named arguments, and false
1486 for unnamed arguments. If this is not defined, but
1487 `SETUP_INCOMING_VARARGS' is defined, then all arguments are
1488 treated as named. Otherwise, all named arguments except the last
1489 are treated as named. */
1492 #define HAVE_POST_INCREMENT 1
1493 /* Define this macro if the machine supports post-increment
1494 addressing. */
1496 #define HAVE_PRE_DECREMENT 1
1497 /* #define HAVE_PRE_INCREMENT
1498 #define HAVE_POST_DECREMENT */
1499 /* Similar for other kinds of addressing. */
1501 #define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)
1502 /* A C expression that is 1 if the RTX X is a constant which is a
1503 valid address. On most machines, this can be defined as
1504 `CONSTANT_P (X)', but a few machines are more restrictive in which
1505 constant addresses are supported.
1507 `CONSTANT_P' accepts integer-values expressions whose values are
1508 not explicitly known, such as `symbol_ref', `label_ref', and
1509 `high' expressions and `const' arithmetic expressions, in addition
1510 to `const_int' and `const_double' expressions. */
1512 #define MAX_REGS_PER_ADDRESS 1
1513 /* A number, the maximum number of registers that can appear in a
1514 valid memory address. Note that it is up to you to specify a
1515 value equal to the maximum number that `GO_IF_LEGITIMATE_ADDRESS'
1516 would ever accept. */
1518 #ifdef REG_OK_STRICT
1519 # define GO_IF_LEGITIMATE_ADDRESS(mode, operand, ADDR) \
1521 if (legitimate_address_p (mode, operand, 1)) \
1522 goto ADDR; \
1524 # else
1525 # define GO_IF_LEGITIMATE_ADDRESS(mode, operand, ADDR) \
1527 if (legitimate_address_p (mode, operand, 0)) \
1528 goto ADDR; \
1530 #endif
1531 /* A C compound statement with a conditional `goto LABEL;' executed
1532 if X (an RTX) is a legitimate memory address on the target machine
1533 for a memory operand of mode MODE.
1535 It usually pays to define several simpler macros to serve as
1536 subroutines for this one. Otherwise it may be too complicated to
1537 understand.
1539 This macro must exist in two variants: a strict variant and a
1540 non-strict one. The strict variant is used in the reload pass. It
1541 must be defined so that any pseudo-register that has not been
1542 allocated a hard register is considered a memory reference. In
1543 contexts where some kind of register is required, a pseudo-register
1544 with no hard register must be rejected.
1546 The non-strict variant is used in other passes. It must be
1547 defined to accept all pseudo-registers in every context where some
1548 kind of register is required.
1550 Compiler source files that want to use the strict variant of this
1551 macro define the macro `REG_OK_STRICT'. You should use an `#ifdef
1552 REG_OK_STRICT' conditional to define the strict variant in that
1553 case and the non-strict variant otherwise.
1555 Subroutines to check for acceptable registers for various purposes
1556 (one for base registers, one for index registers, and so on) are
1557 typically among the subroutines used to define
1558 `GO_IF_LEGITIMATE_ADDRESS'. Then only these subroutine macros
1559 need have two variants; the higher levels of macros may be the
1560 same whether strict or not.
1562 Normally, constant addresses which are the sum of a `symbol_ref'
1563 and an integer are stored inside a `const' RTX to mark them as
1564 constant. Therefore, there is no need to recognize such sums
1565 specifically as legitimate addresses. Normally you would simply
1566 recognize any `const' as legitimate.
1568 Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant
1569 sums that are not marked with `const'. It assumes that a naked
1570 `plus' indicates indexing. If so, then you *must* reject such
1571 naked constant sums as illegitimate addresses, so that none of
1572 them will be given to `PRINT_OPERAND_ADDRESS'.
1574 On some machines, whether a symbolic address is legitimate depends
1575 on the section that the address refers to. On these machines,
1576 define the macro `ENCODE_SECTION_INFO' to store the information
1577 into the `symbol_ref', and then check for it here. When you see a
1578 `const', you will have to look inside it to find the `symbol_ref'
1579 in order to determine the section. *Note Assembler Format::.
1581 The best way to modify the name string is by adding text to the
1582 beginning, with suitable punctuation to prevent any ambiguity.
1583 Allocate the new name in `saveable_obstack'. You will have to
1584 modify `ASM_OUTPUT_LABELREF' to remove and decode the added text
1585 and output the name accordingly, and define `STRIP_NAME_ENCODING'
1586 to access the original name string.
1588 You can check the information stored here into the `symbol_ref' in
1589 the definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and
1590 `PRINT_OPERAND_ADDRESS'. */
1592 /* `REG_OK_FOR_BASE_P (X)'
1593 A C expression that is nonzero if X (assumed to be a `reg' RTX) is
1594 valid for use as a base register. For hard registers, it should
1595 always accept those which the hardware permits and reject the
1596 others. Whether the macro accepts or rejects pseudo registers
1597 must be controlled by `REG_OK_STRICT' as described above. This
1598 usually requires two variant definitions, of which `REG_OK_STRICT'
1599 controls the one actually used. */
1601 #define REG_OK_FOR_BASE_NOSTRICT_P(X) \
1602 (REGNO (X) >= FIRST_PSEUDO_REGISTER || REG_OK_FOR_BASE_STRICT_P(X))
1604 #define REG_OK_FOR_BASE_STRICT_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))
1606 #ifdef REG_OK_STRICT
1607 # define REG_OK_FOR_BASE_P(X) REG_OK_FOR_BASE_STRICT_P (X)
1608 #else
1609 # define REG_OK_FOR_BASE_P(X) REG_OK_FOR_BASE_NOSTRICT_P (X)
1610 #endif
1612 /* A C expression that is just like `REG_OK_FOR_BASE_P', except that
1613 that expression may examine the mode of the memory reference in
1614 MODE. You should define this macro if the mode of the memory
1615 reference affects whether a register may be used as a base
1616 register. If you define this macro, the compiler will use it
1617 instead of `REG_OK_FOR_BASE_P'. */
1618 #define REG_OK_FOR_INDEX_P(X) 0
1619 /* A C expression that is nonzero if X (assumed to be a `reg' RTX) is
1620 valid for use as an index register.
1622 The difference between an index register and a base register is
1623 that the index register may be scaled. If an address involves the
1624 sum of two registers, neither one of them scaled, then either one
1625 may be labeled the "base" and the other the "index"; but whichever
1626 labeling is used must fit the machine's constraints of which
1627 registers may serve in each capacity. The compiler will try both
1628 labelings, looking for one that is valid, and will reload one or
1629 both registers only if neither labeling works. */
1631 #define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \
1633 (X) = legitimize_address (X, OLDX, MODE); \
1634 if (memory_address_p (MODE, X)) \
1635 goto WIN; \
1637 /* A C compound statement that attempts to replace X with a valid
1638 memory address for an operand of mode MODE. WIN will be a C
1639 statement label elsewhere in the code; the macro definition may use
1641 GO_IF_LEGITIMATE_ADDRESS (MODE, X, WIN);
1643 to avoid further processing if the address has become legitimate.
1645 X will always be the result of a call to `break_out_memory_refs',
1646 and OLDX will be the operand that was given to that function to
1647 produce X.
1649 The code generated by this macro should not alter the substructure
1650 of X. If it transforms X into a more legitimate form, it should
1651 assign X (which will always be a C variable) a new value.
1653 It is not necessary for this macro to come up with a legitimate
1654 address. The compiler has standard ways of doing so in all cases.
1655 In fact, it is safe for this macro to do nothing. But often a
1656 machine-dependent strategy can generate better code. */
1658 #define XEXP_(X,Y) (X)
1659 #define LEGITIMIZE_RELOAD_ADDRESS(X, MODE, OPNUM, TYPE, IND_LEVELS, WIN) \
1660 do { \
1661 if (1&&(GET_CODE (X) == POST_INC || GET_CODE (X) == PRE_DEC)) \
1663 push_reload (XEXP (X,0), XEXP (X,0), &XEXP (X,0), &XEXP (X,0), \
1664 POINTER_REGS, GET_MODE (X),GET_MODE (X) , 0, 0, \
1665 OPNUM, RELOAD_OTHER); \
1666 goto WIN; \
1668 if (GET_CODE (X) == PLUS \
1669 && REG_P (XEXP (X, 0)) \
1670 && GET_CODE (XEXP (X, 1)) == CONST_INT \
1671 && INTVAL (XEXP (X, 1)) >= 1) \
1673 int fit = INTVAL (XEXP (X, 1)) <= (64 - GET_MODE_SIZE (MODE)); \
1674 if (fit) \
1676 if (reg_equiv_address[REGNO (XEXP (X, 0))] != 0) \
1678 int regno = REGNO (XEXP (X, 0)); \
1679 rtx mem = make_memloc (X, regno); \
1680 push_reload (XEXP (mem,0), NULL, &XEXP (mem,0), NULL, \
1681 POINTER_REGS, Pmode, VOIDmode, 0, 0, \
1682 1, ADDR_TYPE (TYPE)); \
1683 push_reload (mem, NULL_RTX, &XEXP (X, 0), NULL, \
1684 BASE_POINTER_REGS, GET_MODE (X), VOIDmode, 0, 0, \
1685 OPNUM, TYPE); \
1686 goto WIN; \
1688 push_reload (XEXP (X, 0), NULL_RTX, &XEXP (X, 0), NULL, \
1689 BASE_POINTER_REGS, GET_MODE (X), VOIDmode, 0, 0, \
1690 OPNUM, TYPE); \
1691 goto WIN; \
1693 else if (! (frame_pointer_needed && XEXP (X,0) == frame_pointer_rtx)) \
1695 push_reload (X, NULL_RTX, &X, NULL, \
1696 POINTER_REGS, GET_MODE (X), VOIDmode, 0, 0, \
1697 OPNUM, TYPE); \
1698 goto WIN; \
1701 } while(0)
1702 /* A C compound statement that attempts to replace X, which is an
1703 address that needs reloading, with a valid memory address for an
1704 operand of mode MODE. WIN will be a C statement label elsewhere
1705 in the code. It is not necessary to define this macro, but it
1706 might be useful for performance reasons.
1708 For example, on the i386, it is sometimes possible to use a single
1709 reload register instead of two by reloading a sum of two pseudo
1710 registers into a register. On the other hand, for number of RISC
1711 processors offsets are limited so that often an intermediate
1712 address needs to be generated in order to address a stack slot.
1713 By defining LEGITIMIZE_RELOAD_ADDRESS appropriately, the
1714 intermediate addresses generated for adjacent some stack slots can
1715 be made identical, and thus be shared.
1717 *Note*: This macro should be used with caution. It is necessary
1718 to know something of how reload works in order to effectively use
1719 this, and it is quite easy to produce macros that build in too
1720 much knowledge of reload internals.
1722 *Note*: This macro must be able to reload an address created by a
1723 previous invocation of this macro. If it fails to handle such
1724 addresses then the compiler may generate incorrect code or abort.
1726 The macro definition should use `push_reload' to indicate parts
1727 that need reloading; OPNUM, TYPE and IND_LEVELS are usually
1728 suitable to be passed unaltered to `push_reload'.
1730 The code generated by this macro must not alter the substructure of
1731 X. If it transforms X into a more legitimate form, it should
1732 assign X (which will always be a C variable) a new value. This
1733 also applies to parts that you change indirectly by calling
1734 `push_reload'.
1736 The macro definition may use `strict_memory_address_p' to test if
1737 the address has become legitimate.
1739 If you want to change only a part of X, one standard way of doing
1740 this is to use `copy_rtx'. Note, however, that is unshares only a
1741 single level of rtl. Thus, if the part to be changed is not at the
1742 top level, you'll need to replace first the top leve It is not
1743 necessary for this macro to come up with a legitimate address;
1744 but often a machine-dependent strategy can generate better code. */
1746 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \
1747 if (GET_CODE (ADDR) == POST_INC || GET_CODE (ADDR) == PRE_DEC) \
1748 goto LABEL
1749 /* A C statement or compound statement with a conditional `goto
1750 LABEL;' executed if memory address X (an RTX) can have different
1751 meanings depending on the machine mode of the memory reference it
1752 is used for or if the address is valid for some modes but not
1753 others.
1755 Autoincrement and autodecrement addresses typically have
1756 mode-dependent effects because the amount of the increment or
1757 decrement is the size of the operand being addressed. Some
1758 machines have other mode-dependent addresses. Many RISC machines
1759 have no mode-dependent addresses.
1761 You may assume that ADDR is a valid address for the machine. */
1763 #define LEGITIMATE_CONSTANT_P(X) 1
1764 /* A C expression that is nonzero if X is a legitimate constant for
1765 an immediate operand on the target machine. You can assume that X
1766 satisfies `CONSTANT_P', so you need not check this. In fact, `1'
1767 is a suitable definition for this macro on machines where anything
1768 `CONSTANT_P' is valid. */
1770 #define CONST_COSTS(x,CODE,OUTER_CODE) \
1771 case CONST_INT: \
1772 if (OUTER_CODE == PLUS \
1773 || OUTER_CODE == IOR \
1774 || OUTER_CODE == AND \
1775 || OUTER_CODE == MINUS \
1776 || OUTER_CODE == SET \
1777 || INTVAL (x) == 0) \
1778 return 2; \
1779 if (OUTER_CODE == COMPARE \
1780 && INTVAL (x) >= 0 \
1781 && INTVAL (x) <= 255) \
1782 return 2; \
1783 case CONST: \
1784 case LABEL_REF: \
1785 case SYMBOL_REF: \
1786 return 4; \
1787 case CONST_DOUBLE: \
1788 return 4;
1790 /* A part of a C `switch' statement that describes the relative costs
1791 of constant RTL expressions. It must contain `case' labels for
1792 expression codes `const_int', `const', `symbol_ref', `label_ref'
1793 and `const_double'. Each case must ultimately reach a `return'
1794 statement to return the relative cost of the use of that kind of
1795 constant value in an expression. The cost may depend on the
1796 precise value of the constant, which is available for examination
1797 in X, and the rtx code of the expression in which it is contained,
1798 found in OUTER_CODE.
1800 CODE is the expression code--redundant, since it can be obtained
1801 with `GET_CODE (X)'. */
1803 #define DEFAULT_RTX_COSTS(x, code, outer_code) \
1805 int cst = default_rtx_costs (x, code, outer_code); \
1806 if (cst>0) \
1807 return cst; \
1808 else if (cst<0) \
1809 total += -cst; \
1810 break; \
1813 /* Like `CONST_COSTS' but applies to nonconstant RTL expressions.
1814 This can be used, for example, to indicate how costly a multiply
1815 instruction is. In writing this macro, you can use the construct
1816 `COSTS_N_INSNS (N)' to specify a cost equal to N fast
1817 instructions. OUTER_CODE is the code of the expression in which X
1818 is contained.
1820 This macro is optional; do not define it if the default cost
1821 assumptions are adequate for the target machine. */
1823 #define ADDRESS_COST(ADDRESS) avr_address_cost (ADDRESS)
1825 /* An expression giving the cost of an addressing mode that contains
1826 ADDRESS. If not defined, the cost is computed from the ADDRESS
1827 expression and the `CONST_COSTS' values.
1829 For most CISC machines, the default cost is a good approximation
1830 of the true cost of the addressing mode. However, on RISC
1831 machines, all instructions normally have the same length and
1832 execution time. Hence all addresses will have equal costs.
1834 In cases where more than one form of an address is known, the form
1835 with the lowest cost will be used. If multiple forms have the
1836 same, lowest, cost, the one that is the most complex will be used.
1838 For example, suppose an address that is equal to the sum of a
1839 register and a constant is used twice in the same basic block.
1840 When this macro is not defined, the address will be computed in a
1841 register and memory references will be indirect through that
1842 register. On machines where the cost of the addressing mode
1843 containing the sum is no higher than that of a simple indirect
1844 reference, this will produce an additional instruction and
1845 possibly require an additional register. Proper specification of
1846 this macro eliminates this overhead for such machines.
1848 Similar use of this macro is made in strength reduction of loops.
1850 ADDRESS need not be valid as an address. In such a case, the cost
1851 is not relevant and can be any value; invalid addresses need not be
1852 assigned a different cost.
1854 On machines where an address involving more than one register is as
1855 cheap as an address computation involving only one register,
1856 defining `ADDRESS_COST' to reflect this can cause two registers to
1857 be live over a region of code where only one would have been if
1858 `ADDRESS_COST' were not defined in that manner. This effect should
1859 be considered in the definition of this macro. Equivalent costs
1860 should probably only be given to addresses with different numbers
1861 of registers on machines with lots of registers.
1863 This macro will normally either not be defined or be defined as a
1864 constant. */
1866 #define REGISTER_MOVE_COST(MODE, FROM, TO) ((FROM) == STACK_REG ? 6 \
1867 : (TO) == STACK_REG ? 12 \
1868 : 2)
1869 /* A C expression for the cost of moving data from a register in class
1870 FROM to one in class TO. The classes are expressed using the
1871 enumeration values such as `GENERAL_REGS'. A value of 2 is the
1872 default; other values are interpreted relative to that.
1874 It is not required that the cost always equal 2 when FROM is the
1875 same as TO; on some machines it is expensive to move between
1876 registers if they are not general registers.
1878 If reload sees an insn consisting of a single `set' between two
1879 hard registers, and if `REGISTER_MOVE_COST' applied to their
1880 classes returns a value of 2, reload does not check to ensure that
1881 the constraints of the insn are met. Setting a cost of other than
1882 2 will allow reload to verify that the constraints are met. You
1883 should do this if the `movM' pattern's constraints do not allow
1884 such copying. */
1886 #define MEMORY_MOVE_COST(MODE,CLASS,IN) ((MODE)==QImode ? 2 : \
1887 (MODE)==HImode ? 4 : \
1888 (MODE)==SImode ? 8 : \
1889 (MODE)==SFmode ? 8 : 16)
1890 /* A C expression for the cost of moving data of mode M between a
1891 register and memory. A value of 4 is the default; this cost is
1892 relative to those in `REGISTER_MOVE_COST'.
1894 If moving between registers and memory is more expensive than
1895 between two registers, you should define this macro to express the
1896 relative cost. */
1898 #define BRANCH_COST 0
1899 /* A C expression for the cost of a branch instruction. A value of 1
1900 is the default; other values are interpreted relative to that.
1902 Here are additional macros which do not specify precise relative
1903 costs, but only that certain actions are more expensive than GCC would
1904 ordinarily expect. */
1906 #define SLOW_BYTE_ACCESS 0
1907 /* Define this macro as a C expression which is nonzero if accessing
1908 less than a word of memory (i.e. a `char' or a `short') is no
1909 faster than accessing a word of memory, i.e., if such access
1910 require more than one instruction or if there is no difference in
1911 cost between byte and (aligned) word loads.
1913 When this macro is not defined, the compiler will access a field by
1914 finding the smallest containing object; when it is defined, a
1915 fullword load will be used if alignment permits. Unless bytes
1916 accesses are faster than word accesses, using word accesses is
1917 preferable since it may eliminate subsequent memory access if
1918 subsequent accesses occur to other fields in the same word of the
1919 structure, but to different bytes.
1921 `SLOW_ZERO_EXTEND'
1922 Define this macro if zero-extension (of a `char' or `short' to an
1923 `int') can be done faster if the destination is a register that is
1924 known to be zero.
1926 If you define this macro, you must have instruction patterns that
1927 recognize RTL structures like this:
1929 (set (strict_low_part (subreg:QI (reg:SI ...) 0)) ...)
1931 and likewise for `HImode'.
1933 `SLOW_UNALIGNED_ACCESS'
1934 Define this macro to be the value 1 if unaligned accesses have a
1935 cost many times greater than aligned accesses, for example if they
1936 are emulated in a trap handler.
1938 When this macro is non-zero, the compiler will act as if
1939 `STRICT_ALIGNMENT' were non-zero when generating code for block
1940 moves. This can cause significantly more instructions to be
1941 produced. Therefore, do not set this macro non-zero if unaligned
1942 accesses only add a cycle or two to the time for a memory access.
1944 If the value of this macro is always zero, it need not be defined.
1946 `DONT_REDUCE_ADDR'
1947 Define this macro to inhibit strength reduction of memory
1948 addresses. (On some machines, such strength reduction seems to do
1949 harm rather than good.)
1951 `MOVE_RATIO'
1952 The number of scalar move insns which should be generated instead
1953 of a string move insn or a library call. Increasing the value
1954 will always make code faster, but eventually incurs high cost in
1955 increased code size.
1957 If you don't define this, a reasonable default is used. */
1959 #define NO_FUNCTION_CSE
1960 /* Define this macro if it is as good or better to call a constant
1961 function address than to call an address kept in a register. */
1963 #define NO_RECURSIVE_FUNCTION_CSE
1964 /* Define this macro if it is as good or better for a function to call
1965 itself with an explicit address than to call an address kept in a
1966 register.
1968 `ADJUST_COST (INSN, LINK, DEP_INSN, COST)'
1969 A C statement (sans semicolon) to update the integer variable COST
1970 based on the relationship between INSN that is dependent on
1971 DEP_INSN through the dependence LINK. The default is to make no
1972 adjustment to COST. This can be used for example to specify to
1973 the scheduler that an output- or anti-dependence does not incur
1974 the same cost as a data-dependence.
1976 `ADJUST_PRIORITY (INSN)'
1977 A C statement (sans semicolon) to update the integer scheduling
1978 priority `INSN_PRIORITY(INSN)'. Reduce the priority to execute
1979 the INSN earlier, increase the priority to execute INSN later.
1980 Do not define this macro if you do not need to adjust the
1981 scheduling priorities of insns. */
1984 #define TEXT_SECTION_ASM_OP "\t.text"
1985 /* A C expression whose value is a string containing the assembler
1986 operation that should precede instructions and read-only data.
1987 Normally `"\t.text"' is right. */
1989 #define DATA_SECTION_ASM_OP "\t.data"
1990 /* A C expression whose value is a string containing the assembler
1991 operation to identify the following data as writable initialized
1992 data. Normally `"\t.data"' is right. */
1994 #define EXTRA_SECTIONS in_progmem
1995 /* A list of names for sections other than the standard two, which are
1996 `in_text' and `in_data'. You need not define this macro on a
1997 system with no other sections (that GCC needs to use). */
1999 #define EXTRA_SECTION_FUNCTIONS \
2001 void \
2002 progmem_section (void) \
2004 if (in_section != in_progmem) \
2006 fprintf (asm_out_file, \
2007 "\t.section .progmem.gcc_sw_table, \"%s\", @progbits\n", \
2008 AVR_MEGA ? "a" : "ax"); \
2009 /* Should already be aligned, this is just to be safe if it isn't. */ \
2010 fprintf (asm_out_file, "\t.p2align 1\n"); \
2011 in_section = in_progmem; \
2014 /* `EXTRA_SECTION_FUNCTIONS'
2015 One or more functions to be defined in `varasm.c'. These
2016 functions should do jobs analogous to those of `text_section' and
2017 `data_section', for your additional sections. Do not define this
2018 macro if you do not define `EXTRA_SECTIONS'. */
2020 #define READONLY_DATA_SECTION data_section
2021 /* On most machines, read-only variables, constants, and jump tables
2022 are placed in the text section. If this is not the case on your
2023 machine, this macro should be defined to be the name of a function
2024 (either `data_section' or a function defined in `EXTRA_SECTIONS')
2025 that switches to the section to be used for read-only items.
2027 If these items should be placed in the text section, this macro
2028 should not be defined. */
2030 /* `SELECT_SECTION (EXP, RELOC)'
2031 A C statement or statements to switch to the appropriate section
2032 for output of EXP. You can assume that EXP is either a `VAR_DECL'
2033 node or a constant of some sort. RELOC indicates whether the
2034 initial value of EXP requires link-time relocations. Select the
2035 section by calling `text_section' or one of the alternatives for
2036 other sections.
2038 Do not define this macro if you put all read-only variables and
2039 constants in the read-only data section (usually the text section). */
2041 /* `SELECT_RTX_SECTION (MODE, RTX)'
2042 A C statement or statements to switch to the appropriate section
2043 for output of RTX in mode MODE. You can assume that RTX is some
2044 kind of constant in RTL. The argument MODE is redundant except in
2045 the case of a `const_int' rtx. Select the section by calling
2046 `text_section' or one of the alternatives for other sections.
2048 Do not define this macro if you put all constants in the read-only
2049 data section. */
2051 #define JUMP_TABLES_IN_TEXT_SECTION 0
2052 /* Define this macro if jump tables (for `tablejump' insns) should be
2053 output in the text section, along with the assembler instructions.
2054 Otherwise, the readonly data section is used.
2056 This macro is irrelevant if there is no separate readonly data
2057 section. */
2059 #define ENCODE_SECTION_INFO(DECL) encode_section_info(DECL)
2060 /* Define this macro if references to a symbol must be treated
2061 differently depending on something about the variable or function
2062 named by the symbol (such as what section it is in).
2064 The macro definition, if any, is executed immediately after the
2065 rtl for DECL has been created and stored in `DECL_RTL (DECL)'.
2066 The value of the rtl will be a `mem' whose address is a
2067 `symbol_ref'.
2069 The usual thing for this macro to do is to record a flag in the
2070 `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified
2071 name string in the `symbol_ref' (if one bit is not enough
2072 information). */
2074 #define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
2075 (VAR) = (SYMBOL_NAME) + ((SYMBOL_NAME)[0] == '*' || (SYMBOL_NAME)[0] == '@');
2076 /* `STRIP_NAME_ENCODING (VAR, SYM_NAME)'
2077 Decode SYM_NAME and store the real name part in VAR, sans the
2078 characters that encode section info. Define this macro if
2079 `ENCODE_SECTION_INFO' alters the symbol's name string. */
2080 /* `UNIQUE_SECTION_P (DECL)'
2081 A C expression which evaluates to true if DECL should be placed
2082 into a unique section for some target-specific reason. If you do
2083 not define this macro, the default is `0'. Note that the flag
2084 `-ffunction-sections' will also cause functions to be placed into
2085 unique sections. */
2087 #define UNIQUE_SECTION(DECL, RELOC) unique_section (DECL, RELOC)
2088 /* `UNIQUE_SECTION (DECL, RELOC)'
2089 A C statement to build up a unique section name, expressed as a
2090 STRING_CST node, and assign it to `DECL_SECTION_NAME (DECL)'.
2091 RELOC indicates whether the initial value of EXP requires
2092 link-time relocations. If you do not define this macro, GNU CC
2093 will use the symbol name prefixed by `.' as the section name. */
2096 #define ASM_FILE_START(STREAM) asm_file_start (STREAM)
2097 /* A C expression which outputs to the stdio stream STREAM some
2098 appropriate text to go at the start of an assembler file.
2100 Normally this macro is defined to output a line containing
2101 `#NO_APP', which is a comment that has no effect on most
2102 assemblers but tells the GNU assembler that it can save time by not
2103 checking for certain assembler constructs.
2105 On systems that use SDB, it is necessary to output certain
2106 commands; see `attasm.h'. */
2108 #define ASM_FILE_END(STREAM) asm_file_end (STREAM)
2109 /* A C expression which outputs to the stdio stream STREAM some
2110 appropriate text to go at the end of an assembler file.
2112 If this macro is not defined, the default is to output nothing
2113 special at the end of the file. Most systems don't require any
2114 definition.
2116 On systems that use SDB, it is necessary to output certain
2117 commands; see `attasm.h'. */
2119 #define ASM_COMMENT_START " ; "
2120 /* A C string constant describing how to begin a comment in the target
2121 assembler language. The compiler assumes that the comment will
2122 end at the end of the line. */
2124 #define ASM_APP_ON "/* #APP */\n"
2125 /* A C string constant for text to be output before each `asm'
2126 statement or group of consecutive ones. Normally this is
2127 `"#APP"', which is a comment that has no effect on most assemblers
2128 but tells the GNU assembler that it must check the lines that
2129 follow for all valid assembler constructs. */
2131 #define ASM_APP_OFF "/* #NOAPP */\n"
2132 /* A C string constant for text to be output after each `asm'
2133 statement or group of consecutive ones. Normally this is
2134 `"#NO_APP"', which tells the GNU assembler to resume making the
2135 time-saving assumptions that are valid for ordinary compiler
2136 output. */
2138 #define ASM_OUTPUT_SOURCE_LINE(STREAM, LINE) fprintf (STREAM,"/* line: %d */\n",LINE)
2139 /* A C statement to output DBX or SDB debugging information before
2140 code for line number LINE of the current source file to the stdio
2141 stream STREAM.
2143 This macro need not be defined if the standard form of debugging
2144 information for the debugger in use is appropriate. */
2146 #define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC) \
2147 asm_output_section_name(FILE, DECL, NAME, RELOC)
2149 /* `ASM_OUTPUT_SECTION_NAME (STREAM, DECL, NAME, RELOC)'
2150 A C statement to output something to the assembler file to switch
2151 to section NAME for object DECL which is either a `FUNCTION_DECL',
2152 a `VAR_DECL' or `NULL_TREE'. RELOC indicates whether the initial
2153 value of EXP requires link-time relocations. Some target formats
2154 do not support arbitrary sections. Do not define this macro in
2155 such cases.
2157 At present this macro is only used to support section attributes.
2158 When this macro is undefined, section attributes are disabled. */
2160 #define OBJC_PROLOGUE {}
2161 /* A C statement to output any assembler statements which are
2162 required to precede any Objective C object definitions or message
2163 sending. The statement is executed only when compiling an
2164 Objective C program. */
2168 #define ASM_OUTPUT_DOUBLE(STREAM, VALUE) fprintf (STREAM, "no double float %.20e\n", VALUE)
2169 #define ASM_OUTPUT_FLOAT(STREAM, VALUE) asm_output_float (STREAM, VALUE)
2170 /* `ASM_OUTPUT_LONG_DOUBLE (STREAM, VALUE)'
2171 `ASM_OUTPUT_THREE_QUARTER_FLOAT (STREAM, VALUE)'
2172 `ASM_OUTPUT_SHORT_FLOAT (STREAM, VALUE)'
2173 `ASM_OUTPUT_BYTE_FLOAT (STREAM, VALUE)'
2174 A C statement to output to the stdio stream STREAM an assembler
2175 instruction to assemble a floating-point constant of `TFmode',
2176 `DFmode', `SFmode', `TQFmode', `HFmode', or `QFmode',
2177 respectively, whose value is VALUE. VALUE will be a C expression
2178 of type `REAL_VALUE_TYPE'. Macros such as
2179 `REAL_VALUE_TO_TARGET_DOUBLE' are useful for writing these
2180 definitions. */
2183 #define ASM_OUTPUT_INT(FILE, VALUE) \
2184 ( fprintf (FILE, "\t.long "), \
2185 output_addr_const (FILE, (VALUE)), \
2186 fputs ("\n", FILE))
2188 /* Likewise for `short' and `char' constants. */
2190 #define ASM_OUTPUT_SHORT(FILE,VALUE) asm_output_short(FILE,VALUE)
2191 #define ASM_OUTPUT_CHAR(FILE,VALUE) asm_output_char(FILE,VALUE)
2193 /* `ASM_OUTPUT_QUADRUPLE_INT (STREAM, EXP)'
2194 A C statement to output to the stdio stream STREAM an assembler
2195 instruction to assemble an integer of 16, 8, 4, 2 or 1 bytes,
2196 respectively, whose value is VALUE. The argument EXP will be an
2197 RTL expression which represents a constant value. Use
2198 `output_addr_const (STREAM, EXP)' to output this value as an
2199 assembler expression.
2201 For sizes larger than `UNITS_PER_WORD', if the action of a macro
2202 would be identical to repeatedly calling the macro corresponding to
2203 a size of `UNITS_PER_WORD', once for each word, you need not define
2204 the macro. */
2207 #define ASM_OUTPUT_BYTE(FILE,VALUE) asm_output_byte (FILE,VALUE)
2208 /* A C statement to output to the stdio stream STREAM an assembler
2209 instruction to assemble a single byte containing the number VALUE. */
2211 #define ASM_BYTE_OP "\t.byte "
2212 /* A C string constant giving the pseudo-op to use for a sequence of
2213 single-byte constants. If this macro is not defined, the default
2214 is `"\t.byte\t"'. */
2216 #define ASM_OUTPUT_ASCII(FILE, P, SIZE) gas_output_ascii (FILE,P,SIZE)
2217 /* `ASM_OUTPUT_ASCII (STREAM, PTR, LEN)'
2218 output_ascii (FILE, P, SIZE)
2219 A C statement to output to the stdio stream STREAM an assembler
2220 instruction to assemble a string constant containing the LEN bytes
2221 at PTR. PTR will be a C expression of type `char *' and LEN a C
2222 expression of type `int'.
2224 If the assembler has a `.ascii' pseudo-op as found in the Berkeley
2225 Unix assembler, do not define the macro `ASM_OUTPUT_ASCII'. */
2227 #define IS_ASM_LOGICAL_LINE_SEPARATOR(C) ((C) == '\n' \
2228 || ((C) == '$'))
2229 /* Define this macro as a C expression which is nonzero if C is used
2230 as a logical line separator by the assembler.
2232 If you do not define this macro, the default is that only the
2233 character `;' is treated as a logical line separator. */
2235 #define ASM_OPEN_PAREN "("
2236 #define ASM_CLOSE_PAREN ")"
2237 /* These macros are defined as C string constant, describing the
2238 syntax in the assembler for grouping arithmetic expressions. The
2239 following definitions are correct for most assemblers:
2241 #define ASM_OPEN_PAREN "("
2242 #define ASM_CLOSE_PAREN ")"
2244 These macros are provided by `real.h' for writing the definitions of
2245 `ASM_OUTPUT_DOUBLE' and the like: */
2247 #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \
2248 do { \
2249 fputs ("\t.comm ", (STREAM)); \
2250 assemble_name ((STREAM), (NAME)); \
2251 fprintf ((STREAM), ",%d,1\n", (SIZE)); \
2252 } while (0)
2253 /* A C statement (sans semicolon) to output to the stdio stream
2254 STREAM the assembler definition of a common-label named NAME whose
2255 size is SIZE bytes. The variable ROUNDED is the size rounded up
2256 to whatever alignment the caller wants.
2258 Use the expression `assemble_name (STREAM, NAME)' to output the
2259 name itself; before and after that, output the additional
2260 assembler syntax for defining the name, and a newline.
2262 This macro controls how the assembler definitions of uninitialized
2263 common global variables are output. */
2265 #define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE, ROUNDED) \
2266 do { \
2267 fputs ("\t.lcomm ", (STREAM)); \
2268 assemble_name ((STREAM), (NAME)); \
2269 fprintf ((STREAM), ",%d\n", (SIZE)); \
2270 } while (0)
2271 /* A C statement (sans semicolon) to output to the stdio stream
2272 STREAM the assembler definition of a local-common-label named NAME
2273 whose size is SIZE bytes. The variable ROUNDED is the size
2274 rounded up to whatever alignment the caller wants.
2276 Use the expression `assemble_name (STREAM, NAME)' to output the
2277 name itself; before and after that, output the additional
2278 assembler syntax for defining the name, and a newline.
2280 This macro controls how the assembler definitions of uninitialized
2281 static variables are output. */
2283 #define ASM_OUTPUT_LABEL(STREAM, NAME) \
2285 assemble_name (STREAM, NAME); \
2286 fprintf (STREAM, ":\n"); \
2288 /* A C statement (sans semicolon) to output to the stdio stream
2289 STREAM the assembler definition of a label named NAME. Use the
2290 expression `assemble_name (STREAM, NAME)' to output the name
2291 itself; before and after that, output the additional assembler
2292 syntax for defining the name, and a newline. */
2294 #undef TYPE_ASM_OP
2295 #undef SIZE_ASM_OP
2296 #undef WEAK_ASM_OP
2297 #define TYPE_ASM_OP "\t.type\t"
2298 #define SIZE_ASM_OP "\t.size\t"
2299 #define WEAK_ASM_OP "\t.weak\t"
2300 /* Define the strings used for the special svr4 .type and .size directives.
2301 These strings generally do not vary from one system running svr4 to
2302 another, but if a given system (e.g. m88k running svr) needs to use
2303 different pseudo-op names for these, they may be overridden in the
2304 file which includes this one. */
2307 #undef TYPE_OPERAND_FMT
2308 #define TYPE_OPERAND_FMT "@%s"
2309 /* The following macro defines the format used to output the second
2310 operand of the .type assembler directive. Different svr4 assemblers
2311 expect various different forms for this operand. The one given here
2312 is just a default. You may need to override it in your machine-
2313 specific tm.h file (depending upon the particulars of your assembler). */
2316 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
2317 do { \
2318 fprintf (FILE, "%s", TYPE_ASM_OP); \
2319 assemble_name (FILE, NAME); \
2320 putc (',', FILE); \
2321 fprintf (FILE, TYPE_OPERAND_FMT, "function"); \
2322 putc ('\n', FILE); \
2323 ASM_OUTPUT_LABEL (FILE, NAME); \
2324 } while (0)
2325 /* A C statement (sans semicolon) to output to the stdio stream
2326 STREAM any text necessary for declaring the name NAME of a
2327 function which is being defined. This macro is responsible for
2328 outputting the label definition (perhaps using
2329 `ASM_OUTPUT_LABEL'). The argument DECL is the `FUNCTION_DECL'
2330 tree node representing the function.
2332 If this macro is not defined, then the function name is defined in
2333 the usual manner as a label (by means of `ASM_OUTPUT_LABEL'). */
2335 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
2336 do { \
2337 if (!flag_inhibit_size_directive) \
2339 char label[256]; \
2340 static int labelno; \
2341 labelno++; \
2342 ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \
2343 ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \
2344 fprintf (FILE, "%s", SIZE_ASM_OP); \
2345 assemble_name (FILE, (FNAME)); \
2346 fprintf (FILE, ","); \
2347 assemble_name (FILE, label); \
2348 fprintf (FILE, "-"); \
2349 assemble_name (FILE, (FNAME)); \
2350 putc ('\n', FILE); \
2352 } while (0)
2353 /* A C statement (sans semicolon) to output to the stdio stream
2354 STREAM any text necessary for declaring the size of a function
2355 which is being defined. The argument NAME is the name of the
2356 function. The argument DECL is the `FUNCTION_DECL' tree node
2357 representing the function.
2359 If this macro is not defined, then the function size is not
2360 defined. */
2362 #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
2363 do { \
2364 fprintf (FILE, "%s", TYPE_ASM_OP); \
2365 assemble_name (FILE, NAME); \
2366 putc (',', FILE); \
2367 fprintf (FILE, TYPE_OPERAND_FMT, "object"); \
2368 putc ('\n', FILE); \
2369 size_directive_output = 0; \
2370 if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
2372 size_directive_output = 1; \
2373 fprintf (FILE, "%s", SIZE_ASM_OP); \
2374 assemble_name (FILE, NAME); \
2375 fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
2377 ASM_OUTPUT_LABEL(FILE, NAME); \
2378 } while (0)
2379 /* A C statement (sans semicolon) to output to the stdio stream
2380 STREAM any text necessary for declaring the name NAME of an
2381 initialized variable which is being defined. This macro must
2382 output the label definition (perhaps using `ASM_OUTPUT_LABEL').
2383 The argument DECL is the `VAR_DECL' tree node representing the
2384 variable.
2386 If this macro is not defined, then the variable name is defined in
2387 the usual manner as a label (by means of `ASM_OUTPUT_LABEL'). */
2389 #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
2390 do { \
2391 const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
2392 if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
2393 && ! AT_END && TOP_LEVEL \
2394 && DECL_INITIAL (DECL) == error_mark_node \
2395 && !size_directive_output) \
2397 size_directive_output = 1; \
2398 fprintf (FILE, "%s", SIZE_ASM_OP); \
2399 assemble_name (FILE, name); \
2400 fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
2402 } while (0)
2403 /* A C statement (sans semicolon) to finish up declaring a variable
2404 name once the compiler has processed its initializer fully and
2405 thus has had a chance to determine the size of an array when
2406 controlled by an initializer. This is used on systems where it's
2407 necessary to declare something about the size of the object.
2409 If you don't define this macro, that is equivalent to defining it
2410 to do nothing. */
2413 #define ESCAPES \
2414 "\1\1\1\1\1\1\1\1btn\1fr\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
2415 \0\0\"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\
2416 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\\\0\0\0\
2417 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\
2418 \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
2419 \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
2420 \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\
2421 \1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1\1"
2422 /* A table of bytes codes used by the ASM_OUTPUT_ASCII and
2423 ASM_OUTPUT_LIMITED_STRING macros. Each byte in the table
2424 corresponds to a particular byte value [0..255]. For any
2425 given byte value, if the value in the corresponding table
2426 position is zero, the given character can be output directly.
2427 If the table value is 1, the byte must be output as a \ooo
2428 octal escape. If the tables value is anything else, then the
2429 byte value should be output as a \ followed by the value
2430 in the table. Note that we can use standard UN*X escape
2431 sequences for many control characters, but we don't use
2432 \a to represent BEL because some svr4 assemblers (e.g. on
2433 the i386) don't know about that. Also, we don't use \v
2434 since some versions of gas, such as 2.2 did not accept it. */
2436 #define STRING_LIMIT ((unsigned) 64)
2437 #define STRING_ASM_OP "\t.string\t"
2438 /* Some svr4 assemblers have a limit on the number of characters which
2439 can appear in the operand of a .string directive. If your assembler
2440 has such a limitation, you should define STRING_LIMIT to reflect that
2441 limit. Note that at least some svr4 assemblers have a limit on the
2442 actual number of bytes in the double-quoted string, and that they
2443 count each character in an escape sequence as one byte. Thus, an
2444 escape sequence like \377 would count as four bytes.
2446 If your target assembler doesn't support the .string directive, you
2447 should define this to zero. */
2449 #define ASM_GLOBALIZE_LABEL(STREAM, NAME) \
2450 do { \
2451 fprintf (STREAM, ".global\t"); \
2452 assemble_name (STREAM, NAME); \
2453 fprintf (STREAM, "\n"); \
2455 while (0)
2457 /* A C statement (sans semicolon) to output to the stdio stream
2458 STREAM some commands that will make the label NAME global; that
2459 is, available for reference from other files. Use the expression
2460 `assemble_name (STREAM, NAME)' to output the name itself; before
2461 and after that, output the additional assembler syntax for making
2462 that name global, and a newline. */
2464 #define ASM_WEAKEN_LABEL(FILE, NAME) \
2465 do \
2467 fputs ("\t.weak\t", (FILE)); \
2468 assemble_name ((FILE), (NAME)); \
2469 fputc ('\n', (FILE)); \
2471 while (0)
2473 /* A C statement (sans semicolon) to output to the stdio stream
2474 STREAM some commands that will make the label NAME weak; that is,
2475 available for reference from other files but only used if no other
2476 definition is available. Use the expression `assemble_name
2477 (STREAM, NAME)' to output the name itself; before and after that,
2478 output the additional assembler syntax for making that name weak,
2479 and a newline.
2481 If you don't define this macro, GNU CC will not support weak
2482 symbols and you should not define the `SUPPORTS_WEAK' macro.
2485 #define SUPPORTS_WEAK 1
2486 /* A C expression which evaluates to true if the target supports weak
2487 symbols.
2489 If you don't define this macro, `defaults.h' provides a default
2490 definition. If `ASM_WEAKEN_LABEL' is defined, the default
2491 definition is `1'; otherwise, it is `0'. Define this macro if you
2492 want to control weak symbol support with a compiler flag such as
2493 `-melf'.
2495 `MAKE_DECL_ONE_ONLY'
2496 A C statement (sans semicolon) to mark DECL to be emitted as a
2497 public symbol such that extra copies in multiple translation units
2498 will be discarded by the linker. Define this macro if your object
2499 file format provides support for this concept, such as the `COMDAT'
2500 section flags in the Microsoft Windows PE/COFF format, and this
2501 support requires changes to DECL, such as putting it in a separate
2502 section.
2504 `SUPPORTS_WEAK'
2505 A C expression which evaluates to true if the target supports
2506 one-only semantics.
2508 If you don't define this macro, `varasm.c' provides a default
2509 definition. If `MAKE_DECL_ONE_ONLY' is defined, the default
2510 definition is `1'; otherwise, it is `0'. Define this macro if you
2511 want to control weak symbol support with a compiler flag, or if
2512 setting the `DECL_ONE_ONLY' flag is enough to mark a declaration to
2513 be emitted as one-only. */
2515 #define ASM_OUTPUT_INTERNAL_LABEL(STREAM, PREFIX, NUM) \
2516 fprintf(STREAM, ".%s%d:\n", PREFIX, NUM)
2517 /* A C statement to output to the stdio stream STREAM a label whose
2518 name is made from the string PREFIX and the number NUM.
2520 It is absolutely essential that these labels be distinct from the
2521 labels used for user-level functions and variables. Otherwise,
2522 certain programs will have name conflicts with internal labels.
2524 It is desirable to exclude internal labels from the symbol table
2525 of the object file. Most assemblers have a naming convention for
2526 labels that should be excluded; on many systems, the letter `L' at
2527 the beginning of a label has this effect. You should find out what
2528 convention your system uses, and follow it.
2530 The usual definition of this macro is as follows:
2532 fprintf (STREAM, "L%s%d:\n", PREFIX, NUM) */
2534 #define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
2535 sprintf (STRING, "*.%s%d", PREFIX, NUM)
2536 /* A C statement to store into the string STRING a label whose name
2537 is made from the string PREFIX and the number NUM.
2539 This string, when output subsequently by `assemble_name', should
2540 produce the output that `ASM_OUTPUT_INTERNAL_LABEL' would produce
2541 with the same PREFIX and NUM.
2543 If the string begins with `*', then `assemble_name' will output
2544 the rest of the string unchanged. It is often convenient for
2545 `ASM_GENERATE_INTERNAL_LABEL' to use `*' in this way. If the
2546 string doesn't start with `*', then `ASM_OUTPUT_LABELREF' gets to
2547 output the string, and may change it. (Of course,
2548 `ASM_OUTPUT_LABELREF' is also part of your machine description, so
2549 you should know what it does on your machine.) */
2551 #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
2552 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \
2553 sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
2555 /* A C expression to assign to OUTVAR (which is a variable of type
2556 `char *') a newly allocated string made from the string NAME and
2557 the number NUMBER, with some suitable punctuation added. Use
2558 `alloca' to get space for the string.
2560 The string will be used as an argument to `ASM_OUTPUT_LABELREF' to
2561 produce an assembler label for an internal static variable whose
2562 name is NAME. Therefore, the string must be such as to result in
2563 valid assembler code. The argument NUMBER is different each time
2564 this macro is executed; it prevents conflicts between
2565 similarly-named internal static variables in different scopes.
2567 Ideally this string should not be a valid C identifier, to prevent
2568 any conflict with the user's own symbols. Most assemblers allow
2569 periods or percent signs in assembler symbols; putting at least
2570 one of these between the name and the number will suffice. */
2572 /* `ASM_OUTPUT_WEAK_ALIAS (STREAM, NAME, VALUE)'
2573 A C statement to output to the stdio stream STREAM assembler code
2574 which defines (equates) the weak symbol NAME to have the value
2575 VALUE.
2577 Define this macro if the target only supports weak aliases; define
2578 ASM_OUTPUT_DEF instead if possible. */
2580 #define HAS_INIT_SECTION 1
2581 /* If defined, `main' will not call `__main' as described above.
2582 This macro should be defined for systems that control the contents
2583 of the init section on a symbol-by-symbol basis, such as OSF/1,
2584 and should not be defined explicitly for systems that support
2585 `INIT_SECTION_ASM_OP'. */
2587 #define REGISTER_NAMES { \
2588 "r0","r1","r2","r3","r4","r5","r6","r7", \
2589 "r8","r9","r10","r11","r12","r13","r14","r15", \
2590 "r16","r17","r18","r19","r20","r21","r22","r23", \
2591 "r24","r25","r26","r27","r28","r29","r30","r31", \
2592 "__SPL__","__SPH__","argL","argH"}
2593 /* A C initializer containing the assembler's names for the machine
2594 registers, each one as a C string constant. This is what
2595 translates register numbers in the compiler into assembler
2596 language. */
2598 #define FINAL_PRESCAN_INSN(insn, operand, nop) final_prescan_insn (insn, operand,nop)
2599 /* If defined, a C statement to be executed just prior to the output
2600 of assembler code for INSN, to modify the extracted operands so
2601 they will be output differently.
2603 Here the argument OPVEC is the vector containing the operands
2604 extracted from INSN, and NOPERANDS is the number of elements of
2605 the vector which contain meaningful data for this insn. The
2606 contents of this vector are what will be used to convert the insn
2607 template into assembler code, so you can change the assembler
2608 output by changing the contents of the vector.
2610 This macro is useful when various assembler syntaxes share a single
2611 file of instruction patterns; by defining this macro differently,
2612 you can cause a large class of instructions to be output
2613 differently (such as with rearranged operands). Naturally,
2614 variations in assembler syntax affecting individual insn patterns
2615 ought to be handled by writing conditional output routines in
2616 those patterns.
2618 If this macro is not defined, it is equivalent to a null statement. */
2620 #define PRINT_OPERAND(STREAM, X, CODE) print_operand (STREAM, X, CODE)
2621 /* A C compound statement to output to stdio stream STREAM the
2622 assembler syntax for an instruction operand X. X is an RTL
2623 expression.
2625 CODE is a value that can be used to specify one of several ways of
2626 printing the operand. It is used when identical operands must be
2627 printed differently depending on the context. CODE comes from the
2628 `%' specification that was used to request printing of the
2629 operand. If the specification was just `%DIGIT' then CODE is 0;
2630 if the specification was `%LTR DIGIT' then CODE is the ASCII code
2631 for LTR.
2633 If X is a register, this macro should print the register's name.
2634 The names can be found in an array `reg_names' whose type is `char
2635 *[]'. `reg_names' is initialized from `REGISTER_NAMES'.
2637 When the machine description has a specification `%PUNCT' (a `%'
2638 followed by a punctuation character), this macro is called with a
2639 null pointer for X and the punctuation character for CODE. */
2641 #define PRINT_OPERAND_PUNCT_VALID_P(CODE) ((CODE) == '~')
2642 /* A C expression which evaluates to true if CODE is a valid
2643 punctuation character for use in the `PRINT_OPERAND' macro. If
2644 `PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no
2645 punctuation characters (except for the standard one, `%') are used
2646 in this way. */
2648 #define PRINT_OPERAND_ADDRESS(STREAM, X) print_operand_address(STREAM, X)
2649 /* A C compound statement to output to stdio stream STREAM the
2650 assembler syntax for an instruction operand that is a memory
2651 reference whose address is X. X is an RTL expression.
2653 On some machines, the syntax for a symbolic address depends on the
2654 section that the address refers to. On these machines, define the
2655 macro `ENCODE_SECTION_INFO' to store the information into the
2656 `symbol_ref', and then check for it here. *Note Assembler
2657 Format::. */
2659 #define USER_LABEL_PREFIX ""
2660 /* `LOCAL_LABEL_PREFIX'
2661 `REGISTER_PREFIX'
2662 `IMMEDIATE_PREFIX'
2663 If defined, C string expressions to be used for the `%R', `%L',
2664 `%U', and `%I' options of `asm_fprintf' (see `final.c'). These
2665 are useful when a single `md' file must support multiple assembler
2666 formats. In that case, the various `tm.h' files can define these
2667 macros differently. */
2669 #define ASSEMBLER_DIALECT AVR_ENHANCED
2670 /* If your target supports multiple dialects of assembler language
2671 (such as different opcodes), define this macro as a C expression
2672 that gives the numeric index of the assembler language dialect to
2673 use, with zero as the first variant.
2675 If this macro is defined, you may use constructs of the form
2676 `{option0|option1|option2...}' in the output templates of patterns
2677 (*note Output Template::.) or in the first argument of
2678 `asm_fprintf'. This construct outputs `option0', `option1' or
2679 `option2', etc., if the value of `ASSEMBLER_DIALECT' is zero, one
2680 or two, etc. Any special characters within these strings retain
2681 their usual meaning.
2683 If you do not define this macro, the characters `{', `|' and `}'
2684 do not have any special meaning when used in templates or operands
2685 to `asm_fprintf'.
2687 Define the macros `REGISTER_PREFIX', `LOCAL_LABEL_PREFIX',
2688 `USER_LABEL_PREFIX' and `IMMEDIATE_PREFIX' if you can express the
2689 variations in assembler language syntax with that mechanism.
2690 Define `ASSEMBLER_DIALECT' and use the `{option0|option1}' syntax
2691 if the syntax variant are larger and involve such things as
2692 different opcodes or operand order. */
2694 #define ASM_OUTPUT_REG_PUSH(STREAM, REGNO) \
2696 if (REGNO > 31) \
2697 abort (); \
2698 fprintf (STREAM, "\tpush\tr%d", REGNO); \
2700 /* A C expression to output to STREAM some assembler code which will
2701 push hard register number REGNO onto the stack. The code need not
2702 be optimal, since this macro is used only when profiling. */
2704 #define ASM_OUTPUT_REG_POP(STREAM, REGNO) \
2706 if (REGNO > 31) \
2707 abort (); \
2708 fprintf (STREAM, "\tpop\tr%d", REGNO); \
2710 /* A C expression to output to STREAM some assembler code which will
2711 pop hard register number REGNO off of the stack. The code need
2712 not be optimal, since this macro is used only when profiling. */
2714 #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \
2715 avr_output_addr_vec_elt(STREAM, VALUE)
2716 /* This macro should be provided on machines where the addresses in a
2717 dispatch table are absolute.
2719 The definition should be a C statement to output to the stdio
2720 stream STREAM an assembler pseudo-instruction to generate a
2721 reference to a label. VALUE is the number of an internal label
2722 whose definition is output using `ASM_OUTPUT_INTERNAL_LABEL'. For
2723 example,
2725 fprintf (STREAM, "\t.word L%d\n", VALUE) */
2727 #define ASM_OUTPUT_CASE_LABEL(STREAM, PREFIX, NUM, TABLE) \
2728 progmem_section (), ASM_OUTPUT_INTERNAL_LABEL (STREAM, PREFIX, NUM)
2730 /* `ASM_OUTPUT_CASE_LABEL (STREAM, PREFIX, NUM, TABLE)'
2731 Define this if the label before a jump-table needs to be output
2732 specially. The first three arguments are the same as for
2733 `ASM_OUTPUT_INTERNAL_LABEL'; the fourth argument is the jump-table
2734 which follows (a `jump_insn' containing an `addr_vec' or
2735 `addr_diff_vec').
2737 This feature is used on system V to output a `swbeg' statement for
2738 the table.
2740 If this macro is not defined, these labels are output with
2741 `ASM_OUTPUT_INTERNAL_LABEL'. */
2743 /* `ASM_OUTPUT_CASE_END (STREAM, NUM, TABLE)'
2744 Define this if something special must be output at the end of a
2745 jump-table. The definition should be a C statement to be executed
2746 after the assembler code for the table is written. It should write
2747 the appropriate code to stdio stream STREAM. The argument TABLE
2748 is the jump-table insn, and NUM is the label-number of the
2749 preceding label.
2751 If this macro is not defined, nothing special is output at the end
2752 of the jump-table. */
2754 #define ASM_OUTPUT_SKIP(STREAM, n) \
2755 fprintf (STREAM, "\t.skip %d,0\n", n)
2756 /* A C statement to output to the stdio stream STREAM an assembler
2757 instruction to advance the location counter by NBYTES bytes.
2758 Those bytes should be zero when loaded. NBYTES will be a C
2759 expression of type `int'. */
2761 #define ASM_OUTPUT_ALIGN(STREAM, POWER)
2762 /* A C statement to output to the stdio stream STREAM an assembler
2763 command to advance the location counter to a multiple of 2 to the
2764 POWER bytes. POWER will be a C expression of type `int'. */
2766 #define CASE_VECTOR_MODE HImode
2767 /* An alias for a machine mode name. This is the machine mode that
2768 elements of a jump-table should have. */
2770 extern int avr_case_values_threshold;
2772 #define CASE_VALUES_THRESHOLD avr_case_values_threshold
2773 /* `CASE_VALUES_THRESHOLD'
2774 Define this to be the smallest number of different values for
2775 which it is best to use a jump-table instead of a tree of
2776 conditional branches. The default is four for machines with a
2777 `casesi' instruction and five otherwise. This is best for most
2778 machines. */
2780 #undef WORD_REGISTER_OPERATIONS
2781 /* Define this macro if operations between registers with integral
2782 mode smaller than a word are always performed on the entire
2783 register. Most RISC machines have this property and most CISC
2784 machines do not. */
2786 #define EASY_DIV_EXPR TRUNC_DIV_EXPR
2787 /* An alias for a tree code that is the easiest kind of division to
2788 compile code for in the general case. It may be `TRUNC_DIV_EXPR',
2789 `FLOOR_DIV_EXPR', `CEIL_DIV_EXPR' or `ROUND_DIV_EXPR'. These four
2790 division operators differ in how they round the result to an
2791 integer. `EASY_DIV_EXPR' is used when it is permissible to use
2792 any of those kinds of division and the choice should be made on
2793 the basis of efficiency. */
2795 #define MOVE_MAX 4
2796 /* The maximum number of bytes that a single instruction can move
2797 quickly between memory and registers or between two memory
2798 locations. */
2800 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
2801 /* A C expression which is nonzero if on this machine it is safe to
2802 "convert" an integer of INPREC bits to one of OUTPREC bits (where
2803 OUTPREC is smaller than INPREC) by merely operating on it as if it
2804 had only OUTPREC bits.
2806 On many machines, this expression can be 1.
2808 When `TRULY_NOOP_TRUNCATION' returns 1 for a pair of sizes for
2809 modes for which `MODES_TIEABLE_P' is 0, suboptimal code can result.
2810 If this is the case, making `TRULY_NOOP_TRUNCATION' return 0 in
2811 such cases may improve things. */
2813 #define Pmode HImode
2814 /* An alias for the machine mode for pointers. On most machines,
2815 define this to be the integer mode corresponding to the width of a
2816 hardware pointer; `SImode' on 32-bit machine or `DImode' on 64-bit
2817 machines. On some machines you must define this to be one of the
2818 partial integer modes, such as `PSImode'.
2820 The width of `Pmode' must be at least as large as the value of
2821 `POINTER_SIZE'. If it is not equal, you must define the macro
2822 `POINTERS_EXTEND_UNSIGNED' to specify how pointers are extended to
2823 `Pmode'. */
2825 #define FUNCTION_MODE HImode
2826 /* An alias for the machine mode used for memory references to
2827 functions being called, in `call' RTL expressions. On most
2828 machines this should be `QImode'. */
2829 /* 1 3 */
2830 #define INTEGRATE_THRESHOLD(DECL) (1 + (3 * list_length (DECL_ARGUMENTS (DECL)) / 2))
2832 /* A C expression for the maximum number of instructions above which
2833 the function DECL should not be inlined. DECL is a
2834 `FUNCTION_DECL' node.
2836 The default definition of this macro is 64 plus 8 times the number
2837 of arguments that the function accepts. Some people think a larger
2838 threshold should be used on RISC machines. */
2840 #define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \
2841 valid_machine_decl_attribute (DECL, ATTRIBUTES, IDENTIFIER, ARGS)
2842 /* `VALID_MACHINE_DECL_ATTRIBUTE (DECL, ATTRIBUTES, IDENTIFIER, ARGS)'
2843 If defined, a C expression whose value is nonzero if IDENTIFIER
2844 with arguments ARGS is a valid machine specific attribute for DECL.
2845 The attributes in ATTRIBUTES have previously been assigned to DECL. */
2847 #define VALID_MACHINE_TYPE_ATTRIBUTE(TYPE, ATTRIBUTES, IDENTIFIER, ARGS) \
2848 valid_machine_type_attribute(TYPE, ATTRIBUTES, IDENTIFIER, ARGS)
2849 /* `VALID_MACHINE_TYPE_ATTRIBUTE (TYPE, ATTRIBUTES, IDENTIFIER, ARGS)'
2850 If defined, a C expression whose value is nonzero if IDENTIFIER
2851 with arguments ARGS is a valid machine specific attribute for TYPE.
2852 The attributes in ATTRIBUTES have previously been assigned to TYPE. */
2854 #define DOLLARS_IN_IDENTIFIERS 0
2855 /* Define this macro to control use of the character `$' in identifier
2856 names. 0 means `$' is not allowed by default; 1 means it is
2857 allowed. 1 is the default; there is no need to define this macro
2858 in that case. This macro controls the compiler proper; it does
2859 not affect the preprocessor. */
2861 #define NO_DOLLAR_IN_LABEL 1
2862 /* Define this macro if the assembler does not accept the character
2863 `$' in label names. By default constructors and destructors in
2864 G++ have `$' in the identifiers. If this macro is defined, `.' is
2865 used instead. */
2867 #define MACHINE_DEPENDENT_REORG(INSN) machine_dependent_reorg (INSN)
2868 /* In rare cases, correct code generation requires extra machine
2869 dependent processing between the second jump optimization pass and
2870 delayed branch scheduling. On those machines, define this macro
2871 as a C statement to act on the code starting at INSN. */
2873 #define GIV_SORT_CRITERION(X, Y) \
2874 if (GET_CODE ((X)->add_val) == CONST_INT \
2875 && GET_CODE ((Y)->add_val) == CONST_INT) \
2876 return INTVAL ((X)->add_val) - INTVAL ((Y)->add_val);
2878 /* `GIV_SORT_CRITERION(GIV1, GIV2)'
2879 In some cases, the strength reduction optimization pass can
2880 produce better code if this is defined. This macro controls the
2881 order that induction variables are combined. This macro is
2882 particularly useful if the target has limited addressing modes.
2883 For instance, the SH target has only positive offsets in
2884 addresses. Thus sorting to put the smallest address first allows
2885 the most combinations to be found. */
2887 /* Define results of standard character escape sequences. */
2888 #define TARGET_BELL 007
2889 #define TARGET_BS 010
2890 #define TARGET_TAB 011
2891 #define TARGET_NEWLINE 012
2892 #define TARGET_VT 013
2893 #define TARGET_FF 014
2894 #define TARGET_CR 015
2898 #define TRAMPOLINE_TEMPLATE(FILE) \
2899 internal_error ("Trampolines not supported\n")
2901 /* Length in units of the trampoline for entering a nested function. */
2903 #define TRAMPOLINE_SIZE 4
2905 /* Emit RTL insns to initialize the variable parts of a trampoline.
2906 FNADDR is an RTX for the address of the function's pure code.
2907 CXT is an RTX for the static chain value for the function. */
2909 #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
2911 emit_move_insn (gen_rtx (MEM, HImode, plus_constant ((TRAMP), 2)), CXT); \
2912 emit_move_insn (gen_rtx (MEM, HImode, plus_constant ((TRAMP), 6)), FNADDR); \
2914 /* Store in cc_status the expressions
2915 that the condition codes will describe
2916 after execution of an instruction whose pattern is EXP.
2917 Do not alter them if the instruction would not alter the cc's. */
2919 #define NOTICE_UPDATE_CC(EXP, INSN) notice_update_cc(EXP, INSN)
2921 /* The add insns don't set overflow in a usable way. */
2922 #define CC_OVERFLOW_UNUSABLE 01000
2923 /* The mov,and,or,xor insns don't set carry. That's ok though as the
2924 Z bit is all we need when doing unsigned comparisons on the result of
2925 these insns (since they're always with 0). However, conditions.h has
2926 CC_NO_OVERFLOW defined for this purpose. Rename it to something more
2927 understandable. */
2928 #define CC_NO_CARRY CC_NO_OVERFLOW
2931 /* Output assembler code to FILE to increment profiler label # LABELNO
2932 for profiling a function entry. */
2934 #define FUNCTION_PROFILER(FILE, LABELNO) \
2935 fprintf (FILE, "/* profiler %d */", (LABELNO))
2937 /* `FIRST_INSN_ADDRESS'
2938 When the `length' insn attribute is used, this macro specifies the
2939 value to be assigned to the address of the first insn in a
2940 function. If not specified, 0 is used. */
2942 #define ADJUST_INSN_LENGTH(INSN, LENGTH) (LENGTH =\
2943 adjust_insn_length (INSN, LENGTH))
2944 /* If defined, modifies the length assigned to instruction INSN as a
2945 function of the context in which it is used. LENGTH is an lvalue
2946 that contains the initially computed length of the insn and should
2947 be updated with the correct length of the insn. If updating is
2948 required, INSN must not be a varying-length insn.
2950 This macro will normally not be required. A case in which it is
2951 required is the ROMP. On this machine, the size of an `addr_vec'
2952 insn must be increased by two to compensate for the fact that
2953 alignment may be required. */
2955 #define TARGET_MEM_FUNCTIONS
2956 /* Define this macro if GNU CC should generate calls to the System V
2957 (and ANSI C) library functions `memcpy' and `memset' rather than
2958 the BSD functions `bcopy' and `bzero'. */
2960 #define CPP_SPEC "\
2961 %{!mmcu*|mmcu=avr2:%(cpp_avr2)} \
2962 %{mmcu=at90s2313:%(cpp_avr2) -D__AVR_AT90S2313__} \
2963 %{mmcu=at90s2323:%(cpp_avr2) -D__AVR_AT90S2323__} \
2964 %{mmcu=at90s2333:%(cpp_avr2) -D__AVR_AT90S2333__} \
2965 %{mmcu=at90s2343:%(cpp_avr2) -D__AVR_AT90S2343__} \
2966 %{mmcu=attiny22: %(cpp_avr2) -D__AVR_ATtiny22__} \
2967 %{mmcu=at90s4433:%(cpp_avr2) -D__AVR_AT90S4433__} \
2968 %{mmcu=at90s4414:%(cpp_avr2) -D__AVR_AT90S4414__} \
2969 %{mmcu=at90s4434:%(cpp_avr2) -D__AVR_AT90S4434__} \
2970 %{mmcu=at90s8515:%(cpp_avr2) -D__AVR_AT90S8515__} \
2971 %{mmcu=at90s8535:%(cpp_avr2) -D__AVR_AT90S8535__} \
2972 %{mmcu=at90c8534:%(cpp_avr2) -D__AVR_AT90C8534__} \
2973 %{mmcu=avr3:%(cpp_avr3)} \
2974 %{mmcu=atmega603:%(cpp_avr3) -D__AVR_ATmega603__} \
2975 %{mmcu=atmega103:%(cpp_avr3) -D__AVR_ATmega103__} \
2976 %{mmcu=avr4:%(cpp_avr4)} \
2977 %{mmcu=atmega83: %(cpp_avr4) -D__AVR_ATmega83__} \
2978 %{mmcu=atmega85: %(cpp_avr4) -D__AVR_ATmega85__} \
2979 %{mmcu=avr5:%(cpp_avr5)} \
2980 %{mmcu=atmega161:%(cpp_avr5) -D__AVR_ATmega161__} \
2981 %{mmcu=atmega163:%(cpp_avr5) -D__AVR_ATmega163__} \
2982 %{mmcu=atmega32: %(cpp_avr5) -D__AVR_ATmega32__} \
2983 %{mmcu=at94k: %(cpp_avr5) -D__AVR_AT94K__} \
2984 %{mmcu=avr1:%(cpp_avr1)} \
2985 %{mmcu=at90s1200:%(cpp_avr1) -D__AVR_AT90S1200__} \
2986 %{mmcu=attiny10|mmcu=attiny11: %(cpp_avr1) -D__AVR_ATtiny11__} \
2987 %{mmcu=attiny12: %(cpp_avr1) -D__AVR_ATtiny12__} \
2988 %{mmcu=attiny15: %(cpp_avr1) -D__AVR_ATtiny15__} \
2989 %{mmcu=attiny28: %(cpp_avr1) -D__AVR_ATtiny28__} \
2990 %{mno-interrupts:-D__NO_INTERRUPTS__} \
2991 %{mint8:-D__SIZE_TYPE__=long\\ unsigned\\ int -D__PTRDIFF_TYPE__=long -D__INT_MAX__=127} \
2992 %{!mint*:-D__SIZE_TYPE__=unsigned\\ int -D__PTRDIFF_TYPE__=int -D__INT_MAX__=32767} \
2993 %{posix:-D_POSIX_SOURCE}"
2994 /* A C string constant that tells the GNU CC driver program options to
2995 pass to CPP. It can also specify how to translate options you
2996 give to GNU CC into options for GNU CC to pass to the CPP.
2998 Do not define this macro if it does not need to do anything. */
3000 #define NO_BUILTIN_SIZE_TYPE
3001 /* If this macro is defined, the preprocessor will not define the
3002 builtin macro `__SIZE_TYPE__'. The macro `__SIZE_TYPE__' must
3003 then be defined by `CPP_SPEC' instead.
3005 This should be defined if `SIZE_TYPE' depends on target dependent
3006 flags which are not accessible to the preprocessor. Otherwise, it
3007 should not be defined. */
3009 #define NO_BUILTIN_PTRDIFF_TYPE
3010 /* If this macro is defined, the preprocessor will not define the
3011 builtin macro `__PTRDIFF_TYPE__'. The macro `__PTRDIFF_TYPE__'
3012 must then be defined by `CPP_SPEC' instead.
3014 This should be defined if `PTRDIFF_TYPE' depends on target
3015 dependent flags which are not accessible to the preprocessor.
3016 Otherwise, it should not be defined.
3018 `SIGNED_CHAR_SPEC'
3019 A C string constant that tells the GNU CC driver program options to
3020 pass to CPP. By default, this macro is defined to pass the option
3021 `-D__CHAR_UNSIGNED__' to CPP if `char' will be treated as
3022 `unsigned char' by `cc1'.
3024 Do not define this macro unless you need to override the default
3025 definition. */
3027 #define CC1_SPEC "%{profile:-p}"
3028 /* A C string constant that tells the GNU CC driver program options to
3029 pass to `cc1'. It can also specify how to translate options you
3030 give to GNU CC into options for GNU CC to pass to the `cc1'.
3032 Do not define this macro if it does not need to do anything. */
3034 #define ASM_SPEC "%{mmcu=*:-mmcu=%*}"
3035 /* A C string constant that tells the GNU CC driver program options to
3036 pass to the assembler. It can also specify how to translate
3037 options you give to GNU CC into options for GNU CC to pass to the
3038 assembler. See the file `sun3.h' for an example of this.
3040 Do not define this macro if it does not need to do anything. */
3042 #define ASM_FINAL_SPEC ""
3043 /* A C string constant that tells the GNU CC driver program how to
3044 run any programs which cleanup after the normal assembler.
3045 Normally, this is not needed. See the file `mips.h' for an
3046 example of this.
3048 Do not define this macro if it does not need to do anything. */
3050 #define LINK_SPEC "\
3051 %{!mmcu*:-m avr85xx} \
3052 %{mmcu=atmega603:-m avrmega603} \
3053 %{mmcu=atmega103:-m avrmega103} \
3054 %{mmcu=atmega161:-m avrmega161} \
3055 %{mmcu=atmega163:-m avrmega161} \
3056 %{mmcu=atmega32:-m avr5} \
3057 %{mmcu=at94k:-m avr5} \
3058 %{mmcu=atmega83:-m avr4} \
3059 %{mmcu=atmega85:-m avr4} \
3060 %{mmcu=at90s1200|mmcu=attiny1*:-m avr1200} \
3061 %{mmcu=attiny28:-m avr1} \
3062 %{mmcu=at90s2313:-m avr23xx} \
3063 %{mmcu=at90s2323:-m avr23xx} \
3064 %{mmcu=attiny22:-m avr23xx} \
3065 %{mmcu=at90s2333:-m avr23xx} \
3066 %{mmcu=at90s2343:-m avr23xx} \
3067 %{mmcu=at90s4433:-m avr4433} \
3068 %{mmcu=at90s4414:-m avr44x4} \
3069 %{mmcu=at90s4434:-m avr44x4} \
3070 %{mmcu=at90c8534:-m avr85xx} \
3071 %{mmcu=at90s8535:-m avr85xx} \
3072 %{mmcu=at90s8515:-m avr85xx}"
3074 /* A C string constant that tells the GNU CC driver program options to
3075 pass to the linker. It can also specify how to translate options
3076 you give to GNU CC into options for GNU CC to pass to the linker.
3078 Do not define this macro if it does not need to do anything. */
3080 #define LIB_SPEC \
3081 "%{!mmcu=at90s1*:%{!mmcu=attiny1*:%{!mmcu=attiny28: -lc }}}"
3082 /* Another C string constant used much like `LINK_SPEC'. The
3083 difference between the two is that `LIB_SPEC' is used at the end
3084 of the command given to the linker.
3086 If this macro is not defined, a default is provided that loads the
3087 standard C library from the usual place. See `gcc.c'. */
3089 #define LIBGCC_SPEC \
3090 "%{!mmcu=at90s1*:%{!mmcu=attiny1*:%{!mmcu=attiny28: -lgcc }}}"
3091 /* Another C string constant that tells the GNU CC driver program how
3092 and when to place a reference to `libgcc.a' into the linker
3093 command line. This constant is placed both before and after the
3094 value of `LIB_SPEC'.
3096 If this macro is not defined, the GNU CC driver provides a default
3097 that passes the string `-lgcc' to the linker unless the `-shared'
3098 option is specified. */
3100 #define STARTFILE_SPEC "%(crt_binutils)"
3101 /* Another C string constant used much like `LINK_SPEC'. The
3102 difference between the two is that `STARTFILE_SPEC' is used at the
3103 very beginning of the command given to the linker.
3105 If this macro is not defined, a default is provided that loads the
3106 standard C startup file from the usual place. See `gcc.c'. */
3108 #define ENDFILE_SPEC ""
3109 /* Another C string constant used much like `LINK_SPEC'. The
3110 difference between the two is that `ENDFILE_SPEC' is used at the
3111 very end of the command given to the linker.
3113 Do not define this macro if it does not need to do anything. */
3115 #define CRT_BINUTILS_SPECS "\
3116 %{mmcu=at90s1200|mmcu=avr1:crts1200.o%s} \
3117 %{mmcu=attiny10|mmcu=attiny11:crttn11.o%s} \
3118 %{mmcu=attiny12:crttn12.o%s} \
3119 %{mmcu=attiny15:crttn15.o%s} \
3120 %{mmcu=attiny28:crttn28.o%s} \
3121 %{!mmcu*|mmcu=at90s8515|mmcu=avr2:crts8515.o%s} \
3122 %{mmcu=at90s2313:crts2313.o%s} \
3123 %{mmcu=at90s2323:crts2323.o%s} \
3124 %{mmcu=attiny22:crttn22.o%s} \
3125 %{mmcu=at90s2333:crts2333.o%s} \
3126 %{mmcu=at90s2343:crts2343.o%s} \
3127 %{mmcu=at90s4433:crts4433.o%s} \
3128 %{mmcu=at90s4414:crts4414.o%s} \
3129 %{mmcu=at90s4434:crts4434.o%s} \
3130 %{mmcu=at90c8534:crtc8534.o%s} \
3131 %{mmcu=at90s8535:crts8535.o%s} \
3132 %{mmcu=atmega103|mmcu=avr3:crtm103.o%s} \
3133 %{mmcu=atmega603:crtm603.o%s} \
3134 %{mmcu=atmega83|mmcu=avr4:crtm83.o%s} \
3135 %{mmcu=atmega85:crtm85.o%s} \
3136 %{mmcu=atmega161|mmcu=avr5:crtm161.o%s} \
3137 %{mmcu=atmega163:crtm163.o%s} \
3138 %{mmcu=atmega32:crtm32.o%s} \
3139 %{mmcu=at94k:crtat94k.o%s}"
3141 #define CPP_AVR1_SPEC "-D__AVR_ARCH__=1 -D__AVR_ASM_ONLY__ "
3142 #define CPP_AVR2_SPEC "-D__AVR_ARCH__=2 "
3143 #define CPP_AVR3_SPEC "-D__AVR_ARCH__=3 -D__AVR_MEGA__ "
3144 #define CPP_AVR4_SPEC "-D__AVR_ARCH__=4 -D__AVR_ENHANCED__ "
3145 #define CPP_AVR5_SPEC "-D__AVR_ARCH__=5 -D__AVR_ENHANCED__ -D__AVR_MEGA__ "
3147 #define EXTRA_SPECS \
3148 {"cpp_avr1", CPP_AVR1_SPEC}, \
3149 {"cpp_avr2", CPP_AVR2_SPEC}, \
3150 {"cpp_avr3", CPP_AVR3_SPEC}, \
3151 {"cpp_avr4", CPP_AVR4_SPEC}, \
3152 {"cpp_avr5", CPP_AVR5_SPEC}, \
3153 {"crt_binutils", CRT_BINUTILS_SPECS},
3154 /* Define this macro to provide additional specifications to put in
3155 the `specs' file that can be used in various specifications like
3156 `CC1_SPEC'.
3158 The definition should be an initializer for an array of structures,
3159 containing a string constant, that defines the specification name,
3160 and a string constant that provides the specification.
3162 Do not define this macro if it does not need to do anything.
3164 `EXTRA_SPECS' is useful when an architecture contains several
3165 related targets, which have various `..._SPECS' which are similar
3166 to each other, and the maintainer would like one central place to
3167 keep these definitions.
3169 For example, the PowerPC System V.4 targets use `EXTRA_SPECS' to
3170 define either `_CALL_SYSV' when the System V calling sequence is
3171 used or `_CALL_AIX' when the older AIX-based calling sequence is
3172 used.
3174 The `config/rs6000/rs6000.h' target file defines:
3176 #define EXTRA_SPECS \
3177 { "cpp_sysv_default", CPP_SYSV_DEFAULT },
3179 #define CPP_SYS_DEFAULT ""
3181 The `config/rs6000/sysv.h' target file defines:
3182 #undef CPP_SPEC
3183 #define CPP_SPEC \
3184 "%{posix: -D_POSIX_SOURCE } \
3185 %{mcall-sysv: -D_CALL_SYSV } %{mcall-aix: -D_CALL_AIX } \
3186 %{!mcall-sysv: %{!mcall-aix: %(cpp_sysv_default) }} \
3187 %{msoft-float: -D_SOFT_FLOAT} %{mcpu=403: -D_SOFT_FLOAT}"
3189 #undef CPP_SYSV_DEFAULT
3190 #define CPP_SYSV_DEFAULT "-D_CALL_SYSV"
3192 while the `config/rs6000/eabiaix.h' target file defines
3193 `CPP_SYSV_DEFAULT' as:
3195 #undef CPP_SYSV_DEFAULT
3196 #define CPP_SYSV_DEFAULT "-D_CALL_AIX" */
3198 /* This is the default without any -mmcu=* option (AT90S*). */
3199 #define MULTILIB_DEFAULTS { "mmcu=avr2" }
3201 /* This is undefined macro for collect2 disabling */
3202 #define LINKER_NAME "ld"
3204 #define TEST_HARD_REG_CLASS(CLASS, REGNO) \
3205 TEST_HARD_REG_BIT (reg_class_contents[ (int) (CLASS)], REGNO)
3207 /* Note that the other files fail to use these
3208 in some of the places where they should. */
3210 #if defined(__STDC__) || defined(ALMOST_STDC)
3211 #define AS2(a,b,c) #a " " #b "," #c
3212 #define AS2C(b,c) " " #b "," #c
3213 #define AS3(a,b,c,d) #a " " #b "," #c "," #d
3214 #define AS1(a,b) #a " " #b
3215 #else
3216 #define AS1(a,b) "a b"
3217 #define AS2(a,b,c) "a b,c"
3218 #define AS2C(b,c) " b,c"
3219 #define AS3(a,b,c,d) "a b,c,d"
3220 #endif
3221 #define OUT_AS1(a,b) output_asm_insn (AS1(a,b), operands)
3222 #define OUT_AS2(a,b,c) output_asm_insn (AS2(a,b,c), operands)
3223 #define CR_TAB "\n\t"
3225 /* Define this macro as a C statement that declares additional library
3226 routines renames existing ones. `init_optabs' calls this macro
3227 after initializing all the normal library routines. */
3229 #define INIT_TARGET_OPTABS \
3231 avr_init_once (); \
3234 /* Temporary register r0 */
3235 #define TMP_REGNO 0
3237 /* zero register r1 */
3238 #define ZERO_REGNO 1
3240 /* Temporary register which used for load immediate values to r0-r15 */
3241 #define LDI_REG_REGNO 31
3243 extern struct rtx_def *tmp_reg_rtx;
3244 extern struct rtx_def *zero_reg_rtx;
3245 extern struct rtx_def *ldi_reg_rtx;
3247 #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
3249 /* Define to use software floating point emulator for REAL_ARITHMETIC and
3250 decimal <-> binary conversion. */
3251 #define REAL_ARITHMETIC
3253 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
3255 #define DBX_REGISTER_NUMBER(r) (r)
3257 /* Get the standard ELF stabs definitions. */
3258 #include "dbxelf.h"