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