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