3 /* Definitions of FR30 target.
4 Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
5 Contributed by Cygnus Solutions.
7 This file is part of GNU CC.
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)
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.
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. */
27 /* Set up System V.4 (aka ELF) defaults. */
31 /*{{{ Driver configuration. */
33 /* A C expression which determines whether the option `-CHAR' takes arguments.
34 The value should be the number of arguments that option takes-zero, for many
37 By default, this macro is defined to handle the standard options properly.
38 You need not define it unless you wish to add additional options which take
42 #undef SWITCH_TAKES_ARG
44 /* A C expression which determines whether the option `-NAME' takes arguments.
45 The value should be the number of arguments that option takes-zero, for many
46 options. This macro rather than `SWITCH_TAKES_ARG' is used for
47 multi-character option names.
49 By default, this macro is defined as `DEFAULT_WORD_SWITCH_TAKES_ARG', which
50 handles the standard options properly. You need not define
51 `WORD_SWITCH_TAKES_ARG' unless you wish to add additional options which take
52 arguments. Any redefinition should call `DEFAULT_WORD_SWITCH_TAKES_ARG' and
53 then check for additional options.
56 #undef WORD_SWITCH_TAKES_ARG
59 /*{{{ Run-time target specifications. */
62 #define ASM_SPEC "%{v}"
64 /* Define this to be a string constant containing `-D' options to define the
65 predefined macros that identify this machine and system. These macros will
66 be predefined unless the `-ansi' option is specified. */
68 #define CPP_PREDEFINES "-Dfr30 -D__fr30__ -Amachine=fr30"
70 /* Use LDI:20 instead of LDI:32 to load addresses. */
71 #define TARGET_SMALL_MODEL_MASK (1 << 0)
72 #define TARGET_SMALL_MODEL (target_flags & TARGET_SMALL_MODEL_MASK)
74 #define TARGET_DEFAULT 0
76 /* This declaration should be present. */
77 extern int target_flags;
79 #define TARGET_SWITCHES \
81 { "small-model", TARGET_SMALL_MODEL_MASK, \
82 N_("Assume small address space") }, \
83 { "no-small-model", - TARGET_SMALL_MODEL_MASK, "" }, \
84 { "no-lsim", 0, "" }, \
85 { "", TARGET_DEFAULT, "" } \
88 #define TARGET_VERSION fprintf (stderr, " (fr30)");
90 /* Define this macro if debugging can be performed even without a frame
91 pointer. If this macro is defined, GNU CC will turn on the
92 `-fomit-frame-pointer' option whenever `-O' is specified. */
93 #define CAN_DEBUG_WITHOUT_FP
96 #define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
98 /* Include the OS stub library, so that the code can be simulated.
99 This is not the right way to do this. Ideally this kind of thing
100 should be done in the linker script - but I have not worked out how
101 to specify the location of a linker script in a gcc command line yet... */
103 #define ENDFILE_SPEC "%{!mno-lsim:-lsim} crtend.o%s crtn.o%s"
106 /*{{{ Storage Layout. */
108 /* Define this macro to have the value 1 if the most significant bit in a byte
109 has the lowest number; otherwise define it to have the value zero. This
110 means that bit-field instructions count from the most significant bit. If
111 the machine has no bit-field instructions, then this must still be defined,
112 but it doesn't matter which value it is defined to. This macro need not be
115 This macro does not affect the way structure fields are packed into bytes or
116 words; that is controlled by `BYTES_BIG_ENDIAN'. */
117 #define BITS_BIG_ENDIAN 1
119 /* Define this macro to have the value 1 if the most significant byte in a word
120 has the lowest number. This macro need not be a constant. */
121 #define BYTES_BIG_ENDIAN 1
123 /* Define this macro to have the value 1 if, in a multiword object, the most
124 significant word has the lowest number. This applies to both memory
125 locations and registers; GNU CC fundamentally assumes that the order of
126 words in memory is the same as the order in registers. This macro need not
128 #define WORDS_BIG_ENDIAN 1
130 /* Define this macro to be the number of bits in an addressable storage unit
131 (byte); normally 8. */
132 #define BITS_PER_UNIT 8
134 /* Number of bits in a word; normally 32. */
135 #define BITS_PER_WORD 32
137 /* Number of storage units in a word; normally 4. */
138 #define UNITS_PER_WORD 4
140 /* Width of a pointer, in bits. You must specify a value no wider than the
141 width of `Pmode'. If it is not equal to the width of `Pmode', you must
142 define `POINTERS_EXTEND_UNSIGNED'. */
143 #define POINTER_SIZE 32
145 /* A macro to update MODE and UNSIGNEDP when an object whose type is TYPE and
146 which has the specified mode and signedness is to be stored in a register.
147 This macro is only called when TYPE is a scalar type.
149 On most RISC machines, which only have operations that operate on a full
150 register, define this macro to set M to `word_mode' if M is an integer mode
151 narrower than `BITS_PER_WORD'. In most cases, only integer modes should be
152 widened because wider-precision floating-point operations are usually more
153 expensive than their narrower counterparts.
155 For most machines, the macro definition does not change UNSIGNEDP. However,
156 some machines, have instructions that preferentially handle either signed or
157 unsigned quantities of certain modes. For example, on the DEC Alpha, 32-bit
158 loads from memory and 32-bit add instructions sign-extend the result to 64
159 bits. On such machines, set UNSIGNEDP according to which kind of extension
162 Do not define this macro if it would never modify MODE. */
163 #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE) \
166 if (GET_MODE_CLASS (MODE) == MODE_INT \
167 && GET_MODE_SIZE (MODE) < 4) \
172 /* Normal alignment required for function parameters on the stack, in bits.
173 All stack parameters receive at least this much alignment regardless of data
174 type. On most machines, this is the same as the size of an integer. */
175 #define PARM_BOUNDARY 32
177 /* Define this macro if you wish to preserve a certain alignment for the stack
178 pointer. The definition is a C expression for the desired alignment
181 If `PUSH_ROUNDING' is not defined, the stack will always be aligned to the
182 specified boundary. If `PUSH_ROUNDING' is defined and specifies a less
183 strict alignment than `STACK_BOUNDARY', the stack may be momentarily
184 unaligned while pushing arguments. */
185 #define STACK_BOUNDARY 32
187 /* Alignment required for a function entry point, in bits. */
188 #define FUNCTION_BOUNDARY 32
190 /* Biggest alignment that any data type can require on this machine,
192 #define BIGGEST_ALIGNMENT 32
194 /* If defined, a C expression to compute the alignment for a static variable.
195 TYPE is the data type, and ALIGN is the alignment that the object
196 would ordinarily have. The value of this macro is used instead of that
197 alignment to align the object.
199 If this macro is not defined, then ALIGN is used.
201 One use of this macro is to increase alignment of medium-size data to make
202 it all fit in fewer cache lines. Another is to cause character arrays to be
203 word-aligned so that `strcpy' calls that copy constants to character arrays
204 can be done inline. */
205 #define DATA_ALIGNMENT(TYPE, ALIGN) \
206 (TREE_CODE (TYPE) == ARRAY_TYPE \
207 && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \
208 && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
210 /* If defined, a C expression to compute the alignment given to a constant that
211 is being placed in memory. CONSTANT is the constant and ALIGN is the
212 alignment that the object would ordinarily have. The value of this macro is
213 used instead of that alignment to align the object.
215 If this macro is not defined, then ALIGN is used.
217 The typical use of this macro is to increase alignment for string constants
218 to be word aligned so that `strcpy' calls that copy constants can be done
220 #define CONSTANT_ALIGNMENT(EXP, ALIGN) \
221 (TREE_CODE (EXP) == STRING_CST \
222 && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
224 /* Define this macro to be the value 1 if instructions will fail to work if
225 given data not on the nominal alignment. If instructions will merely go
226 slower in that case, define this macro as 0. */
227 #define STRICT_ALIGNMENT 1
229 /* Define this if you wish to imitate the way many other C compilers handle
230 alignment of bitfields and the structures that contain them.
232 The behavior is that the type written for a bitfield (`int', `short', or
233 other integer type) imposes an alignment for the entire structure, as if the
234 structure really did contain an ordinary field of that type. In addition,
235 the bitfield is placed within the structure so that it would fit within such
236 a field, not crossing a boundary for it.
238 Thus, on most machines, a bitfield whose type is written as `int' would not
239 cross a four-byte boundary, and would force four-byte alignment for the
240 whole structure. (The alignment used may not be four bytes; it is
241 controlled by the other alignment parameters.)
243 If the macro is defined, its definition should be a C expression; a nonzero
244 value for the expression enables this behavior.
246 Note that if this macro is not defined, or its value is zero, some bitfields
247 may cross more than one alignment boundary. The compiler can support such
248 references if there are `insv', `extv', and `extzv' insns that can directly
251 The other known way of making bitfields work is to define
252 `STRUCTURE_SIZE_BOUNDARY' as large as `BIGGEST_ALIGNMENT'. Then every
253 structure can be accessed with fullwords.
255 Unless the machine has bitfield instructions or you define
256 `STRUCTURE_SIZE_BOUNDARY' that way, you must define
257 `PCC_BITFIELD_TYPE_MATTERS' to have a nonzero value.
259 If your aim is to make GNU CC use the same conventions for laying out
260 bitfields as are used by another compiler, here is how to investigate what
261 the other compiler does. Compile and run this program:
279 printf ("Size of foo1 is %d\n",
280 sizeof (struct foo1));
281 printf ("Size of foo2 is %d\n",
282 sizeof (struct foo2));
286 If this prints 2 and 5, then the compiler's behavior is what you would get
287 from `PCC_BITFIELD_TYPE_MATTERS'.
289 Defined in svr4.h. */
290 #define PCC_BITFIELD_TYPE_MATTERS 1
292 /* A code distinguishing the floating point format of the target machine.
293 There are three defined values:
296 This code indicates IEEE floating point. It is the default;
297 there is no need to define this macro when the format is IEEE.
300 This code indicates the peculiar format used on the Vax.
302 UNKNOWN_FLOAT_FORMAT'
303 This code indicates any other format.
305 The value of this macro is compared with `HOST_FLOAT_FORMAT'
306 to determine whether the target machine has the same format as
307 the host machine. If any other formats are actually in use on supported
308 machines, new codes should be defined for them.
310 The ordering of the component words of floating point values stored in
311 memory is controlled by `FLOAT_WORDS_BIG_ENDIAN' for the target machine and
312 `HOST_FLOAT_WORDS_BIG_ENDIAN' for the host. */
313 #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT
315 /* GNU CC supports two ways of implementing C++ vtables: traditional or with
316 so-called "thunks". The flag `-fvtable-thunk' chooses between them. Define
317 this macro to be a C expression for the default value of that flag. If
318 `DEFAULT_VTABLE_THUNKS' is 0, GNU CC uses the traditional implementation by
319 default. The "thunk" implementation is more efficient (especially if you
320 have provided an implementation of `ASM_OUTPUT_MI_THUNK', but is not binary
321 compatible with code compiled using the traditional implementation. If you
322 are writing a new ports, define `DEFAULT_VTABLE_THUNKS' to 1.
324 If you do not define this macro, the default for `-fvtable-thunk' is 0. */
325 #define DEFAULT_VTABLE_THUNKS 1
328 /*{{{ Layout of Source Language Data Types. */
330 #define CHAR_TYPE_SIZE 8
331 #define SHORT_TYPE_SIZE 16
332 #define INT_TYPE_SIZE 32
333 #define LONG_TYPE_SIZE 32
334 #define LONG_LONG_TYPE_SIZE 64
335 #define FLOAT_TYPE_SIZE 32
336 #define DOUBLE_TYPE_SIZE 64
337 #define LONG_DOUBLE_TYPE_SIZE 64
339 /* An expression whose value is 1 or 0, according to whether the type `char'
340 should be signed or unsigned by default. The user can always override this
341 default with the options `-fsigned-char' and `-funsigned-char'. */
342 #define DEFAULT_SIGNED_CHAR 1
345 /*{{{ REGISTER BASICS. */
347 /* Number of hardware registers known to the compiler. They receive numbers 0
348 through `FIRST_PSEUDO_REGISTER-1'; thus, the first pseudo register's number
349 really is assigned the number `FIRST_PSEUDO_REGISTER'. */
350 #define FIRST_PSEUDO_REGISTER 21
352 /* Fixed register assignments: */
354 /* Here we do a BAD THING - reserve a register for use by the machine
355 description file. There are too many places in compiler where it
356 assumes that it can issue a branch or jump instruction without
357 providing a scratch register for it, and reload just cannot cope, so
358 we keep a register back for these situations. */
359 #define COMPILER_SCRATCH_REGISTER 0
361 /* The register that contains the result of a function call. */
362 #define RETURN_VALUE_REGNUM 4
364 /* The first register that can contain the arguments to a function. */
365 #define FIRST_ARG_REGNUM 4
367 /* A call-used register that can be used during the function prologue. */
368 #define PROLOGUE_TMP_REGNUM COMPILER_SCRATCH_REGISTER
370 /* Register numbers used for passing a function's static chain pointer. If
371 register windows are used, the register number as seen by the called
372 function is `STATIC_CHAIN_INCOMING_REGNUM', while the register number as
373 seen by the calling function is `STATIC_CHAIN_REGNUM'. If these registers
374 are the same, `STATIC_CHAIN_INCOMING_REGNUM' need not be defined.
376 The static chain register need not be a fixed register.
378 If the static chain is passed in memory, these macros should not be defined;
379 instead, the next two macros should be defined. */
380 #define STATIC_CHAIN_REGNUM 12
381 /* #define STATIC_CHAIN_INCOMING_REGNUM */
383 /* An FR30 specific hardware register. */
384 #define ACCUMULATOR_REGNUM 13
386 /* The register number of the frame pointer register, which is used to access
387 automatic variables in the stack frame. On some machines, the hardware
388 determines which register this is. On other machines, you can choose any
389 register you wish for this purpose. */
390 #define FRAME_POINTER_REGNUM 14
392 /* The register number of the stack pointer register, which must also be a
393 fixed register according to `FIXED_REGISTERS'. On most machines, the
394 hardware determines which register this is. */
395 #define STACK_POINTER_REGNUM 15
397 /* The following a fake hard registers that describe some of the dedicated
398 registers on the FR30. */
399 #define CONDITION_CODE_REGNUM 16
400 #define RETURN_POINTER_REGNUM 17
401 #define MD_HIGH_REGNUM 18
402 #define MD_LOW_REGNUM 19
404 /* An initializer that says which registers are used for fixed purposes all
405 throughout the compiled code and are therefore not available for general
406 allocation. These would include the stack pointer, the frame pointer
407 (except on machines where that can be used as a general register when no
408 frame pointer is needed), the program counter on machines where that is
409 considered one of the addressable registers, and any other numbered register
412 This information is expressed as a sequence of numbers, separated by commas
413 and surrounded by braces. The Nth number is 1 if register N is fixed, 0
416 The table initialized from this macro, and the table initialized by the
417 following one, may be overridden at run time either automatically, by the
418 actions of the macro `CONDITIONAL_REGISTER_USAGE', or by the user with the
419 command options `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG'. */
420 #define FIXED_REGISTERS \
421 { 1, 0, 0, 0, 0, 0, 0, 0, /* 0 - 7 */ \
422 0, 0, 0, 0, 0, 0, 0, 1, /* 8 - 15 */ \
423 1, 1, 1, 1, 1 } /* 16 - 20 */
425 /* XXX - MDL and MDH set as fixed for now - this is until I can get the
426 mul patterns working. */
428 /* Like `FIXED_REGISTERS' but has 1 for each register that is clobbered (in
429 general) by function calls as well as for fixed registers. This macro
430 therefore identifies the registers that are not available for general
431 allocation of values that must live across function calls.
433 If a register has 0 in `CALL_USED_REGISTERS', the compiler automatically
434 saves it on function entry and restores it on function exit, if the register
435 is used within the function. */
436 #define CALL_USED_REGISTERS \
437 { 1, 1, 1, 1, 1, 1, 1, 1, /* 0 - 7 */ \
438 0, 0, 0, 0, 1, 1, 0, 1, /* 8 - 15 */ \
439 1, 1, 1, 1, 1 } /* 16 - 20 */
441 /* A C initializer containing the assembler's names for the machine registers,
442 each one as a C string constant. This is what translates register numbers
443 in the compiler into assembler language. */
444 #define REGISTER_NAMES \
445 { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
446 "r8", "r9", "r10", "r11", "r12", "ac", "fp", "sp", \
447 "cc", "rp", "mdh", "mdl", "ap" \
450 /* If defined, a C initializer for an array of structures containing a name and
451 a register number. This macro defines additional names for hard registers,
452 thus allowing the `asm' option in declarations to refer to registers using
454 #define ADDITIONAL_REGISTER_NAMES \
456 {"r13", 13}, {"r14", 14}, {"r15", 15}, {"usp", 15}, {"ps", 16}\
460 /*{{{ How Values Fit in Registers. */
462 /* A C expression for the number of consecutive hard registers, starting at
463 register number REGNO, required to hold a value of mode MODE. */
465 #define HARD_REGNO_NREGS(REGNO, MODE) \
466 ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
468 /* A C expression that is nonzero if it is permissible to store a value of mode
469 MODE in hard register number REGNO (or in several registers starting with
472 #define HARD_REGNO_MODE_OK(REGNO, MODE) 1
474 /* A C expression that is nonzero if it is desirable to choose register
475 allocation so as to avoid move instructions between a value of mode MODE1
476 and a value of mode MODE2.
478 If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R, MODE2)' are
479 ever different for any R, then `MODES_TIEABLE_P (MODE1, MODE2)' must be
481 #define MODES_TIEABLE_P(MODE1, MODE2) 1
484 /*{{{ Register Classes. */
486 /* An enumeral type that must be defined with all the register class names as
487 enumeral values. `NO_REGS' must be first. `ALL_REGS' must be the last
488 register class, followed by one more enumeral value, `LIM_REG_CLASSES',
489 which is not a register class but rather tells how many classes there are.
491 Each register class has a number, which is the value of casting the class
492 name to type `int'. The number serves as an index in many of the tables
497 MULTIPLY_32_REG, /* the MDL register as used by the MULH, MULUH insns */
498 MULTIPLY_64_REG, /* the MDH,MDL register pair as used by MUL and MULU */
499 LOW_REGS, /* registers 0 through 7 */
500 HIGH_REGS, /* registers 8 through 15 */
501 REAL_REGS, /* ie all the general hardware registers on the FR30 */
506 #define GENERAL_REGS REAL_REGS
507 #define N_REG_CLASSES ((int) LIM_REG_CLASSES)
509 /* An initializer containing the names of the register classes as C string
510 constants. These names are used in writing some of the debugging dumps. */
511 #define REG_CLASS_NAMES \
522 /* An initializer containing the contents of the register classes, as integers
523 which are bit masks. The Nth integer specifies the contents of class N.
524 The way the integer MASK is interpreted is that register R is in the class
525 if `MASK & (1 << R)' is 1.
527 When the machine has more than 32 registers, an integer does not suffice.
528 Then the integers are replaced by sub-initializers, braced groupings
529 containing several integers. Each sub-initializer must be suitable as an
530 initializer for the type `HARD_REG_SET' which is defined in
532 #define REG_CLASS_CONTENTS \
535 { 1 << MD_LOW_REGNUM }, \
536 { (1 << MD_LOW_REGNUM) | (1 << MD_HIGH_REGNUM) }, \
538 { ((1 << 8) - 1) << 8 }, \
539 { (1 << CONDITION_CODE_REGNUM) - 1 }, \
540 { (1 << FIRST_PSEUDO_REGISTER) - 1 } \
543 /* A C expression whose value is a register class containing hard register
544 REGNO. In general there is more than one such class; choose a class which
545 is "minimal", meaning that no smaller class also contains the register. */
546 #define REGNO_REG_CLASS(REGNO) \
547 ( (REGNO) < 8 ? LOW_REGS \
548 : (REGNO) < CONDITION_CODE_REGNUM ? HIGH_REGS \
549 : (REGNO) == MD_LOW_REGNUM ? MULTIPLY_32_REG \
550 : (REGNO) == MD_HIGH_REGNUM ? MULTIPLY_64_REG \
553 /* A macro whose definition is the name of the class to which a valid base
554 register must belong. A base register is one used in an address which is
555 the register value plus a displacement. */
556 #define BASE_REG_CLASS REAL_REGS
558 /* A macro whose definition is the name of the class to which a valid index
559 register must belong. An index register is one used in an address where its
560 value is either multiplied by a scale factor or added to another register
561 (as well as added to a displacement). */
562 #define INDEX_REG_CLASS REAL_REGS
564 /* A C expression which defines the machine-dependent operand constraint
565 letters for register classes. If CHAR is such a letter, the value should be
566 the register class corresponding to it. Otherwise, the value should be
567 `NO_REGS'. The register letter `r', corresponding to class `GENERAL_REGS',
568 will not be passed to this macro; you do not need to handle it.
570 The following letters are unavailable, due to being used as
575 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P'
576 'Q', 'R', 'S', 'T', 'U'
578 'g', 'i', 'm', 'n', 'o', 'p', 'r', 's' */
580 #define REG_CLASS_FROM_LETTER(CHAR) \
581 ( (CHAR) == 'd' ? MULTIPLY_64_REG \
582 : (CHAR) == 'e' ? MULTIPLY_32_REG \
583 : (CHAR) == 'h' ? HIGH_REGS \
584 : (CHAR) == 'l' ? LOW_REGS \
585 : (CHAR) == 'a' ? ALL_REGS \
588 /* A C expression which is nonzero if register number NUM is suitable for use
589 as a base register in operand addresses. It may be either a suitable hard
590 register or a pseudo register that has been allocated such a hard register. */
591 #define REGNO_OK_FOR_BASE_P(NUM) 1
593 /* A C expression which is nonzero if register number NUM is suitable for use
594 as an index register in operand addresses. It may be either a suitable hard
595 register or a pseudo register that has been allocated such a hard register.
597 The difference between an index register and a base register is that the
598 index register may be scaled. If an address involves the sum of two
599 registers, neither one of them scaled, then either one may be labeled the
600 "base" and the other the "index"; but whichever labeling is used must fit
601 the machine's constraints of which registers may serve in each capacity.
602 The compiler will try both labelings, looking for one that is valid, and
603 will reload one or both registers only if neither labeling works. */
604 #define REGNO_OK_FOR_INDEX_P(NUM) 1
606 /* A C expression that places additional restrictions on the register class to
607 use when it is necessary to copy value X into a register in class CLASS.
608 The value is a register class; perhaps CLASS, or perhaps another, smaller
609 class. On many machines, the following definition is safe:
611 #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS
613 Sometimes returning a more restrictive class makes better code. For
614 example, on the 68000, when X is an integer constant that is in range for a
615 `moveq' instruction, the value of this macro is always `DATA_REGS' as long
616 as CLASS includes the data registers. Requiring a data register guarantees
617 that a `moveq' will be used.
619 If X is a `const_double', by returning `NO_REGS' you can force X into a
620 memory constant. This is useful on certain machines where immediate
621 floating values cannot be loaded into certain kinds of registers. */
622 #define PREFERRED_RELOAD_CLASS(X, CLASS) CLASS
624 /* A C expression for the maximum number of consecutive registers of
625 class CLASS needed to hold a value of mode MODE.
627 This is closely related to the macro `HARD_REGNO_NREGS'. In fact, the value
628 of the macro `CLASS_MAX_NREGS (CLASS, MODE)' should be the maximum value of
629 `HARD_REGNO_NREGS (REGNO, MODE)' for all REGNO values in the class CLASS.
631 This macro helps control the handling of multiple-word values in
633 #define CLASS_MAX_NREGS(CLASS, MODE) HARD_REGNO_NREGS (0, MODE)
638 /* Return true if a value is inside a range */
639 #define IN_RANGE(VALUE, LOW, HIGH) \
640 ( ((unsigned HOST_WIDE_INT)((VALUE) - (LOW))) \
641 <= ((unsigned HOST_WIDE_INT)( (HIGH) - (LOW))))
643 /* A C expression that defines the machine-dependent operand constraint letters
644 (`I', `J', `K', .. 'P') that specify particular ranges of integer values.
645 If C is one of those letters, the expression should check that VALUE, an
646 integer, is in the appropriate range and return 1 if so, 0 otherwise. If C
647 is not one of those letters, the value should be 0 regardless of VALUE. */
648 #define CONST_OK_FOR_LETTER_P(VALUE, C) \
649 ( (C) == 'I' ? IN_RANGE (VALUE, 0, 15) \
650 : (C) == 'J' ? IN_RANGE (VALUE, -16, -1) \
651 : (C) == 'K' ? IN_RANGE (VALUE, 16, 31) \
652 : (C) == 'L' ? IN_RANGE (VALUE, 0, (1 << 8) - 1) \
653 : (C) == 'M' ? IN_RANGE (VALUE, 0, (1 << 20) - 1) \
654 : (C) == 'P' ? IN_RANGE (VALUE, -(1 << 8), (1 << 8) - 1) \
657 /* A C expression that defines the machine-dependent operand constraint letters
658 (`G', `H') that specify particular ranges of `const_double' values.
660 If C is one of those letters, the expression should check that VALUE, an RTX
661 of code `const_double', is in the appropriate range and return 1 if so, 0
662 otherwise. If C is not one of those letters, the value should be 0
665 `const_double' is used for all floating-point constants and for `DImode'
666 fixed-point constants. A given letter can accept either or both kinds of
667 values. It can use `GET_MODE' to distinguish between these kinds. */
668 #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) 0
670 /* A C expression that defines the optional machine-dependent constraint
671 letters (`Q', `R', `S', `T', `U') that can be used to segregate specific
672 types of operands, usually memory references, for the target machine.
673 Normally this macro will not be defined. If it is required for a particular
674 target machine, it should return 1 if VALUE corresponds to the operand type
675 represented by the constraint letter C. If C is not defined as an extra
676 constraint, the value returned should be 0 regardless of VALUE.
678 For example, on the ROMP, load instructions cannot have their output in r0
679 if the memory reference contains a symbolic address. Constraint letter `Q'
680 is defined as representing a memory address that does *not* contain a
681 symbolic address. An alternative is specified with a `Q' constraint on the
682 input and `r' on the output. The next alternative specifies `m' on the
683 input and a register class that does not include r0 on the output. */
684 #define EXTRA_CONSTRAINT(VALUE, C) \
685 ((C) == 'Q' ? (GET_CODE (VALUE) == MEM && GET_CODE (XEXP (VALUE, 0)) == SYMBOL_REF) : 0)
688 /*{{{ Basic Stack Layout. */
690 /* Define this macro if pushing a word onto the stack moves the stack pointer
691 to a smaller address. */
692 #define STACK_GROWS_DOWNWARD 1
694 /* Define this macro if the addresses of local variable slots are at negative
695 offsets from the frame pointer. */
696 #define FRAME_GROWS_DOWNWARD 1
698 /* Offset from the frame pointer to the first local variable slot to be
701 If `FRAME_GROWS_DOWNWARD', find the next slot's offset by subtracting the
702 first slot's length from `STARTING_FRAME_OFFSET'. Otherwise, it is found by
703 adding the length of the first slot to the value `STARTING_FRAME_OFFSET'. */
704 /* #define STARTING_FRAME_OFFSET -4 */
705 #define STARTING_FRAME_OFFSET 0
707 /* Offset from the stack pointer register to the first location at which
708 outgoing arguments are placed. If not specified, the default value of zero
709 is used. This is the proper value for most machines.
711 If `ARGS_GROW_DOWNWARD', this is the offset to the location above the first
712 location at which outgoing arguments are placed. */
713 #define STACK_POINTER_OFFSET 0
715 /* Offset from the argument pointer register to the first argument's address.
716 On some machines it may depend on the data type of the function.
718 If `ARGS_GROW_DOWNWARD', this is the offset to the location above the first
719 argument's address. */
720 #define FIRST_PARM_OFFSET(FUNDECL) 0
722 /* A C expression whose value is RTL representing the location of the incoming
723 return address at the beginning of any function, before the prologue. This
724 RTL is either a `REG', indicating that the return value is saved in `REG',
725 or a `MEM' representing a location in the stack.
727 You only need to define this macro if you want to support call frame
728 debugging information like that provided by DWARF 2. */
729 #define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (SImode, RETURN_POINTER_REGNUM)
732 /*{{{ Register That Address the Stack Frame. */
734 /* The register number of the arg pointer register, which is used to access the
735 function's argument list. On some machines, this is the same as the frame
736 pointer register. On some machines, the hardware determines which register
737 this is. On other machines, you can choose any register you wish for this
738 purpose. If this is not the same register as the frame pointer register,
739 then you must mark it as a fixed register according to `FIXED_REGISTERS', or
740 arrange to be able to eliminate it. */
741 #define ARG_POINTER_REGNUM 20
744 /*{{{ Eliminating the Frame Pointer and the Arg Pointer. */
746 /* A C expression which is nonzero if a function must have and use a frame
747 pointer. This expression is evaluated in the reload pass. If its value is
748 nonzero the function will have a frame pointer.
750 The expression can in principle examine the current function and decide
751 according to the facts, but on most machines the constant 0 or the constant
752 1 suffices. Use 0 when the machine allows code to be generated with no
753 frame pointer, and doing so saves some time or space. Use 1 when there is
754 no possible advantage to avoiding a frame pointer.
756 In certain cases, the compiler does not know how to produce valid code
757 without a frame pointer. The compiler recognizes those cases and
758 automatically gives the function a frame pointer regardless of what
759 `FRAME_POINTER_REQUIRED' says. You don't need to worry about them.
761 In a function that does not require a frame pointer, the frame pointer
762 register can be allocated for ordinary usage, unless you mark it as a fixed
763 register. See `FIXED_REGISTERS' for more information. */
764 /* #define FRAME_POINTER_REQUIRED 0 */
765 #define FRAME_POINTER_REQUIRED \
766 (flag_omit_frame_pointer == 0 || current_function_pretend_args_size > 0)
768 /* If defined, this macro specifies a table of register pairs used to eliminate
769 unneeded registers that point into the stack frame. If it is not defined,
770 the only elimination attempted by the compiler is to replace references to
771 the frame pointer with references to the stack pointer.
773 The definition of this macro is a list of structure initializations, each of
774 which specifies an original and replacement register.
776 On some machines, the position of the argument pointer is not known until
777 the compilation is completed. In such a case, a separate hard register must
778 be used for the argument pointer. This register can be eliminated by
779 replacing it with either the frame pointer or the argument pointer,
780 depending on whether or not the frame pointer has been eliminated.
782 In this case, you might specify:
783 #define ELIMINABLE_REGS \
784 {{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
785 {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \
786 {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}}
788 Note that the elimination of the argument pointer with the stack pointer is
789 specified first since that is the preferred elimination. */
791 #define ELIMINABLE_REGS \
793 {ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
794 {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \
795 {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM} \
798 /* A C expression that returns non-zero if the compiler is allowed to try to
799 replace register number FROM with register number TO. This macro
800 need only be defined if `ELIMINABLE_REGS' is defined, and will usually be
801 the constant 1, since most of the cases preventing register elimination are
802 things that the compiler already knows about. */
804 #define CAN_ELIMINATE(FROM, TO) \
805 ((TO) == FRAME_POINTER_REGNUM || ! frame_pointer_needed)
807 /* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'. It specifies the
808 initial difference between the specified pair of registers. This macro must
809 be defined if `ELIMINABLE_REGS' is defined. */
810 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
811 (OFFSET) = fr30_compute_frame_size (FROM, TO)
814 /*{{{ Passing Function Arguments on the Stack. */
816 /* Define this macro if an argument declared in a prototype as an integral type
817 smaller than `int' should actually be passed as an `int'. In addition to
818 avoiding errors in certain cases of mismatch, it also makes for better code
819 on certain machines. */
820 #define PROMOTE_PROTOTYPES 1
822 /* If defined, the maximum amount of space required for outgoing arguments will
823 be computed and placed into the variable
824 `current_function_outgoing_args_size'. No space will be pushed onto the
825 stack for each call; instead, the function prologue should increase the
826 stack frame size by this amount.
828 Defining both `PUSH_ROUNDING' and `ACCUMULATE_OUTGOING_ARGS' is not
830 #define ACCUMULATE_OUTGOING_ARGS 1
832 /* A C expression that should indicate the number of bytes of its own arguments
833 that a function pops on returning, or 0 if the function pops no arguments
834 and the caller must therefore pop them all after the function returns.
836 FUNDECL is a C variable whose value is a tree node that describes the
837 function in question. Normally it is a node of type `FUNCTION_DECL' that
838 describes the declaration of the function. From this it is possible to
839 obtain the DECL_MACHINE_ATTRIBUTES of the function.
841 FUNTYPE is a C variable whose value is a tree node that describes the
842 function in question. Normally it is a node of type `FUNCTION_TYPE' that
843 describes the data type of the function. From this it is possible to obtain
844 the data types of the value and arguments (if known).
846 When a call to a library function is being considered, FUNTYPE will contain
847 an identifier node for the library function. Thus, if you need to
848 distinguish among various library functions, you can do so by their names.
849 Note that "library function" in this context means a function used to
850 perform arithmetic, whose name is known specially in the compiler and was
851 not mentioned in the C code being compiled.
853 STACK-SIZE is the number of bytes of arguments passed on the stack. If a
854 variable number of bytes is passed, it is zero, and argument popping will
855 always be the responsibility of the calling function.
857 On the Vax, all functions always pop their arguments, so the definition of
858 this macro is STACK-SIZE. On the 68000, using the standard calling
859 convention, no functions pop their arguments, so the value of the macro is
860 always 0 in this case. But an alternative calling convention is available
861 in which functions that take a fixed number of arguments pop them but other
862 functions (such as `printf') pop nothing (the caller pops all). When this
863 convention is in use, FUNTYPE is examined to determine whether a function
864 takes a fixed number of arguments. */
865 #define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACK_SIZE) 0
867 /* Implement `va_arg'. */
868 #define EXPAND_BUILTIN_VA_ARG(valist, type) \
869 fr30_va_arg (valist, type)
872 /*{{{ Function Arguments in Registers. */
874 /* Nonzero if we do not know how to pass TYPE solely in registers.
875 We cannot do so in the following cases:
877 - if the type has variable size
878 - if the type is marked as addressable (it is required to be constructed
880 - if the type is a structure or union. */
882 #define MUST_PASS_IN_STACK(MODE, TYPE) \
883 (((MODE) == BLKmode) \
885 && TYPE_SIZE (TYPE) != NULL \
886 && (TREE_CODE (TYPE_SIZE (TYPE)) != INTEGER_CST \
887 || TREE_CODE (TYPE) == RECORD_TYPE \
888 || TREE_CODE (TYPE) == UNION_TYPE \
889 || TREE_CODE (TYPE) == QUAL_UNION_TYPE \
890 || TREE_ADDRESSABLE (TYPE))))
892 /* The number of register assigned to holding function arguments. */
894 #define FR30_NUM_ARG_REGS 4
896 /* A C expression that controls whether a function argument is passed in a
897 register, and which register.
899 The usual way to make the ANSI library `stdarg.h' work on a machine where
900 some arguments are usually passed in registers, is to cause nameless
901 arguments to be passed on the stack instead. This is done by making
902 `FUNCTION_ARG' return 0 whenever NAMED is 0.
904 You may use the macro `MUST_PASS_IN_STACK (MODE, TYPE)' in the definition of
905 this macro to determine if this argument is of a type that must be passed in
906 the stack. If `REG_PARM_STACK_SPACE' is not defined and `FUNCTION_ARG'
907 returns non-zero for such an argument, the compiler will abort. If
908 `REG_PARM_STACK_SPACE' is defined, the argument will be computed in the
909 stack and then loaded into a register. */
911 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
912 ( (NAMED) == 0 ? NULL_RTX \
913 : MUST_PASS_IN_STACK (MODE, TYPE) ? NULL_RTX \
914 : (CUM) >= FR30_NUM_ARG_REGS ? NULL_RTX \
915 : gen_rtx (REG, MODE, CUM + FIRST_ARG_REGNUM))
917 /* A C type for declaring a variable that is used as the first argument of
918 `FUNCTION_ARG' and other related values. For some target machines, the type
919 `int' suffices and can hold the number of bytes of argument so far.
921 There is no need to record in `CUMULATIVE_ARGS' anything about the arguments
922 that have been passed on the stack. The compiler has other variables to
923 keep track of that. For target machines on which all arguments are passed
924 on the stack, there is no need to store anything in `CUMULATIVE_ARGS';
925 however, the data structure must exist and should not be empty, so use
927 /* On the FR30 this value is an accumulating count of the number of argument
928 registers that have been filled with argument values, as opposed to say,
929 the number of bytes of argument accumulated so far. */
930 typedef int CUMULATIVE_ARGS;
932 /* A C expression for the number of words, at the beginning of an argument,
933 must be put in registers. The value must be zero for arguments that are
934 passed entirely in registers or that are entirely pushed on the stack.
936 On some machines, certain arguments must be passed partially in registers
937 and partially in memory. On these machines, typically the first N words of
938 arguments are passed in registers, and the rest on the stack. If a
939 multi-word argument (a `double' or a structure) crosses that boundary, its
940 first few words must be passed in registers and the rest must be pushed.
941 This macro tells the compiler when this occurs, and how many of the words
942 should go in registers.
944 `FUNCTION_ARG' for these arguments should return the first register to be
945 used by the caller for this argument; likewise `FUNCTION_INCOMING_ARG', for
946 the called function. */
947 #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
948 fr30_function_arg_partial_nregs (CUM, MODE, TYPE, NAMED)
950 /* A C expression that indicates when an argument must be passed by reference.
951 If nonzero for an argument, a copy of that argument is made in memory and a
952 pointer to the argument is passed instead of the argument itself. The
953 pointer is passed in whatever way is appropriate for passing a pointer to
956 On machines where `REG_PARM_STACK_SPACE' is not defined, a suitable
957 definition of this macro might be:
958 #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
959 MUST_PASS_IN_STACK (MODE, TYPE) */
960 #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) \
961 MUST_PASS_IN_STACK (MODE, TYPE)
963 /* A C statement (sans semicolon) for initializing the variable CUM for the
964 state at the beginning of the argument list. The variable has type
965 `CUMULATIVE_ARGS'. The value of FNTYPE is the tree node for the data type
966 of the function which will receive the args, or 0 if the args are to a
967 compiler support library function. The value of INDIRECT is nonzero when
968 processing an indirect call, for example a call through a function pointer.
969 The value of INDIRECT is zero for a call to an explicitly named function, a
970 library function call, or when `INIT_CUMULATIVE_ARGS' is used to find
971 arguments for the function being compiled.
973 When processing a call to a compiler support library function, LIBNAME
974 identifies which one. It is a `symbol_ref' rtx which contains the name of
975 the function, as a string. LIBNAME is 0 when an ordinary C function call is
976 being processed. Thus, each time this macro is called, either LIBNAME or
977 FNTYPE is nonzero, but never both of them at once. */
978 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT) (CUM) = 0
980 /* A C statement (sans semicolon) to update the summarizer variable CUM to
981 advance past an argument in the argument list. The values MODE, TYPE and
982 NAMED describe that argument. Once this is done, the variable CUM is
983 suitable for analyzing the *following* argument with `FUNCTION_ARG', etc.
985 This macro need not do anything if the argument in question was passed on
986 the stack. The compiler knows how to track the amount of stack space used
987 for arguments without any special help. */
988 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
989 (CUM) += (NAMED) * fr30_num_arg_regs (MODE, TYPE)
991 /* A C expression that is nonzero if REGNO is the number of a hard register in
992 which function arguments are sometimes passed. This does *not* include
993 implicit arguments such as the static chain and the structure-value address.
994 On many machines, no registers can be used for this purpose since all
995 function arguments are pushed on the stack. */
996 #define FUNCTION_ARG_REGNO_P(REGNO) \
997 ((REGNO) >= FIRST_ARG_REGNUM && ((REGNO) < FIRST_ARG_REGNUM + FR30_NUM_ARG_REGS))
1000 /*{{{ How Scalar Function Values are Returned. */
1002 /* A C expression to create an RTX representing the place where a function
1003 returns a value of data type VALTYPE. VALTYPE is a tree node representing a
1004 data type. Write `TYPE_MODE (VALTYPE)' to get the machine mode used to
1005 represent that type. On many machines, only the mode is relevant.
1006 (Actually, on most machines, scalar values are returned in the same place
1007 regardless of mode).
1009 If `PROMOTE_FUNCTION_RETURN' is defined, you must apply the same promotion
1010 rules specified in `PROMOTE_MODE' if VALTYPE is a scalar type.
1012 If the precise function being called is known, FUNC is a tree node
1013 (`FUNCTION_DECL') for it; otherwise, FUNC is a null pointer. This makes it
1014 possible to use a different value-returning convention for specific
1015 functions when all their calls are known.
1017 `FUNCTION_VALUE' is not used for return vales with aggregate data types,
1018 because these are returned in another way. See `STRUCT_VALUE_REGNUM' and
1019 related macros, below. */
1020 #define FUNCTION_VALUE(VALTYPE, FUNC) \
1021 gen_rtx_REG (TYPE_MODE (VALTYPE), RETURN_VALUE_REGNUM)
1023 /* A C expression to create an RTX representing the place where a library
1024 function returns a value of mode MODE. If the precise function being called
1025 is known, FUNC is a tree node (`FUNCTION_DECL') for it; otherwise, FUNC is a
1026 null pointer. This makes it possible to use a different value-returning
1027 convention for specific functions when all their calls are known.
1029 Note that "library function" in this context means a compiler support
1030 routine, used to perform arithmetic, whose name is known specially by the
1031 compiler and was not mentioned in the C code being compiled.
1033 The definition of `LIBRARY_VALUE' need not be concerned aggregate data
1034 types, because none of the library functions returns such types. */
1035 #define LIBCALL_VALUE(MODE) gen_rtx (REG, MODE, RETURN_VALUE_REGNUM)
1037 /* A C expression that is nonzero if REGNO is the number of a hard register in
1038 which the values of called function may come back. */
1040 #define FUNCTION_VALUE_REGNO_P(REGNO) ((REGNO) == RETURN_VALUE_REGNUM)
1043 /*{{{ How Large Values are Returned. */
1045 /* Define this macro to be 1 if all structure and union return values must be
1046 in memory. Since this results in slower code, this should be defined only
1047 if needed for compatibility with other compilers or with an ABI. If you
1048 define this macro to be 0, then the conventions used for structure and union
1049 return values are decided by the `RETURN_IN_MEMORY' macro.
1051 If not defined, this defaults to the value 1. */
1052 #define DEFAULT_PCC_STRUCT_RETURN 1
1054 /* If the structure value address is not passed in a register, define
1055 `STRUCT_VALUE' as an expression returning an RTX for the place where the
1056 address is passed. If it returns 0, the address is passed as an "invisible"
1058 #define STRUCT_VALUE 0
1061 /*{{{ Generating Code for Profiling. */
1063 /* A C statement or compound statement to output to FILE some assembler code to
1064 call the profiling subroutine `mcount'. Before calling, the assembler code
1065 must load the address of a counter variable into a register where `mcount'
1066 expects to find the address. The name of this variable is `LP' followed by
1067 the number LABELNO, so you would generate the name using `LP%d' in a
1070 The details of how the address should be passed to `mcount' are determined
1071 by your operating system environment, not by GNU CC. To figure them out,
1072 compile a small program for profiling using the system's installed C
1073 compiler and look at the assembler code that results. */
1074 #define FUNCTION_PROFILER(FILE, LABELNO) \
1076 fprintf (FILE, "\t mov rp, r1\n" ); \
1077 fprintf (FILE, "\t ldi:32 mcount, r0\n" ); \
1078 fprintf (FILE, "\t call @r0\n" ); \
1079 fprintf (FILE, ".word\tLP%d\n", LABELNO); \
1083 /*{{{ Implementing the VARARGS Macros. */
1085 /* This macro offers an alternative to using `__builtin_saveregs' and defining
1086 the macro `EXPAND_BUILTIN_SAVEREGS'. Use it to store the anonymous register
1087 arguments into the stack so that all the arguments appear to have been
1088 passed consecutively on the stack. Once this is done, you can use the
1089 standard implementation of varargs that works for machines that pass all
1090 their arguments on the stack.
1092 The argument ARGS_SO_FAR is the `CUMULATIVE_ARGS' data structure, containing
1093 the values that obtain after processing of the named arguments. The
1094 arguments MODE and TYPE describe the last named argument--its machine mode
1095 and its data type as a tree node.
1097 The macro implementation should do two things: first, push onto the stack
1098 all the argument registers *not* used for the named arguments, and second,
1099 store the size of the data thus pushed into the `int'-valued variable whose
1100 name is supplied as the argument PRETEND_ARGS_SIZE. The value that you
1101 store here will serve as additional offset for setting up the stack frame.
1103 Because you must generate code to push the anonymous arguments at compile
1104 time without knowing their data types, `SETUP_INCOMING_VARARGS' is only
1105 useful on machines that have just a single category of argument register and
1106 use it uniformly for all data types.
1108 If the argument SECOND_TIME is nonzero, it means that the arguments of the
1109 function are being analyzed for the second time. This happens for an inline
1110 function, which is not actually compiled until the end of the source file.
1111 The macro `SETUP_INCOMING_VARARGS' should not generate any instructions in
1113 #define SETUP_INCOMING_VARARGS(ARGS_SO_FAR, MODE, TYPE, PRETEND_ARGS_SIZE, SECOND_TIME) \
1114 if (! SECOND_TIME) \
1115 fr30_setup_incoming_varargs (ARGS_SO_FAR, MODE, TYPE, & PRETEND_ARGS_SIZE)
1117 /* Define this macro if the location where a function argument is passed
1118 depends on whether or not it is a named argument.
1120 This macro controls how the NAMED argument to `FUNCTION_ARG' is set for
1121 varargs and stdarg functions. With this macro defined, the NAMED argument
1122 is always true for named arguments, and false for unnamed arguments. If
1123 this is not defined, but `SETUP_INCOMING_VARARGS' is defined, then all
1124 arguments are treated as named. Otherwise, all named arguments except the
1125 last are treated as named. */
1126 #define STRICT_ARGUMENT_NAMING 0
1129 /*{{{ Trampolines for Nested Functions. */
1131 /* On the FR30, the trampoline is:
1139 The no-ops are to guarantee that the the static chain and final
1140 target are 32 bit ailgned within the trampoline. That allows us to
1141 initialize those locations with simple SImode stores. The alternative
1142 would be to use HImode stores. */
1144 /* A C statement to output, on the stream FILE, assembler code for a block of
1145 data that contains the constant parts of a trampoline. This code should not
1146 include a label--the label is taken care of automatically. */
1147 #define TRAMPOLINE_TEMPLATE(FILE) \
1149 fprintf (FILE, "\tnop\n"); \
1150 fprintf (FILE, "\tldi:32\t#0, %s\n", reg_names [STATIC_CHAIN_REGNUM]); \
1151 fprintf (FILE, "\tnop\n"); \
1152 fprintf (FILE, "\tldi:32\t#0, %s\n", reg_names [COMPILER_SCRATCH_REGISTER]); \
1153 fprintf (FILE, "\tjmp\t@%s\n", reg_names [COMPILER_SCRATCH_REGISTER]); \
1156 /* A C expression for the size in bytes of the trampoline, as an integer. */
1157 #define TRAMPOLINE_SIZE 18
1159 /* We want the trampoline to be aligned on a 32bit boundary so that we can
1160 make sure the location of the static chain & target function within
1161 the trampoline is also aligned on a 32bit boundary. */
1162 #define TRAMPOLINE_ALIGNMENT 32
1164 /* A C statement to initialize the variable parts of a trampoline. ADDR is an
1165 RTX for the address of the trampoline; FNADDR is an RTX for the address of
1166 the nested function; STATIC_CHAIN is an RTX for the static chain value that
1167 should be passed to the function when it is called. */
1168 #define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN) \
1171 emit_move_insn (gen_rtx (MEM, SImode, plus_constant (ADDR, 4)), STATIC_CHAIN);\
1172 emit_move_insn (gen_rtx (MEM, SImode, plus_constant (ADDR, 12)), FNADDR); \
1176 /*{{{ Addressing Modes. */
1178 /* A C expression that is 1 if the RTX X is a constant which is a valid
1179 address. On most machines, this can be defined as `CONSTANT_P (X)', but a
1180 few machines are more restrictive in which constant addresses are supported.
1182 `CONSTANT_P' accepts integer-values expressions whose values are not
1183 explicitly known, such as `symbol_ref', `label_ref', and `high' expressions
1184 and `const' arithmetic expressions, in addition to `const_int' and
1185 `const_double' expressions. */
1186 #define CONSTANT_ADDRESS_P(X) CONSTANT_P (X)
1188 /* A number, the maximum number of registers that can appear in a valid memory
1189 address. Note that it is up to you to specify a value equal to the maximum
1190 number that `GO_IF_LEGITIMATE_ADDRESS' would ever accept. */
1191 #define MAX_REGS_PER_ADDRESS 1
1193 /* A C compound statement with a conditional `goto LABEL;' executed if X (an
1194 RTX) is a legitimate memory address on the target machine for a memory
1195 operand of mode MODE.
1197 It usually pays to define several simpler macros to serve as subroutines for
1198 this one. Otherwise it may be too complicated to understand.
1200 This macro must exist in two variants: a strict variant and a non-strict
1201 one. The strict variant is used in the reload pass. It must be defined so
1202 that any pseudo-register that has not been allocated a hard register is
1203 considered a memory reference. In contexts where some kind of register is
1204 required, a pseudo-register with no hard register must be rejected.
1206 The non-strict variant is used in other passes. It must be defined to
1207 accept all pseudo-registers in every context where some kind of register is
1210 Compiler source files that want to use the strict variant of this macro
1211 define the macro `REG_OK_STRICT'. You should use an `#ifdef REG_OK_STRICT'
1212 conditional to define the strict variant in that case and the non-strict
1215 Subroutines to check for acceptable registers for various purposes (one for
1216 base registers, one for index registers, and so on) are typically among the
1217 subroutines used to define `GO_IF_LEGITIMATE_ADDRESS'. Then only these
1218 subroutine macros need have two variants; the higher levels of macros may be
1219 the same whether strict or not.
1221 Normally, constant addresses which are the sum of a `symbol_ref' and an
1222 integer are stored inside a `const' RTX to mark them as constant.
1223 Therefore, there is no need to recognize such sums specifically as
1224 legitimate addresses. Normally you would simply recognize any `const' as
1227 Usually `PRINT_OPERAND_ADDRESS' is not prepared to handle constant sums that
1228 are not marked with `const'. It assumes that a naked `plus' indicates
1229 indexing. If so, then you *must* reject such naked constant sums as
1230 illegitimate addresses, so that none of them will be given to
1231 `PRINT_OPERAND_ADDRESS'.
1233 On some machines, whether a symbolic address is legitimate depends on the
1234 section that the address refers to. On these machines, define the macro
1235 `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and
1236 then check for it here. When you see a `const', you will have to look
1237 inside it to find the `symbol_ref' in order to determine the section.
1239 The best way to modify the name string is by adding text to the beginning,
1240 with suitable punctuation to prevent any ambiguity. Allocate the new name
1241 in `saveable_obstack'. You will have to modify `ASM_OUTPUT_LABELREF' to
1242 remove and decode the added text and output the name accordingly, and define
1243 `STRIP_NAME_ENCODING' to access the original name string.
1245 You can check the information stored here into the `symbol_ref' in the
1246 definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and
1247 `PRINT_OPERAND_ADDRESS'.
1249 Used in explow.c, recog.c, reload.c. */
1251 /* On the FR30 we only have one real addressing mode - an address in a
1252 register. There are three special cases however:
1254 * indexed addressing using small positive offsets from the stack pointer
1256 * indexed addressing using small signed offsets from the frame pointer
1258 * register plus register addresing using R13 as the base register.
1260 At the moment we only support the first two of these special cases. */
1262 #ifdef REG_OK_STRICT
1263 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \
1266 if (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \
1268 if (GET_CODE (X) == PLUS \
1269 && ((MODE) == SImode || (MODE) == SFmode) \
1270 && XEXP (X, 0) == stack_pointer_rtx \
1271 && GET_CODE (XEXP (X, 1)) == CONST_INT \
1272 && IN_RANGE (INTVAL (XEXP (X, 1)), 0, (1 << 6) - 4)) \
1274 if (GET_CODE (X) == PLUS \
1275 && ((MODE) == SImode || (MODE) == SFmode) \
1276 && XEXP (X, 0) == frame_pointer_rtx \
1277 && GET_CODE (XEXP (X, 1)) == CONST_INT \
1278 && IN_RANGE (INTVAL (XEXP (X, 1)), -(1 << 9), (1 << 9) - 4)) \
1283 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL) \
1286 if (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \
1288 if (GET_CODE (X) == PLUS \
1289 && ((MODE) == SImode || (MODE) == SFmode) \
1290 && XEXP (X, 0) == stack_pointer_rtx \
1291 && GET_CODE (XEXP (X, 1)) == CONST_INT \
1292 && IN_RANGE (INTVAL (XEXP (X, 1)), 0, (1 << 6) - 4)) \
1294 if (GET_CODE (X) == PLUS \
1295 && ((MODE) == SImode || (MODE) == SFmode) \
1296 && (XEXP (X, 0) == frame_pointer_rtx \
1297 || XEXP(X,0) == arg_pointer_rtx) \
1298 && GET_CODE (XEXP (X, 1)) == CONST_INT \
1299 && IN_RANGE (INTVAL (XEXP (X, 1)), -(1 << 9), (1 << 9) - 4)) \
1305 /* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for
1306 use as a base register. For hard registers, it should always accept those
1307 which the hardware permits and reject the others. Whether the macro accepts
1308 or rejects pseudo registers must be controlled by `REG_OK_STRICT' as
1309 described above. This usually requires two variant definitions, of which
1310 `REG_OK_STRICT' controls the one actually used. */
1311 #ifdef REG_OK_STRICT
1312 #define REG_OK_FOR_BASE_P(X) (((unsigned) REGNO (X)) <= STACK_POINTER_REGNUM)
1314 #define REG_OK_FOR_BASE_P(X) 1
1317 /* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for
1318 use as an index register.
1320 The difference between an index register and a base register is that the
1321 index register may be scaled. If an address involves the sum of two
1322 registers, neither one of them scaled, then either one may be labeled the
1323 "base" and the other the "index"; but whichever labeling is used must fit
1324 the machine's constraints of which registers may serve in each capacity.
1325 The compiler will try both labelings, looking for one that is valid, and
1326 will reload one or both registers only if neither labeling works. */
1327 #define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X)
1329 /* A C compound statement that attempts to replace X with a valid memory
1330 address for an operand of mode MODE. WIN will be a C statement label
1331 elsewhere in the code; the macro definition may use
1333 GO_IF_LEGITIMATE_ADDRESS (MODE, X, WIN);
1335 to avoid further processing if the address has become legitimate.
1337 X will always be the result of a call to `break_out_memory_refs', and OLDX
1338 will be the operand that was given to that function to produce X.
1340 The code generated by this macro should not alter the substructure of X. If
1341 it transforms X into a more legitimate form, it should assign X (which will
1342 always be a C variable) a new value.
1344 It is not necessary for this macro to come up with a legitimate address.
1345 The compiler has standard ways of doing so in all cases. In fact, it is
1346 safe for this macro to do nothing. But often a machine-dependent strategy
1347 can generate better code. */
1348 #define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN)
1350 /* A C statement or compound statement with a conditional `goto LABEL;'
1351 executed if memory address X (an RTX) can have different meanings depending
1352 on the machine mode of the memory reference it is used for or if the address
1353 is valid for some modes but not others.
1355 Autoincrement and autodecrement addresses typically have mode-dependent
1356 effects because the amount of the increment or decrement is the size of the
1357 operand being addressed. Some machines have other mode-dependent addresses.
1358 Many RISC machines have no mode-dependent addresses.
1360 You may assume that ADDR is a valid address for the machine. */
1361 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
1363 /* A C expression that is nonzero if X is a legitimate constant for an
1364 immediate operand on the target machine. You can assume that X satisfies
1365 `CONSTANT_P', so you need not check this. In fact, `1' is a suitable
1366 definition for this macro on machines where anything `CONSTANT_P' is valid. */
1367 #define LEGITIMATE_CONSTANT_P(X) 1
1370 /*{{{ Describing Relative Costs of Operations */
1372 /* Define this macro as a C expression which is nonzero if accessing less than
1373 a word of memory (i.e. a `char' or a `short') is no faster than accessing a
1374 word of memory, i.e., if such access require more than one instruction or if
1375 there is no difference in cost between byte and (aligned) word loads.
1377 When this macro is not defined, the compiler will access a field by finding
1378 the smallest containing object; when it is defined, a fullword load will be
1379 used if alignment permits. Unless bytes accesses are faster than word
1380 accesses, using word accesses is preferable since it may eliminate
1381 subsequent memory access if subsequent accesses occur to other fields in the
1382 same word of the structure, but to different bytes. */
1383 #define SLOW_BYTE_ACCESS 1
1385 /* Define this macro if zero-extension (of a `char' or `short' to an `int') can
1386 be done faster if the destination is a register that is known to be zero.
1388 If you define this macro, you must have instruction patterns that recognize
1389 RTL structures like this:
1391 (set (strict_low_part (subreg:QI (reg:SI ...) 0)) ...)
1393 and likewise for `HImode'. */
1394 #define SLOW_ZERO_EXTEND 0
1397 /*{{{ Dividing the output into sections. */
1399 /* A C expression whose value is a string containing the assembler operation
1400 that should precede instructions and read-only data. Normally `".text"' is
1402 #define TEXT_SECTION_ASM_OP "\t.text"
1404 /* A C expression whose value is a string containing the assembler operation to
1405 identify the following data as writable initialized data. Normally
1406 `".data"' is right. */
1407 #define DATA_SECTION_ASM_OP "\t.data"
1409 /* If defined, a C expression whose value is a string containing the
1410 assembler operation to identify the following data as
1411 uninitialized global data. If not defined, and neither
1412 `ASM_OUTPUT_BSS' nor `ASM_OUTPUT_ALIGNED_BSS' are defined,
1413 uninitialized global data will be output in the data section if
1414 `-fno-common' is passed, otherwise `ASM_OUTPUT_COMMON' will be
1416 #define BSS_SECTION_ASM_OP "\t.bss"
1419 /*{{{ The Overall Framework of an Assembler File. */
1421 /* A C string constant describing how to begin a comment in the target
1422 assembler language. The compiler assumes that the comment will end at the
1424 #define ASM_COMMENT_START ";"
1426 /* A C string constant for text to be output before each `asm' statement or
1427 group of consecutive ones. Normally this is `"#APP"', which is a comment
1428 that has no effect on most assemblers but tells the GNU assembler that it
1429 must check the lines that follow for all valid assembler constructs. */
1430 #define ASM_APP_ON "#APP\n"
1432 /* A C string constant for text to be output after each `asm' statement or
1433 group of consecutive ones. Normally this is `"#NO_APP"', which tells the
1434 GNU assembler to resume making the time-saving assumptions that are valid
1435 for ordinary compiler output. */
1436 #define ASM_APP_OFF "#NO_APP\n"
1439 /*{{{ Output of Data. */
1441 /* This is how to output an assembler line defining a `float' constant. */
1442 #define ASM_OUTPUT_FLOAT(FILE, VALUE) \
1448 REAL_VALUE_TO_TARGET_SINGLE ((VALUE), t); \
1449 REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \
1451 fprintf (FILE, "\t.word\t0x%lx %s %s\n", \
1452 t, ASM_COMMENT_START, str); \
1456 /* This is how to output an assembler line defining a `double' constant. */
1457 #define ASM_OUTPUT_DOUBLE(FILE, VALUE) \
1463 REAL_VALUE_TO_TARGET_DOUBLE ((VALUE), t); \
1464 REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", str); \
1466 fprintf (FILE, "\t.word\t0x%lx %s %s\n\t.word\t0x%lx\n", \
1467 t[0], ASM_COMMENT_START, str, t[1]); \
1471 /* This is how to output an assembler line defining a `char' constant. */
1472 #define ASM_OUTPUT_CHAR(FILE, VALUE) \
1475 fprintf (FILE, "\t.byte\t"); \
1476 output_addr_const (FILE, (VALUE)); \
1477 fprintf (FILE, "\n"); \
1481 /* This is how to output an assembler line defining a `short' constant. */
1482 #define ASM_OUTPUT_SHORT(FILE, VALUE) \
1485 fprintf (FILE, "\t.hword\t"); \
1486 output_addr_const (FILE, (VALUE)); \
1487 fprintf (FILE, "\n"); \
1491 /* This is how to output an assembler line defining an `int' constant.
1492 We also handle symbol output here. */
1493 #define ASM_OUTPUT_INT(FILE, VALUE) \
1496 fprintf (FILE, "\t.word\t"); \
1497 output_addr_const (FILE, (VALUE)); \
1498 fprintf (FILE, "\n"); \
1502 /* A C statement to output to the stdio stream STREAM an assembler instruction
1503 to assemble a single byte containing the number VALUE. */
1504 #define ASM_OUTPUT_BYTE(STREAM, VALUE) \
1505 fprintf (STREAM, "%s0x%x\n", ASM_BYTE_OP, (VALUE))
1508 /*{{{ Output and Generation of Labels. */
1510 /* A C statement (sans semicolon) to output to the stdio stream STREAM the
1511 assembler definition of a label named NAME. Use the expression
1512 `assemble_name (STREAM, NAME)' to output the name itself; before and after
1513 that, output the additional assembler syntax for defining the name, and a
1515 #define ASM_OUTPUT_LABEL(STREAM, NAME) \
1518 assemble_name (STREAM, NAME); \
1519 fputs (":\n", STREAM); \
1523 /* A C statement (sans semicolon) to output to the stdio stream STREAM some
1524 commands that will make the label NAME global; that is, available for
1525 reference from other files. Use the expression `assemble_name (STREAM,
1526 NAME)' to output the name itself; before and after that, output the
1527 additional assembler syntax for making that name global, and a newline. */
1528 #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \
1531 fputs ("\t.globl ", STREAM); \
1532 assemble_name (STREAM, NAME); \
1533 fputs ("\n", STREAM); \
1537 /* A C expression to assign to OUTVAR (which is a variable of type `char *') a
1538 newly allocated string made from the string NAME and the number NUMBER, with
1539 some suitable punctuation added. Use `alloca' to get space for the string.
1541 The string will be used as an argument to `ASM_OUTPUT_LABELREF' to produce
1542 an assembler label for an internal static variable whose name is NAME.
1543 Therefore, the string must be such as to result in valid assembler code.
1544 The argument NUMBER is different each time this macro is executed; it
1545 prevents conflicts between similarly-named internal static variables in
1548 Ideally this string should not be a valid C identifier, to prevent any
1549 conflict with the user's own symbols. Most assemblers allow periods or
1550 percent signs in assembler symbols; putting at least one of these between
1551 the name and the number will suffice. */
1552 #define ASM_FORMAT_PRIVATE_NAME(OUTVAR, NAME, NUMBER) \
1555 (OUTVAR) = (char *) alloca (strlen ((NAME)) + 12); \
1556 sprintf ((OUTVAR), "%s.%ld", (NAME), (long)(NUMBER)); \
1561 /*{{{ Output of Assembler Instructions. */
1563 /* A C compound statement to output to stdio stream STREAM the assembler syntax
1564 for an instruction operand X. X is an RTL expression.
1566 CODE is a value that can be used to specify one of several ways of printing
1567 the operand. It is used when identical operands must be printed differently
1568 depending on the context. CODE comes from the `%' specification that was
1569 used to request printing of the operand. If the specification was just
1570 `%DIGIT' then CODE is 0; if the specification was `%LTR DIGIT' then CODE is
1571 the ASCII code for LTR.
1573 If X is a register, this macro should print the register's name. The names
1574 can be found in an array `reg_names' whose type is `char *[]'. `reg_names'
1575 is initialized from `REGISTER_NAMES'.
1577 When the machine description has a specification `%PUNCT' (a `%' followed by
1578 a punctuation character), this macro is called with a null pointer for X and
1579 the punctuation character for CODE. */
1580 #define PRINT_OPERAND(STREAM, X, CODE) fr30_print_operand (STREAM, X, CODE)
1582 /* A C expression which evaluates to true if CODE is a valid punctuation
1583 character for use in the `PRINT_OPERAND' macro. If
1584 `PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no punctuation
1585 characters (except for the standard one, `%') are used in this way. */
1586 #define PRINT_OPERAND_PUNCT_VALID_P(CODE) (CODE == '#')
1588 /* A C compound statement to output to stdio stream STREAM the assembler syntax
1589 for an instruction operand that is a memory reference whose address is X. X
1590 is an RTL expression.
1592 On some machines, the syntax for a symbolic address depends on the section
1593 that the address refers to. On these machines, define the macro
1594 `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and
1595 then check for it here. *Note Assembler Format::. */
1596 #define PRINT_OPERAND_ADDRESS(STREAM, X) fr30_print_operand_address (STREAM, X)
1598 /* If defined, C string expressions to be used for the `%R', `%L', `%U', and
1599 `%I' options of `asm_fprintf' (see `final.c'). These are useful when a
1600 single `md' file must support multiple assembler formats. In that case, the
1601 various `tm.h' files can define these macros differently.
1603 USER_LABEL_PREFIX is defined in svr4.h. */
1604 #define REGISTER_PREFIX "%"
1605 #define LOCAL_LABEL_PREFIX "."
1606 #define USER_LABEL_PREFIX ""
1607 #define IMMEDIATE_PREFIX ""
1610 /*{{{ Output of Dispatch Tables. */
1612 /* This macro should be provided on machines where the addresses in a dispatch
1613 table are relative to the table's own address.
1615 The definition should be a C statement to output to the stdio stream STREAM
1616 an assembler pseudo-instruction to generate a difference between two labels.
1617 VALUE and REL are the numbers of two internal labels. The definitions of
1618 these labels are output using `ASM_OUTPUT_INTERNAL_LABEL', and they must be
1619 printed in the same way here. For example,
1621 fprintf (STREAM, "\t.word L%d-L%d\n", VALUE, REL) */
1622 #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \
1623 fprintf (STREAM, "\t.word .L%d-.L%d\n", VALUE, REL)
1625 /* This macro should be provided on machines where the addresses in a dispatch
1628 The definition should be a C statement to output to the stdio stream STREAM
1629 an assembler pseudo-instruction to generate a reference to a label. VALUE
1630 is the number of an internal label whose definition is output using
1631 `ASM_OUTPUT_INTERNAL_LABEL'. For example,
1633 fprintf (STREAM, "\t.word L%d\n", VALUE) */
1634 #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \
1635 fprintf (STREAM, "\t.word .L%d\n", VALUE)
1638 /*{{{ Assembler Commands for Alignment. */
1640 /* A C statement to output to the stdio stream STREAM an assembler command to
1641 advance the location counter to a multiple of 2 to the POWER bytes. POWER
1642 will be a C expression of type `int'. */
1643 #define ASM_OUTPUT_ALIGN(STREAM, POWER) \
1644 fprintf ((STREAM), "\t.p2align %d\n", (POWER))
1647 /*{{{ Macros Affecting all Debug Formats. */
1649 /* A C expression that returns the DBX register number for the compiler
1650 register number REGNO. In simple cases, the value of this expression may be
1651 REGNO itself. But sometimes there are some registers that the compiler
1652 knows about and DBX does not, or vice versa. In such cases, some register
1653 may need to have one number in the compiler and another for DBX.
1655 If two registers have consecutive numbers inside GNU CC, and they can be
1656 used as a pair to hold a multiword value, then they *must* have consecutive
1657 numbers after renumbering with `DBX_REGISTER_NUMBER'. Otherwise, debuggers
1658 will be unable to access such a pair, because they expect register pairs to
1659 be consecutive in their own numbering scheme.
1661 If you find yourself defining `DBX_REGISTER_NUMBER' in way that does not
1662 preserve register pairs, then what you must do instead is redefine the
1663 actual register numbering scheme. */
1664 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
1667 /*{{{ Macros for SDB and Dwarf Output. */
1669 /* Define this macro to allow references to structure, union, or enumeration
1670 tags that have not yet been seen to be handled. Some assemblers choke if
1671 forward tags are used, while some require it. */
1672 /* #define SDB_ALLOW_FORWARD_REFERENCES */
1674 #define DWARF_LINE_MIN_INSTR_LENGTH 2
1677 /*{{{ Miscellaneous Parameters. */
1679 /* An alias for a machine mode name. This is the machine mode that elements of
1680 a jump-table should have. */
1681 #define CASE_VECTOR_MODE SImode
1683 /* An alias for a tree code that is the easiest kind of division to compile
1684 code for in the general case. It may be `TRUNC_DIV_EXPR', `FLOOR_DIV_EXPR',
1685 `CEIL_DIV_EXPR' or `ROUND_DIV_EXPR'. These four division operators differ
1686 in how they round the result to an integer. `EASY_DIV_EXPR' is used when it
1687 is permissible to use any of those kinds of division and the choice should
1688 be made on the basis of efficiency. */
1689 #define EASY_DIV_EXPR TRUNC_DIV_EXPR
1691 /* The maximum number of bytes that a single instruction can move quickly from
1692 memory to memory. */
1695 /* A C expression which is nonzero if on this machine it is safe to "convert"
1696 an integer of INPREC bits to one of OUTPREC bits (where OUTPREC is smaller
1697 than INPREC) by merely operating on it as if it had only OUTPREC bits.
1699 On many machines, this expression can be 1.
1701 When `TRULY_NOOP_TRUNCATION' returns 1 for a pair of sizes for modes for
1702 which `MODES_TIEABLE_P' is 0, suboptimal code can result. If this is the
1703 case, making `TRULY_NOOP_TRUNCATION' return 0 in such cases may improve
1705 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
1707 /* An alias for the machine mode for pointers. On most machines, define this
1708 to be the integer mode corresponding to the width of a hardware pointer;
1709 `SImode' on 32-bit machine or `DImode' on 64-bit machines. On some machines
1710 you must define this to be one of the partial integer modes, such as
1713 The width of `Pmode' must be at least as large as the value of
1714 `POINTER_SIZE'. If it is not equal, you must define the macro
1715 `POINTERS_EXTEND_UNSIGNED' to specify how pointers are extended to `Pmode'. */
1716 #define Pmode SImode
1718 /* An alias for the machine mode used for memory references to functions being
1719 called, in `call' RTL expressions. On most machines this should be
1721 #define FUNCTION_MODE QImode
1723 /* If cross-compiling, don't require stdio.h etc to build libgcc.a. */
1724 #if defined CROSS_COMPILE && ! defined inhibit_libc
1725 #define inhibit_libc
1729 /*{{{ Exported variables */
1731 /* Define the information needed to generate branch and scc insns. This is
1732 stored from the compare operation. Note that we can't use "rtx" here
1733 since it hasn't been defined! */
1735 extern struct rtx_def * fr30_compare_op0;
1736 extern struct rtx_def * fr30_compare_op1;
1739 /*{{{ PERDICATE_CODES. */
1741 #define PREDICATE_CODES \
1742 { "stack_add_operand", { CONST_INT }}, \
1743 { "high_register_operand", { REG }}, \
1744 { "low_register_operand", { REG }}, \
1745 { "call_operand", { MEM }}, \
1746 { "fp_displacement_operand", { CONST_INT }}, \
1747 { "sp_displacement_operand", { CONST_INT }}, \
1748 { "di_operand", { CONST_INT, CONST_DOUBLE, REG, MEM }}, \
1749 { "nonimmediate_di_operand", { REG, MEM }}, \
1750 { "add_immediate_operand", { REG, CONST_INT }},
1754 /* Local Variables: */
1755 /* folded-file: t */