]> gcc.gnu.org Git - gcc.git/blob - gcc/config/fr30/fr30.h
expmed.c (extract_fixed_bit_field): Remove unused code.
[gcc.git] / gcc / config / fr30 / fr30.h
1 /*{{{ Comment. */
2
3 /* Definitions of FR30 target.
4 Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
5 Contributed by Cygnus Solutions.
6
7 This file is part of GNU CC.
8
9 GNU CC is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
12 any later version.
13
14 GNU CC is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with GNU CC; see the file COPYING. If not, write to
21 the Free Software Foundation, 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
23
24 /*}}}*/ \f
25 /*{{{ Driver configuration. */
26
27 /* A C expression which determines whether the option `-CHAR' takes arguments.
28 The value should be the number of arguments that option takes-zero, for many
29 options.
30
31 By default, this macro is defined to handle the standard options properly.
32 You need not define it unless you wish to add additional options which take
33 arguments.
34
35 Defined in svr4.h. */
36 #undef SWITCH_TAKES_ARG
37
38 /* A C expression which determines whether the option `-NAME' takes arguments.
39 The value should be the number of arguments that option takes-zero, for many
40 options. This macro rather than `SWITCH_TAKES_ARG' is used for
41 multi-character option names.
42
43 By default, this macro is defined as `DEFAULT_WORD_SWITCH_TAKES_ARG', which
44 handles the standard options properly. You need not define
45 `WORD_SWITCH_TAKES_ARG' unless you wish to add additional options which take
46 arguments. Any redefinition should call `DEFAULT_WORD_SWITCH_TAKES_ARG' and
47 then check for additional options.
48
49 Defined in svr4.h. */
50 #undef WORD_SWITCH_TAKES_ARG
51
52 /*}}}*/ \f
53 /*{{{ Run-time target specifications. */
54
55 #undef ASM_SPEC
56 #define ASM_SPEC "%{v}"
57
58 /* Define this to be a string constant containing `-D' options to define the
59 predefined macros that identify this machine and system. These macros will
60 be predefined unless the `-ansi' option is specified. */
61
62 #define CPP_PREDEFINES "-Dfr30 -D__fr30__ -Amachine=fr30"
63
64 /* Use LDI:20 instead of LDI:32 to load addresses. */
65 #define TARGET_SMALL_MODEL_MASK (1 << 0)
66 #define TARGET_SMALL_MODEL (target_flags & TARGET_SMALL_MODEL_MASK)
67
68 #define TARGET_DEFAULT 0
69
70 /* This declaration should be present. */
71 extern int target_flags;
72
73 #define TARGET_SWITCHES \
74 { \
75 { "small-model", TARGET_SMALL_MODEL_MASK, \
76 N_("Assume small address space") }, \
77 { "no-small-model", - TARGET_SMALL_MODEL_MASK, "" }, \
78 { "no-lsim", 0, "" }, \
79 { "", TARGET_DEFAULT, "" } \
80 }
81
82 #define TARGET_VERSION fprintf (stderr, " (fr30)");
83
84 /* Define this macro if debugging can be performed even without a frame
85 pointer. If this macro is defined, GNU CC will turn on the
86 `-fomit-frame-pointer' option whenever `-O' is specified. */
87 #define CAN_DEBUG_WITHOUT_FP
88
89 #undef STARTFILE_SPEC
90 #define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
91
92 /* Include the OS stub library, so that the code can be simulated.
93 This is not the right way to do this. Ideally this kind of thing
94 should be done in the linker script - but I have not worked out how
95 to specify the location of a linker script in a gcc command line yet... */
96 #undef ENDFILE_SPEC
97 #define ENDFILE_SPEC "%{!mno-lsim:-lsim} crtend.o%s crtn.o%s"
98
99 /*}}}*/ \f
100 /*{{{ Storage Layout. */
101
102 /* Define this macro to have the value 1 if the most significant bit in a byte
103 has the lowest number; otherwise define it to have the value zero. This
104 means that bit-field instructions count from the most significant bit. If
105 the machine has no bit-field instructions, then this must still be defined,
106 but it doesn't matter which value it is defined to. This macro need not be
107 a constant.
108
109 This macro does not affect the way structure fields are packed into bytes or
110 words; that is controlled by `BYTES_BIG_ENDIAN'. */
111 #define BITS_BIG_ENDIAN 1
112
113 /* Define this macro to have the value 1 if the most significant byte in a word
114 has the lowest number. This macro need not be a constant. */
115 #define BYTES_BIG_ENDIAN 1
116
117 /* Define this macro to have the value 1 if, in a multiword object, the most
118 significant word has the lowest number. This applies to both memory
119 locations and registers; GNU CC fundamentally assumes that the order of
120 words in memory is the same as the order in registers. This macro need not
121 be a constant. */
122 #define WORDS_BIG_ENDIAN 1
123
124 /* Define this macro to be the number of bits in an addressable storage unit
125 (byte); normally 8. */
126 #define BITS_PER_UNIT 8
127
128 /* Number of bits in a word; normally 32. */
129 #define BITS_PER_WORD 32
130
131 /* Number of storage units in a word; normally 4. */
132 #define UNITS_PER_WORD 4
133
134 /* Width of a pointer, in bits. You must specify a value no wider than the
135 width of `Pmode'. If it is not equal to the width of `Pmode', you must
136 define `POINTERS_EXTEND_UNSIGNED'. */
137 #define POINTER_SIZE 32
138
139 /* A macro to update MODE and UNSIGNEDP when an object whose type is TYPE and
140 which has the specified mode and signedness is to be stored in a register.
141 This macro is only called when TYPE is a scalar type.
142
143 On most RISC machines, which only have operations that operate on a full
144 register, define this macro to set M to `word_mode' if M is an integer mode
145 narrower than `BITS_PER_WORD'. In most cases, only integer modes should be
146 widened because wider-precision floating-point operations are usually more
147 expensive than their narrower counterparts.
148
149 For most machines, the macro definition does not change UNSIGNEDP. However,
150 some machines, have instructions that preferentially handle either signed or
151 unsigned quantities of certain modes. For example, on the DEC Alpha, 32-bit
152 loads from memory and 32-bit add instructions sign-extend the result to 64
153 bits. On such machines, set UNSIGNEDP according to which kind of extension
154 is more efficient.
155
156 Do not define this macro if it would never modify MODE. */
157 #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \
158 do \
159 { \
160 if (GET_MODE_CLASS (MODE) == MODE_INT \
161 && GET_MODE_SIZE (MODE) < 4) \
162 (MODE) = SImode; \
163 } \
164 while (0)
165
166 /* Normal alignment required for function parameters on the stack, in bits.
167 All stack parameters receive at least this much alignment regardless of data
168 type. On most machines, this is the same as the size of an integer. */
169 #define PARM_BOUNDARY 32
170
171 /* Define this macro if you wish to preserve a certain alignment for the stack
172 pointer. The definition is a C expression for the desired alignment
173 (measured in bits).
174
175 If `PUSH_ROUNDING' is not defined, the stack will always be aligned to the
176 specified boundary. If `PUSH_ROUNDING' is defined and specifies a less
177 strict alignment than `STACK_BOUNDARY', the stack may be momentarily
178 unaligned while pushing arguments. */
179 #define STACK_BOUNDARY 32
180
181 /* Alignment required for a function entry point, in bits. */
182 #define FUNCTION_BOUNDARY 32
183
184 /* Biggest alignment that any data type can require on this machine,
185 in bits. */
186 #define BIGGEST_ALIGNMENT 32
187
188 /* If defined, a C expression to compute the alignment for a static variable.
189 TYPE is the data type, and ALIGN is the alignment that the object
190 would ordinarily have. The value of this macro is used instead of that
191 alignment to align the object.
192
193 If this macro is not defined, then ALIGN is used.
194
195 One use of this macro is to increase alignment of medium-size data to make
196 it all fit in fewer cache lines. Another is to cause character arrays to be
197 word-aligned so that `strcpy' calls that copy constants to character arrays
198 can be done inline. */
199 #define DATA_ALIGNMENT(TYPE, ALIGN) \
200 (TREE_CODE (TYPE) == ARRAY_TYPE \
201 && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \
202 && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
203
204 /* If defined, a C expression to compute the alignment given to a constant that
205 is being placed in memory. CONSTANT is the constant and ALIGN is the
206 alignment that the object would ordinarily have. The value of this macro is
207 used instead of that alignment to align the object.
208
209 If this macro is not defined, then ALIGN is used.
210
211 The typical use of this macro is to increase alignment for string constants
212 to be word aligned so that `strcpy' calls that copy constants can be done
213 inline. */
214 #define CONSTANT_ALIGNMENT(EXP, ALIGN) \
215 (TREE_CODE (EXP) == STRING_CST \
216 && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
217
218 /* Define this macro to be the value 1 if instructions will fail to work if
219 given data not on the nominal alignment. If instructions will merely go
220 slower in that case, define this macro as 0. */
221 #define STRICT_ALIGNMENT 1
222
223 /* Define this if you wish to imitate the way many other C compilers handle
224 alignment of bitfields and the structures that contain them.
225
226 The behavior is that the type written for a bitfield (`int', `short', or
227 other integer type) imposes an alignment for the entire structure, as if the
228 structure really did contain an ordinary field of that type. In addition,
229 the bitfield is placed within the structure so that it would fit within such
230 a field, not crossing a boundary for it.
231
232 Thus, on most machines, a bitfield whose type is written as `int' would not
233 cross a four-byte boundary, and would force four-byte alignment for the
234 whole structure. (The alignment used may not be four bytes; it is
235 controlled by the other alignment parameters.)
236
237 If the macro is defined, its definition should be a C expression; a nonzero
238 value for the expression enables this behavior.
239
240 Note that if this macro is not defined, or its value is zero, some bitfields
241 may cross more than one alignment boundary. The compiler can support such
242 references if there are `insv', `extv', and `extzv' insns that can directly
243 reference memory.
244
245 The other known way of making bitfields work is to define
246 `STRUCTURE_SIZE_BOUNDARY' as large as `BIGGEST_ALIGNMENT'. Then every
247 structure can be accessed with fullwords.
248
249 Unless the machine has bitfield instructions or you define
250 `STRUCTURE_SIZE_BOUNDARY' that way, you must define
251 `PCC_BITFIELD_TYPE_MATTERS' to have a nonzero value.
252
253 If your aim is to make GNU CC use the same conventions for laying out
254 bitfields as are used by another compiler, here is how to investigate what
255 the other compiler does. Compile and run this program:
256
257 struct foo1
258 {
259 char x;
260 char :0;
261 char y;
262 };
263
264 struct foo2
265 {
266 char x;
267 int :0;
268 char y;
269 };
270
271 main ()
272 {
273 printf ("Size of foo1 is %d\n",
274 sizeof (struct foo1));
275 printf ("Size of foo2 is %d\n",
276 sizeof (struct foo2));
277 exit (0);
278 }
279
280 If this prints 2 and 5, then the compiler's behavior is what you would get
281 from `PCC_BITFIELD_TYPE_MATTERS'.
282
283 Defined in svr4.h. */
284 #define PCC_BITFIELD_TYPE_MATTERS 1
285
286 /* A code distinguishing the floating point format of the target machine.
287 There are three defined values:
288
289 IEEE_FLOAT_FORMAT'
290 This code indicates IEEE floating point. It is the default;
291 there is no need to define this macro when the format is IEEE.
292
293 VAX_FLOAT_FORMAT'
294 This code indicates the peculiar format used on the VAX.
295
296 UNKNOWN_FLOAT_FORMAT'
297 This code indicates any other format.
298
299 The value of this macro is compared with `HOST_FLOAT_FORMAT'
300 to determine whether the target machine has the same format as
301 the host machine. If any other formats are actually in use on supported
302 machines, new codes should be defined for them.
303
304 The ordering of the component words of floating point values stored in
305 memory is controlled by `FLOAT_WORDS_BIG_ENDIAN' for the target machine and
306 `HOST_FLOAT_WORDS_BIG_ENDIAN' for the host. */
307 #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
308
309 /*}}}*/ \f
310 /*{{{ Layout of Source Language Data Types. */
311
312 #define CHAR_TYPE_SIZE 8
313 #define SHORT_TYPE_SIZE 16
314 #define INT_TYPE_SIZE 32
315 #define LONG_TYPE_SIZE 32
316 #define LONG_LONG_TYPE_SIZE 64
317 #define FLOAT_TYPE_SIZE 32
318 #define DOUBLE_TYPE_SIZE 64
319 #define LONG_DOUBLE_TYPE_SIZE 64
320
321 /* An expression whose value is 1 or 0, according to whether the type `char'
322 should be signed or unsigned by default. The user can always override this
323 default with the options `-fsigned-char' and `-funsigned-char'. */
324 #define DEFAULT_SIGNED_CHAR 1
325
326 /*}}}*/ \f
327 /*{{{ REGISTER BASICS. */
328
329 /* Number of hardware registers known to the compiler. They receive numbers 0
330 through `FIRST_PSEUDO_REGISTER-1'; thus, the first pseudo register's number
331 really is assigned the number `FIRST_PSEUDO_REGISTER'. */
332 #define FIRST_PSEUDO_REGISTER 21
333
334 /* Fixed register assignments: */
335
336 /* Here we do a BAD THING - reserve a register for use by the machine
337 description file. There are too many places in compiler where it
338 assumes that it can issue a branch or jump instruction without
339 providing a scratch register for it, and reload just cannot cope, so
340 we keep a register back for these situations. */
341 #define COMPILER_SCRATCH_REGISTER 0
342
343 /* The register that contains the result of a function call. */
344 #define RETURN_VALUE_REGNUM 4
345
346 /* The first register that can contain the arguments to a function. */
347 #define FIRST_ARG_REGNUM 4
348
349 /* A call-used register that can be used during the function prologue. */
350 #define PROLOGUE_TMP_REGNUM COMPILER_SCRATCH_REGISTER
351
352 /* Register numbers used for passing a function's static chain pointer. If
353 register windows are used, the register number as seen by the called
354 function is `STATIC_CHAIN_INCOMING_REGNUM', while the register number as
355 seen by the calling function is `STATIC_CHAIN_REGNUM'. If these registers
356 are the same, `STATIC_CHAIN_INCOMING_REGNUM' need not be defined.
357
358 The static chain register need not be a fixed register.
359
360 If the static chain is passed in memory, these macros should not be defined;
361 instead, the next two macros should be defined. */
362 #define STATIC_CHAIN_REGNUM 12
363 /* #define STATIC_CHAIN_INCOMING_REGNUM */
364
365 /* An FR30 specific hardware register. */
366 #define ACCUMULATOR_REGNUM 13
367
368 /* The register number of the frame pointer register, which is used to access
369 automatic variables in the stack frame. On some machines, the hardware
370 determines which register this is. On other machines, you can choose any
371 register you wish for this purpose. */
372 #define FRAME_POINTER_REGNUM 14
373
374 /* The register number of the stack pointer register, which must also be a
375 fixed register according to `FIXED_REGISTERS'. On most machines, the
376 hardware determines which register this is. */
377 #define STACK_POINTER_REGNUM 15
378
379 /* The following a fake hard registers that describe some of the dedicated
380 registers on the FR30. */
381 #define CONDITION_CODE_REGNUM 16
382 #define RETURN_POINTER_REGNUM 17
383 #define MD_HIGH_REGNUM 18
384 #define MD_LOW_REGNUM 19
385
386 /* An initializer that says which registers are used for fixed purposes all
387 throughout the compiled code and are therefore not available for general
388 allocation. These would include the stack pointer, the frame pointer
389 (except on machines where that can be used as a general register when no
390 frame pointer is needed), the program counter on machines where that is
391 considered one of the addressable registers, and any other numbered register
392 with a standard use.
393
394 This information is expressed as a sequence of numbers, separated by commas
395 and surrounded by braces. The Nth number is 1 if register N is fixed, 0
396 otherwise.
397
398 The table initialized from this macro, and the table initialized by the
399 following one, may be overridden at run time either automatically, by the
400 actions of the macro `CONDITIONAL_REGISTER_USAGE', or by the user with the
401 command options `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG'. */
402 #define FIXED_REGISTERS \
403 { 1, 0, 0, 0, 0, 0, 0, 0, /* 0 - 7 */ \
404 0, 0, 0, 0, 0, 0, 0, 1, /* 8 - 15 */ \
405 1, 1, 1, 1, 1 } /* 16 - 20 */
406
407 /* XXX - MDL and MDH set as fixed for now - this is until I can get the
408 mul patterns working. */
409
410 /* Like `FIXED_REGISTERS' but has 1 for each register that is clobbered (in
411 general) by function calls as well as for fixed registers. This macro
412 therefore identifies the registers that are not available for general
413 allocation of values that must live across function calls.
414
415 If a register has 0 in `CALL_USED_REGISTERS', the compiler automatically
416 saves it on function entry and restores it on function exit, if the register
417 is used within the function. */
418 #define CALL_USED_REGISTERS \
419 { 1, 1, 1, 1, 1, 1, 1, 1, /* 0 - 7 */ \
420 0, 0, 0, 0, 1, 1, 0, 1, /* 8 - 15 */ \
421 1, 1, 1, 1, 1 } /* 16 - 20 */
422
423 /* A C initializer containing the assembler's names for the machine registers,
424 each one as a C string constant. This is what translates register numbers
425 in the compiler into assembler language. */
426 #define REGISTER_NAMES \
427 { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
428 "r8", "r9", "r10", "r11", "r12", "ac", "fp", "sp", \
429 "cc", "rp", "mdh", "mdl", "ap" \
430 }
431
432 /* If defined, a C initializer for an array of structures containing a name and
433 a register number. This macro defines additional names for hard registers,
434 thus allowing the `asm' option in declarations to refer to registers using
435 alternate names. */
436 #define ADDITIONAL_REGISTER_NAMES \
437 { \
438 {"r13", 13}, {"r14", 14}, {"r15", 15}, {"usp", 15}, {"ps", 16}\
439 }
440
441 /*}}}*/ \f
442 /*{{{ How Values Fit in Registers. */
443
444 /* A C expression for the number of consecutive hard registers, starting at
445 register number REGNO, required to hold a value of mode MODE. */
446
447 #define HARD_REGNO_NREGS(REGNO, MODE) \
448 ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
449
450 /* A C expression that is nonzero if it is permissible to store a value of mode
451 MODE in hard register number REGNO (or in several registers starting with
452 that one). */
453
454 #define HARD_REGNO_MODE_OK(REGNO, MODE) 1
455
456 /* A C expression that is nonzero if it is desirable to choose register
457 allocation so as to avoid move instructions between a value of mode MODE1
458 and a value of mode MODE2.
459
460 If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R, MODE2)' are
461 ever different for any R, then `MODES_TIEABLE_P (MODE1, MODE2)' must be
462 zero. */
463 #define MODES_TIEABLE_P(MODE1, MODE2) 1
464
465 /*}}}*/ \f
466 /*{{{ Register Classes. */
467
468 /* An enumeral type that must be defined with all the register class names as
469 enumeral values. `NO_REGS' must be first. `ALL_REGS' must be the last
470 register class, followed by one more enumeral value, `LIM_REG_CLASSES',
471 which is not a register class but rather tells how many classes there are.
472
473 Each register class has a number, which is the value of casting the class
474 name to type `int'. The number serves as an index in many of the tables
475 described below. */
476 enum reg_class
477 {
478 NO_REGS,
479 MULTIPLY_32_REG, /* the MDL register as used by the MULH, MULUH insns */
480 MULTIPLY_64_REG, /* the MDH,MDL register pair as used by MUL and MULU */
481 LOW_REGS, /* registers 0 through 7 */
482 HIGH_REGS, /* registers 8 through 15 */
483 REAL_REGS, /* ie all the general hardware registers on the FR30 */
484 ALL_REGS,
485 LIM_REG_CLASSES
486 };
487
488 #define GENERAL_REGS REAL_REGS
489 #define N_REG_CLASSES ((int) LIM_REG_CLASSES)
490
491 /* An initializer containing the names of the register classes as C string
492 constants. These names are used in writing some of the debugging dumps. */
493 #define REG_CLASS_NAMES \
494 { \
495 "NO_REGS", \
496 "MULTIPLY_32_REG", \
497 "MULTIPLY_64_REG", \
498 "LOW_REGS", \
499 "HIGH_REGS", \
500 "REAL_REGS", \
501 "ALL_REGS" \
502 }
503
504 /* An initializer containing the contents of the register classes, as integers
505 which are bit masks. The Nth integer specifies the contents of class N.
506 The way the integer MASK is interpreted is that register R is in the class
507 if `MASK & (1 << R)' is 1.
508
509 When the machine has more than 32 registers, an integer does not suffice.
510 Then the integers are replaced by sub-initializers, braced groupings
511 containing several integers. Each sub-initializer must be suitable as an
512 initializer for the type `HARD_REG_SET' which is defined in
513 `hard-reg-set.h'. */
514 #define REG_CLASS_CONTENTS \
515 { \
516 { 0 }, \
517 { 1 << MD_LOW_REGNUM }, \
518 { (1 << MD_LOW_REGNUM) | (1 << MD_HIGH_REGNUM) }, \
519 { (1 << 8) - 1 }, \
520 { ((1 << 8) - 1) << 8 }, \
521 { (1 << CONDITION_CODE_REGNUM) - 1 }, \
522 { (1 << FIRST_PSEUDO_REGISTER) - 1 } \
523 }
524
525 /* A C expression whose value is a register class containing hard register
526 REGNO. In general there is more than one such class; choose a class which
527 is "minimal", meaning that no smaller class also contains the register. */
528 #define REGNO_REG_CLASS(REGNO) \
529 ( (REGNO) < 8 ? LOW_REGS \
530 : (REGNO) < CONDITION_CODE_REGNUM ? HIGH_REGS \
531 : (REGNO) == MD_LOW_REGNUM ? MULTIPLY_32_REG \
532 : (REGNO) == MD_HIGH_REGNUM ? MULTIPLY_64_REG \
533 : ALL_REGS)
534
535 /* A macro whose definition is the name of the class to which a valid base
536 register must belong. A base register is one used in an address which is
537 the register value plus a displacement. */
538 #define BASE_REG_CLASS REAL_REGS
539
540 /* A macro whose definition is the name of the class to which a valid index
541 register must belong. An index register is one used in an address where its
542 value is either multiplied by a scale factor or added to another register
543 (as well as added to a displacement). */
544 #define INDEX_REG_CLASS REAL_REGS
545
546 /* A C expression which defines the machine-dependent operand constraint
547 letters for register classes. If CHAR is such a letter, the value should be
548 the register class corresponding to it. Otherwise, the value should be
549 `NO_REGS'. The register letter `r', corresponding to class `GENERAL_REGS',
550 will not be passed to this macro; you do not need to handle it.
551
552 The following letters are unavailable, due to being used as
553 constraints:
554 '0'..'9'
555 '<', '>'
556 'E', 'F', 'G', 'H'
557 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P'
558 'Q', 'R', 'S', 'T', 'U'
559 'V', 'X'
560 'g', 'i', 'm', 'n', 'o', 'p', 'r', 's' */
561
562 #define REG_CLASS_FROM_LETTER(CHAR) \
563 ( (CHAR) == 'd' ? MULTIPLY_64_REG \
564 : (CHAR) == 'e' ? MULTIPLY_32_REG \
565 : (CHAR) == 'h' ? HIGH_REGS \
566 : (CHAR) == 'l' ? LOW_REGS \
567 : (CHAR) == 'a' ? ALL_REGS \
568 : NO_REGS)
569
570 /* A C expression which is nonzero if register number NUM is suitable for use
571 as a base register in operand addresses. It may be either a suitable hard
572 register or a pseudo register that has been allocated such a hard register. */
573 #define REGNO_OK_FOR_BASE_P(NUM) 1
574
575 /* A C expression which is nonzero if register number NUM is suitable for use
576 as an index register in operand addresses. It may be either a suitable hard
577 register or a pseudo register that has been allocated such a hard register.
578
579 The difference between an index register and a base register is that the
580 index register may be scaled. If an address involves the sum of two
581 registers, neither one of them scaled, then either one may be labeled the
582 "base" and the other the "index"; but whichever labeling is used must fit
583 the machine's constraints of which registers may serve in each capacity.
584 The compiler will try both labelings, looking for one that is valid, and
585 will reload one or both registers only if neither labeling works. */
586 #define REGNO_OK_FOR_INDEX_P(NUM) 1
587
588 /* A C expression that places additional restrictions on the register class to
589 use when it is necessary to copy value X into a register in class CLASS.
590 The value is a register class; perhaps CLASS, or perhaps another, smaller
591 class. On many machines, the following definition is safe:
592
593 #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS
594
595 Sometimes returning a more restrictive class makes better code. For
596 example, on the 68000, when X is an integer constant that is in range for a
597 `moveq' instruction, the value of this macro is always `DATA_REGS' as long
598 as CLASS includes the data registers. Requiring a data register guarantees
599 that a `moveq' will be used.
600
601 If X is a `const_double', by returning `NO_REGS' you can force X into a
602 memory constant. This is useful on certain machines where immediate
603 floating values cannot be loaded into certain kinds of registers. */
604 #define PREFERRED_RELOAD_CLASS(X, CLASS) CLASS
605
606 /* A C expression for the maximum number of consecutive registers of
607 class CLASS needed to hold a value of mode MODE.
608
609 This is closely related to the macro `HARD_REGNO_NREGS'. In fact, the value
610 of the macro `CLASS_MAX_NREGS (CLASS, MODE)' should be the maximum value of
611 `HARD_REGNO_NREGS (REGNO, MODE)' for all REGNO values in the class CLASS.
612
613 This macro helps control the handling of multiple-word values in
614 the reload pass. */
615 #define CLASS_MAX_NREGS(CLASS, MODE) HARD_REGNO_NREGS (0, MODE)
616
617 /*}}}*/ \f
618 /*{{{ CONSTANTS. */
619
620 /* A C expression that defines the machine-dependent operand constraint letters
621 (`I', `J', `K', .. 'P') that specify particular ranges of integer values.
622 If C is one of those letters, the expression should check that VALUE, an
623 integer, is in the appropriate range and return 1 if so, 0 otherwise. If C
624 is not one of those letters, the value should be 0 regardless of VALUE. */
625 #define CONST_OK_FOR_LETTER_P(VALUE, C) \
626 ( (C) == 'I' ? IN_RANGE (VALUE, 0, 15) \
627 : (C) == 'J' ? IN_RANGE (VALUE, -16, -1) \
628 : (C) == 'K' ? IN_RANGE (VALUE, 16, 31) \
629 : (C) == 'L' ? IN_RANGE (VALUE, 0, (1 << 8) - 1) \
630 : (C) == 'M' ? IN_RANGE (VALUE, 0, (1 << 20) - 1) \
631 : (C) == 'P' ? IN_RANGE (VALUE, -(1 << 8), (1 << 8) - 1) \
632 : 0)
633
634 /* A C expression that defines the machine-dependent operand constraint letters
635 (`G', `H') that specify particular ranges of `const_double' values.
636
637 If C is one of those letters, the expression should check that VALUE, an RTX
638 of code `const_double', is in the appropriate range and return 1 if so, 0
639 otherwise. If C is not one of those letters, the value should be 0
640 regardless of VALUE.
641
642 `const_double' is used for all floating-point constants and for `DImode'
643 fixed-point constants. A given letter can accept either or both kinds of
644 values. It can use `GET_MODE' to distinguish between these kinds. */
645 #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0
646
647 /* A C expression that defines the optional machine-dependent constraint
648 letters (`Q', `R', `S', `T', `U') that can be used to segregate specific
649 types of operands, usually memory references, for the target machine.
650 Normally this macro will not be defined. If it is required for a particular
651 target machine, it should return 1 if VALUE corresponds to the operand type
652 represented by the constraint letter C. If C is not defined as an extra
653 constraint, the value returned should be 0 regardless of VALUE.
654
655 For example, on the ROMP, load instructions cannot have their output in r0
656 if the memory reference contains a symbolic address. Constraint letter `Q'
657 is defined as representing a memory address that does *not* contain a
658 symbolic address. An alternative is specified with a `Q' constraint on the
659 input and `r' on the output. The next alternative specifies `m' on the
660 input and a register class that does not include r0 on the output. */
661 #define EXTRA_CONSTRAINT(VALUE, C) \
662 ((C) == 'Q' ? (GET_CODE (VALUE) == MEM && GET_CODE (XEXP (VALUE, 0)) == SYMBOL_REF) : 0)
663
664 /*}}}*/ \f
665 /*{{{ Basic Stack Layout. */
666
667 /* Define this macro if pushing a word onto the stack moves the stack pointer
668 to a smaller address. */
669 #define STACK_GROWS_DOWNWARD 1
670
671 /* Define this macro if the addresses of local variable slots are at negative
672 offsets from the frame pointer. */
673 #define FRAME_GROWS_DOWNWARD 1
674
675 /* Offset from the frame pointer to the first local variable slot to be
676 allocated.
677
678 If `FRAME_GROWS_DOWNWARD', find the next slot's offset by subtracting the
679 first slot's length from `STARTING_FRAME_OFFSET'. Otherwise, it is found by
680 adding the length of the first slot to the value `STARTING_FRAME_OFFSET'. */
681 /* #define STARTING_FRAME_OFFSET -4 */
682 #define STARTING_FRAME_OFFSET 0
683
684 /* Offset from the stack pointer register to the first location at which
685 outgoing arguments are placed. If not specified, the default value of zero
686 is used. This is the proper value for most machines.
687
688 If `ARGS_GROW_DOWNWARD', this is the offset to the location above the first
689 location at which outgoing arguments are placed. */
690 #define STACK_POINTER_OFFSET 0
691
692 /* Offset from the argument pointer register to the first argument's address.
693 On some machines it may depend on the data type of the function.
694
695 If `ARGS_GROW_DOWNWARD', this is the offset to the location above the first
696 argument's address. */
697 #define FIRST_PARM_OFFSET(FUNDECL) 0
698
699 /* A C expression whose value is RTL representing the location of the incoming
700 return address at the beginning of any function, before the prologue. This
701 RTL is either a `REG', indicating that the return value is saved in `REG',
702 or a `MEM' representing a location in the stack.
703
704 You only need to define this macro if you want to support call frame
705 debugging information like that provided by DWARF 2. */
706 #define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (SImode, RETURN_POINTER_REGNUM)
707
708 /*}}}*/ \f
709 /*{{{ Register That Address the Stack Frame. */
710
711 /* The register number of the arg pointer register, which is used to access the
712 function's argument list. On some machines, this is the same as the frame
713 pointer register. On some machines, the hardware determines which register
714 this is. On other machines, you can choose any register you wish for this
715 purpose. If this is not the same register as the frame pointer register,
716 then you must mark it as a fixed register according to `FIXED_REGISTERS', or
717 arrange to be able to eliminate it. */
718 #define ARG_POINTER_REGNUM 20
719
720 /*}}}*/ \f
721 /*{{{ Eliminating the Frame Pointer and the Arg Pointer. */
722
723 /* A C expression which is nonzero if a function must have and use a frame
724 pointer. This expression is evaluated in the reload pass. If its value is
725 nonzero the function will have a frame pointer.
726
727 The expression can in principle examine the current function and decide
728 according to the facts, but on most machines the constant 0 or the constant
729 1 suffices. Use 0 when the machine allows code to be generated with no
730 frame pointer, and doing so saves some time or space. Use 1 when there is
731 no possible advantage to avoiding a frame pointer.
732
733 In certain cases, the compiler does not know how to produce valid code
734 without a frame pointer. The compiler recognizes those cases and
735 automatically gives the function a frame pointer regardless of what
736 `FRAME_POINTER_REQUIRED' says. You don't need to worry about them.
737
738 In a function that does not require a frame pointer, the frame pointer
739 register can be allocated for ordinary usage, unless you mark it as a fixed
740 register. See `FIXED_REGISTERS' for more information. */
741 /* #define FRAME_POINTER_REQUIRED 0 */
742 #define FRAME_POINTER_REQUIRED \
743 (flag_omit_frame_pointer == 0 || current_function_pretend_args_size > 0)
744
745 /* If defined, this macro specifies a table of register pairs used to eliminate
746 unneeded registers that point into the stack frame. If it is not defined,
747 the only elimination attempted by the compiler is to replace references to
748 the frame pointer with references to the stack pointer.
749
750 The definition of this macro is a list of structure initializations, each of
751 which specifies an original and replacement register.
752
753 On some machines, the position of the argument pointer is not known until
754 the compilation is completed. In such a case, a separate hard register must
755 be used for the argument pointer. This register can be eliminated by
756 replacing it with either the frame pointer or the argument pointer,
757 depending on whether or not the frame pointer has been eliminated.
758
759 In this case, you might specify:
760 #define ELIMINABLE_REGS \
761 {{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
762 {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \
763 {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}}
764
765 Note that the elimination of the argument pointer with the stack pointer is
766 specified first since that is the preferred elimination. */
767
768 #define ELIMINABLE_REGS \
769 { \
770 {ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
771 {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \
772 {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM} \
773 }
774
775 /* A C expression that returns non-zero if the compiler is allowed to try to
776 replace register number FROM with register number TO. This macro
777 need only be defined if `ELIMINABLE_REGS' is defined, and will usually be
778 the constant 1, since most of the cases preventing register elimination are
779 things that the compiler already knows about. */
780
781 #define CAN_ELIMINATE(FROM, TO) \
782 ((TO) == FRAME_POINTER_REGNUM || ! frame_pointer_needed)
783
784 /* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'. It specifies the
785 initial difference between the specified pair of registers. This macro must
786 be defined if `ELIMINABLE_REGS' is defined. */
787 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
788 (OFFSET) = fr30_compute_frame_size (FROM, TO)
789
790 /*}}}*/ \f
791 /*{{{ Passing Function Arguments on the Stack. */
792
793 /* Define this macro if an argument declared in a prototype as an integral type
794 smaller than `int' should actually be passed as an `int'. In addition to
795 avoiding errors in certain cases of mismatch, it also makes for better code
796 on certain machines. */
797 #define PROMOTE_PROTOTYPES 1
798
799 /* If defined, the maximum amount of space required for outgoing arguments will
800 be computed and placed into the variable
801 `current_function_outgoing_args_size'. No space will be pushed onto the
802 stack for each call; instead, the function prologue should increase the
803 stack frame size by this amount.
804
805 Defining both `PUSH_ROUNDING' and `ACCUMULATE_OUTGOING_ARGS' is not
806 proper. */
807 #define ACCUMULATE_OUTGOING_ARGS 1
808
809 /* A C expression that should indicate the number of bytes of its own arguments
810 that a function pops on returning, or 0 if the function pops no arguments
811 and the caller must therefore pop them all after the function returns.
812
813 FUNDECL is a C variable whose value is a tree node that describes the
814 function in question. Normally it is a node of type `FUNCTION_DECL' that
815 describes the declaration of the function. From this it is possible to
816 obtain the DECL_ATTRIBUTES of the function.
817
818 FUNTYPE is a C variable whose value is a tree node that describes the
819 function in question. Normally it is a node of type `FUNCTION_TYPE' that
820 describes the data type of the function. From this it is possible to obtain
821 the data types of the value and arguments (if known).
822
823 When a call to a library function is being considered, FUNTYPE will contain
824 an identifier node for the library function. Thus, if you need to
825 distinguish among various library functions, you can do so by their names.
826 Note that "library function" in this context means a function used to
827 perform arithmetic, whose name is known specially in the compiler and was
828 not mentioned in the C code being compiled.
829
830 STACK-SIZE is the number of bytes of arguments passed on the stack. If a
831 variable number of bytes is passed, it is zero, and argument popping will
832 always be the responsibility of the calling function.
833
834 On the VAX, all functions always pop their arguments, so the definition of
835 this macro is STACK-SIZE. On the 68000, using the standard calling
836 convention, no functions pop their arguments, so the value of the macro is
837 always 0 in this case. But an alternative calling convention is available
838 in which functions that take a fixed number of arguments pop them but other
839 functions (such as `printf') pop nothing (the caller pops all). When this
840 convention is in use, FUNTYPE is examined to determine whether a function
841 takes a fixed number of arguments. */
842 #define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACK_SIZE) 0
843
844 /* Implement `va_arg'. */
845 #define EXPAND_BUILTIN_VA_ARG(valist, type) \
846 fr30_va_arg (valist, type)
847
848 /*}}}*/ \f
849 /*{{{ Function Arguments in Registers. */
850
851 /* Nonzero if we do not know how to pass TYPE solely in registers.
852 We cannot do so in the following cases:
853
854 - if the type has variable size
855 - if the type is marked as addressable (it is required to be constructed
856 into the stack)
857 - if the type is a structure or union. */
858
859 #define MUST_PASS_IN_STACK(MODE, TYPE) \
860 (((MODE) == BLKmode) \
861 || ((TYPE) != NULL \
862 && TYPE_SIZE (TYPE) != NULL \
863 && (TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST \
864 || TREE_CODE (TYPE) == RECORD_TYPE \
865 || TREE_CODE (TYPE) == UNION_TYPE \
866 || TREE_CODE (TYPE) == QUAL_UNION_TYPE \
867 || TREE_ADDRESSABLE (TYPE))))
868
869 /* The number of register assigned to holding function arguments. */
870
871 #define FR30_NUM_ARG_REGS 4
872
873 /* A C expression that controls whether a function argument is passed in a
874 register, and which register.
875
876 The usual way to make the ANSI library `stdarg.h' work on a machine where
877 some arguments are usually passed in registers, is to cause nameless
878 arguments to be passed on the stack instead. This is done by making
879 `FUNCTION_ARG' return 0 whenever NAMED is 0.
880
881 You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of
882 this macro to determine if this argument is of a type that must be passed in
883 the stack. If `REG_PARM_STACK_SPACE' is not defined and `FUNCTION_ARG'
884 returns non-zero for such an argument, the compiler will abort. If
885 `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the
886 stack and then loaded into a register. */
887
888 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
889 ( (NAMED) == 0 ? NULL_RTX \
890 : MUST_PASS_IN_STACK (MODE, TYPE) ? NULL_RTX \
891 : (CUM) >= FR30_NUM_ARG_REGS ? NULL_RTX \
892 : gen_rtx (REG, MODE, CUM + FIRST_ARG_REGNUM))
893
894 /* A C type for declaring a variable that is used as the first argument of
895 `FUNCTION_ARG' and other related values. For some target machines, the type
896 `int' suffices and can hold the number of bytes of argument so far.
897
898 There is no need to record in `CUMULATIVE_ARGS' anything about the arguments
899 that have been passed on the stack. The compiler has other variables to
900 keep track of that. For target machines on which all arguments are passed
901 on the stack, there is no need to store anything in `CUMULATIVE_ARGS';
902 however, the data structure must exist and should not be empty, so use
903 `int'. */
904 /* On the FR30 this value is an accumulating count of the number of argument
905 registers that have been filled with argument values, as opposed to say,
906 the number of bytes of argument accumulated so far. */
907 typedef int CUMULATIVE_ARGS;
908
909 /* A C expression for the number of words, at the beginning of an argument,
910 must be put in registers. The value must be zero for arguments that are
911 passed entirely in registers or that are entirely pushed on the stack.
912
913 On some machines, certain arguments must be passed partially in registers
914 and partially in memory. On these machines, typically the first N words of
915 arguments are passed in registers, and the rest on the stack. If a
916 multi-word argument (a `double' or a structure) crosses that boundary, its
917 first few words must be passed in registers and the rest must be pushed.
918 This macro tells the compiler when this occurs, and how many of the words
919 should go in registers.
920
921 `FUNCTION_ARG' for these arguments should return the first register to be
922 used by the caller for this argument; likewise `FUNCTION_INCOMING_ARG', for
923 the called function. */
924 #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
925 fr30_function_arg_partial_nregs (CUM, MODE, TYPE, NAMED)
926
927 /* A C expression that indicates when an argument must be passed by reference.
928 If nonzero for an argument, a copy of that argument is made in memory and a
929 pointer to the argument is passed instead of the argument itself. The
930 pointer is passed in whatever way is appropriate for passing a pointer to
931 that type.
932
933 On machines where `REG_PARM_STACK_SPACE' is not defined, a suitable
934 definition of this macro might be:
935 #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
936 MUST_PASS_IN_STACK (MODE, TYPE) */
937 #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
938 MUST_PASS_IN_STACK (MODE, TYPE)
939
940 /* A C statement (sans semicolon) for initializing the variable CUM for the
941 state at the beginning of the argument list. The variable has type
942 `CUMULATIVE_ARGS'. The value of FNTYPE is the tree node for the data type
943 of the function which will receive the args, or 0 if the args are to a
944 compiler support library function. The value of INDIRECT is nonzero when
945 processing an indirect call, for example a call through a function pointer.
946 The value of INDIRECT is zero for a call to an explicitly named function, a
947 library function call, or when `INIT_CUMULATIVE_ARGS' is used to find
948 arguments for the function being compiled.
949
950 When processing a call to a compiler support library function, LIBNAME
951 identifies which one. It is a `symbol_ref' rtx which contains the name of
952 the function, as a string. LIBNAME is 0 when an ordinary C function call is
953 being processed. Thus, each time this macro is called, either LIBNAME or
954 FNTYPE is nonzero, but never both of them at once. */
955 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) (CUM) = 0
956
957 /* A C statement (sans semicolon) to update the summarizer variable CUM to
958 advance past an argument in the argument list. The values MODE, TYPE and
959 NAMED describe that argument. Once this is done, the variable CUM is
960 suitable for analyzing the *following* argument with `FUNCTION_ARG', etc.
961
962 This macro need not do anything if the argument in question was passed on
963 the stack. The compiler knows how to track the amount of stack space used
964 for arguments without any special help. */
965 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
966 (CUM) += (NAMED) * fr30_num_arg_regs (MODE, TYPE)
967
968 /* A C expression that is nonzero if REGNO is the number of a hard register in
969 which function arguments are sometimes passed. This does *not* include
970 implicit arguments such as the static chain and the structure-value address.
971 On many machines, no registers can be used for this purpose since all
972 function arguments are pushed on the stack. */
973 #define FUNCTION_ARG_REGNO_P(REGNO) \
974 ((REGNO) >= FIRST_ARG_REGNUM && ((REGNO) < FIRST_ARG_REGNUM + FR30_NUM_ARG_REGS))
975
976 /*}}}*/ \f
977 /*{{{ How Scalar Function Values are Returned. */
978
979 /* A C expression to create an RTX representing the place where a function
980 returns a value of data type VALTYPE. VALTYPE is a tree node representing a
981 data type. Write `TYPE_MODE (VALTYPE)' to get the machine mode used to
982 represent that type. On many machines, only the mode is relevant.
983 (Actually, on most machines, scalar values are returned in the same place
984 regardless of mode).
985
986 If `PROMOTE_FUNCTION_RETURN' is defined, you must apply the same promotion
987 rules specified in `PROMOTE_MODE' if VALTYPE is a scalar type.
988
989 If the precise function being called is known, FUNC is a tree node
990 (`FUNCTION_DECL') for it; otherwise, FUNC is a null pointer. This makes it
991 possible to use a different value-returning convention for specific
992 functions when all their calls are known.
993
994 `FUNCTION_VALUE' is not used for return vales with aggregate data types,
995 because these are returned in another way. See `STRUCT_VALUE_REGNUM' and
996 related macros, below. */
997 #define FUNCTION_VALUE(VALTYPE, FUNC) \
998 gen_rtx_REG (TYPE_MODE (VALTYPE), RETURN_VALUE_REGNUM)
999
1000 /* A C expression to create an RTX representing the place where a library
1001 function returns a value of mode MODE. If the precise function being called
1002 is known, FUNC is a tree node (`FUNCTION_DECL') for it; otherwise, FUNC is a
1003 null pointer. This makes it possible to use a different value-returning
1004 convention for specific functions when all their calls are known.
1005
1006 Note that "library function" in this context means a compiler support
1007 routine, used to perform arithmetic, whose name is known specially by the
1008 compiler and was not mentioned in the C code being compiled.
1009
1010 The definition of `LIBRARY_VALUE' need not be concerned aggregate data
1011 types, because none of the library functions returns such types. */
1012 #define LIBCALL_VALUE(MODE) gen_rtx (REG, MODE, RETURN_VALUE_REGNUM)
1013
1014 /* A C expression that is nonzero if REGNO is the number of a hard register in
1015 which the values of called function may come back. */
1016
1017 #define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == RETURN_VALUE_REGNUM)
1018
1019 /*}}}*/ \f
1020 /*{{{ How Large Values are Returned. */
1021
1022 /* Define this macro to be 1 if all structure and union return values must be
1023 in memory. Since this results in slower code, this should be defined only
1024 if needed for compatibility with other compilers or with an ABI. If you
1025 define this macro to be 0, then the conventions used for structure and union
1026 return values are decided by the `RETURN_IN_MEMORY' macro.
1027
1028 If not defined, this defaults to the value 1. */
1029 #define DEFAULT_PCC_STRUCT_RETURN 1
1030
1031 /* If the structure value address is not passed in a register, define
1032 `STRUCT_VALUE' as an expression returning an RTX for the place where the
1033 address is passed. If it returns 0, the address is passed as an "invisible"
1034 first argument. */
1035 #define STRUCT_VALUE 0
1036
1037 /*}}}*/ \f
1038 /*{{{ Generating Code for Profiling. */
1039
1040 /* A C statement or compound statement to output to FILE some assembler code to
1041 call the profiling subroutine `mcount'. Before calling, the assembler code
1042 must load the address of a counter variable into a register where `mcount'
1043 expects to find the address. The name of this variable is `LP' followed by
1044 the number LABELNO, so you would generate the name using `LP%d' in a
1045 `fprintf'.
1046
1047 The details of how the address should be passed to `mcount' are determined
1048 by your operating system environment, not by GNU CC. To figure them out,
1049 compile a small program for profiling using the system's installed C
1050 compiler and look at the assembler code that results. */
1051 #define FUNCTION_PROFILER(FILE, LABELNO) \
1052 { \
1053 fprintf (FILE, "\t mov rp, r1\n" ); \
1054 fprintf (FILE, "\t ldi:32 mcount, r0\n" ); \
1055 fprintf (FILE, "\t call @r0\n" ); \
1056 fprintf (FILE, ".word\tLP%d\n", LABELNO); \
1057 }
1058
1059 /*}}}*/ \f
1060 /*{{{ Implementing the VARARGS Macros. */
1061
1062 /* This macro offers an alternative to using `__builtin_saveregs' and defining
1063 the macro `EXPAND_BUILTIN_SAVEREGS'. Use it to store the anonymous register
1064 arguments into the stack so that all the arguments appear to have been
1065 passed consecutively on the stack. Once this is done, you can use the
1066 standard implementation of varargs that works for machines that pass all
1067 their arguments on the stack.
1068
1069 The argument ARGS_SO_FAR is the `CUMULATIVE_ARGS' data structure, containing
1070 the values that obtain after processing of the named arguments. The
1071 arguments MODE and TYPE describe the last named argument--its machine mode
1072 and its data type as a tree node.
1073
1074 The macro implementation should do two things: first, push onto the stack
1075 all the argument registers *not* used for the named arguments, and second,
1076 store the size of the data thus pushed into the `int'-valued variable whose
1077 name is supplied as the argument PRETEND_ARGS_SIZE. The value that you
1078 store here will serve as additional offset for setting up the stack frame.
1079
1080 Because you must generate code to push the anonymous arguments at compile
1081 time without knowing their data types, `SETUP_INCOMING_VARARGS' is only
1082 useful on machines that have just a single category of argument register and
1083 use it uniformly for all data types.
1084
1085 If the argument SECOND_TIME is nonzero, it means that the arguments of the
1086 function are being analyzed for the second time. This happens for an inline
1087 function, which is not actually compiled until the end of the source file.
1088 The macro `SETUP_INCOMING_VARARGS' should not generate any instructions in
1089 this case. */
1090 #define SETUP_INCOMING_VARARGS(ARGS_SO_FAR, MODE, TYPE, PRETEND_ARGS_SIZE, SECOND_TIME) \
1091 if (! SECOND_TIME) \
1092 fr30_setup_incoming_varargs (ARGS_SO_FAR, MODE, TYPE, & PRETEND_ARGS_SIZE)
1093
1094 /* Define this macro if the location where a function argument is passed
1095 depends on whether or not it is a named argument.
1096
1097 This macro controls how the NAMED argument to `FUNCTION_ARG' is set for
1098 varargs and stdarg functions. With this macro defined, the NAMED argument
1099 is always true for named arguments, and false for unnamed arguments. If
1100 this is not defined, but `SETUP_INCOMING_VARARGS' is defined, then all
1101 arguments are treated as named. Otherwise, all named arguments except the
1102 last are treated as named. */
1103 #define STRICT_ARGUMENT_NAMING 0
1104
1105 /*}}}*/ \f
1106 /*{{{ Trampolines for Nested Functions. */
1107
1108 /* On the FR30, the trampoline is:
1109
1110 nop
1111 ldi:32 STATIC, r12
1112 nop
1113 ldi:32 FUNCTION, r0
1114 jmp @r0
1115
1116 The no-ops are to guarantee that the the static chain and final
1117 target are 32 bit ailgned within the trampoline. That allows us to
1118 initialize those locations with simple SImode stores. The alternative
1119 would be to use HImode stores. */
1120
1121 /* A C statement to output, on the stream FILE, assembler code for a block of
1122 data that contains the constant parts of a trampoline. This code should not
1123 include a label--the label is taken care of automatically. */
1124 #define TRAMPOLINE_TEMPLATE(FILE) \
1125 { \
1126 fprintf (FILE, "\tnop\n"); \
1127 fprintf (FILE, "\tldi:32\t#0, %s\n", reg_names [STATIC_CHAIN_REGNUM]); \
1128 fprintf (FILE, "\tnop\n"); \
1129 fprintf (FILE, "\tldi:32\t#0, %s\n", reg_names [COMPILER_SCRATCH_REGISTER]); \
1130 fprintf (FILE, "\tjmp\t@%s\n", reg_names [COMPILER_SCRATCH_REGISTER]); \
1131 }
1132
1133 /* A C expression for the size in bytes of the trampoline, as an integer. */
1134 #define TRAMPOLINE_SIZE 18
1135
1136 /* We want the trampoline to be aligned on a 32bit boundary so that we can
1137 make sure the location of the static chain & target function within
1138 the trampoline is also aligned on a 32bit boundary. */
1139 #define TRAMPOLINE_ALIGNMENT 32
1140
1141 /* A C statement to initialize the variable parts of a trampoline. ADDR is an
1142 RTX for the address of the trampoline; FNADDR is an RTX for the address of
1143 the nested function; STATIC_CHAIN is an RTX for the static chain value that
1144 should be passed to the function when it is called. */
1145 #define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN) \
1146 do \
1147 { \
1148 emit_move_insn (gen_rtx (MEM, SImode, plus_constant (ADDR, 4)), STATIC_CHAIN);\
1149 emit_move_insn (gen_rtx (MEM, SImode, plus_constant (ADDR, 12)), FNADDR); \
1150 } while (0);
1151
1152 /*}}}*/ \f
1153 /*{{{ Addressing Modes. */
1154
1155 /* A C expression that is 1 if the RTX X is a constant which is a valid
1156 address. On most machines, this can be defined as `CONSTANT_P (X)', but a
1157 few machines are more restrictive in which constant addresses are supported.
1158
1159 `CONSTANT_P' accepts integer-values expressions whose values are not
1160 explicitly known, such as `symbol_ref', `label_ref', and `high' expressions
1161 and `const' arithmetic expressions, in addition to `const_int' and
1162 `const_double' expressions. */
1163 #define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)
1164
1165 /* A number, the maximum number of registers that can appear in a valid memory
1166 address. Note that it is up to you to specify a value equal to the maximum
1167 number that `GO_IF_LEGITIMATE_ADDRESS' would ever accept. */
1168 #define MAX_REGS_PER_ADDRESS 1
1169
1170 /* A C compound statement with a conditional `goto LABEL;' executed if X (an
1171 RTX) is a legitimate memory address on the target machine for a memory
1172 operand of mode MODE.
1173
1174 It usually pays to define several simpler macros to serve as subroutines for
1175 this one. Otherwise it may be too complicated to understand.
1176
1177 This macro must exist in two variants: a strict variant and a non-strict
1178 one. The strict variant is used in the reload pass. It must be defined so
1179 that any pseudo-register that has not been allocated a hard register is
1180 considered a memory reference. In contexts where some kind of register is
1181 required, a pseudo-register with no hard register must be rejected.
1182
1183 The non-strict variant is used in other passes. It must be defined to
1184 accept all pseudo-registers in every context where some kind of register is
1185 required.
1186
1187 Compiler source files that want to use the strict variant of this macro
1188 define the macro `REG_OK_STRICT'. You should use an `#ifdef REG_OK_STRICT'
1189 conditional to define the strict variant in that case and the non-strict
1190 variant otherwise.
1191
1192 Subroutines to check for acceptable registers for various purposes (one for
1193 base registers, one for index registers, and so on) are typically among the
1194 subroutines used to define `GO_IF_LEGITIMATE_ADDRESS'. Then only these
1195 subroutine macros need have two variants; the higher levels of macros may be
1196 the same whether strict or not.
1197
1198 Normally, constant addresses which are the sum of a `symbol_ref' and an
1199 integer are stored inside a `const' RTX to mark them as constant.
1200 Therefore, there is no need to recognize such sums specifically as
1201 legitimate addresses. Normally you would simply recognize any `const' as
1202 legitimate.
1203
1204 Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant sums that
1205 are not marked with `const'. It assumes that a naked `plus' indicates
1206 indexing. If so, then you *must* reject such naked constant sums as
1207 illegitimate addresses, so that none of them will be given to
1208 `PRINT_OPERAND_ADDRESS'.
1209
1210 On some machines, whether a symbolic address is legitimate depends on the
1211 section that the address refers to. On these machines, define the macro
1212 `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and
1213 then check for it here. When you see a `const', you will have to look
1214 inside it to find the `symbol_ref' in order to determine the section.
1215
1216 The best way to modify the name string is by adding text to the beginning,
1217 with suitable punctuation to prevent any ambiguity. Allocate the new name
1218 in `saveable_obstack'. You will have to modify `ASM_OUTPUT_LABELREF' to
1219 remove and decode the added text and output the name accordingly, and define
1220 `STRIP_NAME_ENCODING' to access the original name string.
1221
1222 You can check the information stored here into the `symbol_ref' in the
1223 definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and
1224 `PRINT_OPERAND_ADDRESS'.
1225
1226 Used in explow.c, recog.c, reload.c. */
1227
1228 /* On the FR30 we only have one real addressing mode - an address in a
1229 register. There are three special cases however:
1230
1231 * indexed addressing using small positive offsets from the stack pointer
1232
1233 * indexed addressing using small signed offsets from the frame pointer
1234
1235 * register plus register addresing using R13 as the base register.
1236
1237 At the moment we only support the first two of these special cases. */
1238
1239 #ifdef REG_OK_STRICT
1240 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \
1241 do \
1242 { \
1243 if (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \
1244 goto LABEL; \
1245 if (GET_CODE (X) == PLUS \
1246 && ((MODE) == SImode || (MODE) == SFmode) \
1247 && XEXP (X, 0) == stack_pointer_rtx \
1248 && GET_CODE (XEXP (X, 1)) == CONST_INT \
1249 && IN_RANGE (INTVAL (XEXP (X, 1)), 0, (1 << 6) - 4)) \
1250 goto LABEL; \
1251 if (GET_CODE (X) == PLUS \
1252 && ((MODE) == SImode || (MODE) == SFmode) \
1253 && XEXP (X, 0) == frame_pointer_rtx \
1254 && GET_CODE (XEXP (X, 1)) == CONST_INT \
1255 && IN_RANGE (INTVAL (XEXP (X, 1)), -(1 << 9), (1 << 9) - 4)) \
1256 goto LABEL; \
1257 } \
1258 while (0)
1259 #else
1260 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \
1261 do \
1262 { \
1263 if (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \
1264 goto LABEL; \
1265 if (GET_CODE (X) == PLUS \
1266 && ((MODE) == SImode || (MODE) == SFmode) \
1267 && XEXP (X, 0) == stack_pointer_rtx \
1268 && GET_CODE (XEXP (X, 1)) == CONST_INT \
1269 && IN_RANGE (INTVAL (XEXP (X, 1)), 0, (1 << 6) - 4)) \
1270 goto LABEL; \
1271 if (GET_CODE (X) == PLUS \
1272 && ((MODE) == SImode || (MODE) == SFmode) \
1273 && (XEXP (X, 0) == frame_pointer_rtx \
1274 || XEXP(X,0) == arg_pointer_rtx) \
1275 && GET_CODE (XEXP (X, 1)) == CONST_INT \
1276 && IN_RANGE (INTVAL (XEXP (X, 1)), -(1 << 9), (1 << 9) - 4)) \
1277 goto LABEL; \
1278 } \
1279 while (0)
1280 #endif
1281
1282 /* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for
1283 use as a base register. For hard registers, it should always accept those
1284 which the hardware permits and reject the others. Whether the macro accepts
1285 or rejects pseudo registers must be controlled by `REG_OK_STRICT' as
1286 described above. This usually requires two variant definitions, of which
1287 `REG_OK_STRICT' controls the one actually used. */
1288 #ifdef REG_OK_STRICT
1289 #define REG_OK_FOR_BASE_P(X) (((unsigned) REGNO (X)) <= STACK_POINTER_REGNUM)
1290 #else
1291 #define REG_OK_FOR_BASE_P(X) 1
1292 #endif
1293
1294 /* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for
1295 use as an index register.
1296
1297 The difference between an index register and a base register is that the
1298 index register may be scaled. If an address involves the sum of two
1299 registers, neither one of them scaled, then either one may be labeled the
1300 "base" and the other the "index"; but whichever labeling is used must fit
1301 the machine's constraints of which registers may serve in each capacity.
1302 The compiler will try both labelings, looking for one that is valid, and
1303 will reload one or both registers only if neither labeling works. */
1304 #define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X)
1305
1306 /* A C compound statement that attempts to replace X with a valid memory
1307 address for an operand of mode MODE. WIN will be a C statement label
1308 elsewhere in the code; the macro definition may use
1309
1310 GO_IF_LEGITIMATE_ADDRESS (MODE, X, WIN);
1311
1312 to avoid further processing if the address has become legitimate.
1313
1314 X will always be the result of a call to `break_out_memory_refs', and OLDX
1315 will be the operand that was given to that function to produce X.
1316
1317 The code generated by this macro should not alter the substructure of X. If
1318 it transforms X into a more legitimate form, it should assign X (which will
1319 always be a C variable) a new value.
1320
1321 It is not necessary for this macro to come up with a legitimate address.
1322 The compiler has standard ways of doing so in all cases. In fact, it is
1323 safe for this macro to do nothing. But often a machine-dependent strategy
1324 can generate better code. */
1325 #define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
1326
1327 /* A C statement or compound statement with a conditional `goto LABEL;'
1328 executed if memory address X (an RTX) can have different meanings depending
1329 on the machine mode of the memory reference it is used for or if the address
1330 is valid for some modes but not others.
1331
1332 Autoincrement and autodecrement addresses typically have mode-dependent
1333 effects because the amount of the increment or decrement is the size of the
1334 operand being addressed. Some machines have other mode-dependent addresses.
1335 Many RISC machines have no mode-dependent addresses.
1336
1337 You may assume that ADDR is a valid address for the machine. */
1338 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
1339
1340 /* A C expression that is nonzero if X is a legitimate constant for an
1341 immediate operand on the target machine. You can assume that X satisfies
1342 `CONSTANT_P', so you need not check this. In fact, `1' is a suitable
1343 definition for this macro on machines where anything `CONSTANT_P' is valid. */
1344 #define LEGITIMATE_CONSTANT_P(X) 1
1345
1346 /*}}}*/ \f
1347 /*{{{ Describing Relative Costs of Operations */
1348
1349 /* Define this macro as a C expression which is nonzero if accessing less than
1350 a word of memory (i.e. a `char' or a `short') is no faster than accessing a
1351 word of memory, i.e., if such access require more than one instruction or if
1352 there is no difference in cost between byte and (aligned) word loads.
1353
1354 When this macro is not defined, the compiler will access a field by finding
1355 the smallest containing object; when it is defined, a fullword load will be
1356 used if alignment permits. Unless bytes accesses are faster than word
1357 accesses, using word accesses is preferable since it may eliminate
1358 subsequent memory access if subsequent accesses occur to other fields in the
1359 same word of the structure, but to different bytes. */
1360 #define SLOW_BYTE_ACCESS 1
1361
1362 /*}}}*/ \f
1363 /*{{{ Dividing the output into sections. */
1364
1365 /* A C expression whose value is a string containing the assembler operation
1366 that should precede instructions and read-only data. Normally `".text"' is
1367 right. */
1368 #define TEXT_SECTION_ASM_OP "\t.text"
1369
1370 /* A C expression whose value is a string containing the assembler operation to
1371 identify the following data as writable initialized data. Normally
1372 `".data"' is right. */
1373 #define DATA_SECTION_ASM_OP "\t.data"
1374
1375 /* If defined, a C expression whose value is a string containing the
1376 assembler operation to identify the following data as
1377 uninitialized global data. If not defined, and neither
1378 `ASM_OUTPUT_BSS' nor `ASM_OUTPUT_ALIGNED_BSS' are defined,
1379 uninitialized global data will be output in the data section if
1380 `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be
1381 used. */
1382 #define BSS_SECTION_ASM_OP "\t.bss"
1383
1384 /*}}}*/ \f
1385 /*{{{ The Overall Framework of an Assembler File. */
1386
1387 /* A C string constant describing how to begin a comment in the target
1388 assembler language. The compiler assumes that the comment will end at the
1389 end of the line. */
1390 #define ASM_COMMENT_START ";"
1391
1392 /* A C string constant for text to be output before each `asm' statement or
1393 group of consecutive ones. Normally this is `"#APP"', which is a comment
1394 that has no effect on most assemblers but tells the GNU assembler that it
1395 must check the lines that follow for all valid assembler constructs. */
1396 #define ASM_APP_ON "#APP\n"
1397
1398 /* A C string constant for text to be output after each `asm' statement or
1399 group of consecutive ones. Normally this is `"#NO_APP"', which tells the
1400 GNU assembler to resume making the time-saving assumptions that are valid
1401 for ordinary compiler output. */
1402 #define ASM_APP_OFF "#NO_APP\n"
1403
1404 /*}}}*/ \f
1405 /*{{{ Output and Generation of Labels. */
1406
1407 /* A C statement (sans semicolon) to output to the stdio stream STREAM the
1408 assembler definition of a label named NAME. Use the expression
1409 `assemble_name (STREAM, NAME)' to output the name itself; before and after
1410 that, output the additional assembler syntax for defining the name, and a
1411 newline. */
1412 #define ASM_OUTPUT_LABEL(STREAM, NAME) \
1413 do \
1414 { \
1415 assemble_name (STREAM, NAME); \
1416 fputs (":\n", STREAM); \
1417 } \
1418 while (0)
1419
1420 /* A C statement (sans semicolon) to output to the stdio stream STREAM some
1421 commands that will make the label NAME global; that is, available for
1422 reference from other files. Use the expression `assemble_name (STREAM,
1423 NAME)' to output the name itself; before and after that, output the
1424 additional assembler syntax for making that name global, and a newline. */
1425 #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \
1426 do \
1427 { \
1428 fputs ("\t.globl ", STREAM); \
1429 assemble_name (STREAM, NAME); \
1430 fputs ("\n", STREAM); \
1431 } \
1432 while (0)
1433
1434 /* A C expression to assign to OUTVAR (which is a variable of type `char *') a
1435 newly allocated string made from the string NAME and the number NUMBER, with
1436 some suitable punctuation added. Use `alloca' to get space for the string.
1437
1438 The string will be used as an argument to `ASM_OUTPUT_LABELREF' to produce
1439 an assembler label for an internal static variable whose name is NAME.
1440 Therefore, the string must be such as to result in valid assembler code.
1441 The argument NUMBER is different each time this macro is executed; it
1442 prevents conflicts between similarly-named internal static variables in
1443 different scopes.
1444
1445 Ideally this string should not be a valid C identifier, to prevent any
1446 conflict with the user's own symbols. Most assemblers allow periods or
1447 percent signs in assembler symbols; putting at least one of these between
1448 the name and the number will suffice. */
1449 #define ASM_FORMAT_PRIVATE_NAME(OUTVAR, NAME, NUMBER) \
1450 do \
1451 { \
1452 (OUTVAR) = (char *) alloca (strlen ((NAME)) + 12); \
1453 sprintf ((OUTVAR), "%s.%ld", (NAME), (long)(NUMBER)); \
1454 } \
1455 while (0)
1456
1457 /*}}}*/ \f
1458 /*{{{ Output of Assembler Instructions. */
1459
1460 /* A C compound statement to output to stdio stream STREAM the assembler syntax
1461 for an instruction operand X. X is an RTL expression.
1462
1463 CODE is a value that can be used to specify one of several ways of printing
1464 the operand. It is used when identical operands must be printed differently
1465 depending on the context. CODE comes from the `%' specification that was
1466 used to request printing of the operand. If the specification was just
1467 `%DIGIT' then CODE is 0; if the specification was `%LTR DIGIT' then CODE is
1468 the ASCII code for LTR.
1469
1470 If X is a register, this macro should print the register's name. The names
1471 can be found in an array `reg_names' whose type is `char *[]'. `reg_names'
1472 is initialized from `REGISTER_NAMES'.
1473
1474 When the machine description has a specification `%PUNCT' (a `%' followed by
1475 a punctuation character), this macro is called with a null pointer for X and
1476 the punctuation character for CODE. */
1477 #define PRINT_OPERAND(STREAM, X, CODE) fr30_print_operand (STREAM, X, CODE)
1478
1479 /* A C expression which evaluates to true if CODE is a valid punctuation
1480 character for use in the `PRINT_OPERAND' macro. If
1481 `PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no punctuation
1482 characters (except for the standard one, `%') are used in this way. */
1483 #define PRINT_OPERAND_PUNCT_VALID_P(CODE) (CODE == '#')
1484
1485 /* A C compound statement to output to stdio stream STREAM the assembler syntax
1486 for an instruction operand that is a memory reference whose address is X. X
1487 is an RTL expression.
1488
1489 On some machines, the syntax for a symbolic address depends on the section
1490 that the address refers to. On these machines, define the macro
1491 `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and
1492 then check for it here. *Note Assembler Format::. */
1493 #define PRINT_OPERAND_ADDRESS(STREAM, X) fr30_print_operand_address (STREAM, X)
1494
1495 /* If defined, C string expressions to be used for the `%R', `%L', `%U', and
1496 `%I' options of `asm_fprintf' (see `final.c'). These are useful when a
1497 single `md' file must support multiple assembler formats. In that case, the
1498 various `tm.h' files can define these macros differently.
1499
1500 USER_LABEL_PREFIX is defined in svr4.h. */
1501 #define REGISTER_PREFIX "%"
1502 #define LOCAL_LABEL_PREFIX "."
1503 #define USER_LABEL_PREFIX ""
1504 #define IMMEDIATE_PREFIX ""
1505
1506 /*}}}*/ \f
1507 /*{{{ Output of Dispatch Tables. */
1508
1509 /* This macro should be provided on machines where the addresses in a dispatch
1510 table are relative to the table's own address.
1511
1512 The definition should be a C statement to output to the stdio stream STREAM
1513 an assembler pseudo-instruction to generate a difference between two labels.
1514 VALUE and REL are the numbers of two internal labels. The definitions of
1515 these labels are output using `ASM_OUTPUT_INTERNAL_LABEL', and they must be
1516 printed in the same way here. For example,
1517
1518 fprintf (STREAM, "\t.word L%d-L%d\n", VALUE, REL) */
1519 #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \
1520 fprintf (STREAM, "\t.word .L%d-.L%d\n", VALUE, REL)
1521
1522 /* This macro should be provided on machines where the addresses in a dispatch
1523 table are absolute.
1524
1525 The definition should be a C statement to output to the stdio stream STREAM
1526 an assembler pseudo-instruction to generate a reference to a label. VALUE
1527 is the number of an internal label whose definition is output using
1528 `ASM_OUTPUT_INTERNAL_LABEL'. For example,
1529
1530 fprintf (STREAM, "\t.word L%d\n", VALUE) */
1531 #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \
1532 fprintf (STREAM, "\t.word .L%d\n", VALUE)
1533
1534 /*}}}*/ \f
1535 /*{{{ Assembler Commands for Alignment. */
1536
1537 /* A C statement to output to the stdio stream STREAM an assembler command to
1538 advance the location counter to a multiple of 2 to the POWER bytes. POWER
1539 will be a C expression of type `int'. */
1540 #define ASM_OUTPUT_ALIGN(STREAM, POWER) \
1541 fprintf ((STREAM), "\t.p2align %d\n", (POWER))
1542
1543 /*}}}*/ \f
1544 /*{{{ Macros for SDB and Dwarf Output. */
1545
1546 /* Define this macro to allow references to structure, union, or enumeration
1547 tags that have not yet been seen to be handled. Some assemblers choke if
1548 forward tags are used, while some require it. */
1549 /* #define SDB_ALLOW_FORWARD_REFERENCES */
1550
1551 #define DWARF_LINE_MIN_INSTR_LENGTH 2
1552
1553 /*}}}*/ \f
1554 /*{{{ Miscellaneous Parameters. */
1555
1556 /* An alias for a machine mode name. This is the machine mode that elements of
1557 a jump-table should have. */
1558 #define CASE_VECTOR_MODE SImode
1559
1560 /* The maximum number of bytes that a single instruction can move quickly from
1561 memory to memory. */
1562 #define MOVE_MAX 8
1563
1564 /* A C expression which is nonzero if on this machine it is safe to "convert"
1565 an integer of INPREC bits to one of OUTPREC bits (where OUTPREC is smaller
1566 than INPREC) by merely operating on it as if it had only OUTPREC bits.
1567
1568 On many machines, this expression can be 1.
1569
1570 When `TRULY_NOOP_TRUNCATION' returns 1 for a pair of sizes for modes for
1571 which `MODES_TIEABLE_P' is 0, suboptimal code can result. If this is the
1572 case, making `TRULY_NOOP_TRUNCATION' return 0 in such cases may improve
1573 things. */
1574 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
1575
1576 /* An alias for the machine mode for pointers. On most machines, define this
1577 to be the integer mode corresponding to the width of a hardware pointer;
1578 `SImode' on 32-bit machine or `DImode' on 64-bit machines. On some machines
1579 you must define this to be one of the partial integer modes, such as
1580 `PSImode'.
1581
1582 The width of `Pmode' must be at least as large as the value of
1583 `POINTER_SIZE'. If it is not equal, you must define the macro
1584 `POINTERS_EXTEND_UNSIGNED' to specify how pointers are extended to `Pmode'. */
1585 #define Pmode SImode
1586
1587 /* An alias for the machine mode used for memory references to functions being
1588 called, in `call' RTL expressions. On most machines this should be
1589 `QImode'. */
1590 #define FUNCTION_MODE QImode
1591
1592 /* If cross-compiling, don't require stdio.h etc to build libgcc.a. */
1593 #if defined CROSS_COMPILE && ! defined inhibit_libc
1594 #define inhibit_libc
1595 #endif
1596
1597 /*}}}*/ \f
1598 /*{{{ Exported variables */
1599
1600 /* Define the information needed to generate branch and scc insns. This is
1601 stored from the compare operation. Note that we can't use "rtx" here
1602 since it hasn't been defined! */
1603
1604 extern struct rtx_def * fr30_compare_op0;
1605 extern struct rtx_def * fr30_compare_op1;
1606
1607 /*}}}*/ \f
1608 /*{{{ PERDICATE_CODES. */
1609
1610 #define PREDICATE_CODES \
1611 { "stack_add_operand", { CONST_INT }}, \
1612 { "high_register_operand", { REG }}, \
1613 { "low_register_operand", { REG }}, \
1614 { "call_operand", { MEM }}, \
1615 { "fp_displacement_operand", { CONST_INT }}, \
1616 { "sp_displacement_operand", { CONST_INT }}, \
1617 { "di_operand", { CONST_INT, CONST_DOUBLE, REG, MEM }}, \
1618 { "nonimmediate_di_operand", { REG, MEM }}, \
1619 { "add_immediate_operand", { REG, CONST_INT }},
1620
1621 /*}}}*/ \f
1622
1623 /* Local Variables: */
1624 /* folded-file: t */
1625 /* End: */
This page took 0.15071 seconds and 6 git commands to generate.