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