comparison gcc/config/frv/frv.h @ 67:f6334be47118

update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 22 Mar 2011 17:18:12 +0900
parents 77e2b8dfacca
children 04ced10e8804
comparison
equal deleted inserted replaced
65:65488c3d617d 67:f6334be47118
1 /* Target macros for the FRV port of GCC. 1 /* Target macros for the FRV port of GCC.
2 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009 2 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009,
3 2010, 2011
3 Free Software Foundation, Inc. 4 Free Software Foundation, Inc.
4 Contributed by Red Hat Inc. 5 Contributed by Red Hat Inc.
5 6
6 This file is part of GCC. 7 This file is part of GCC.
7 8
23 #define __FRV_H__ 24 #define __FRV_H__
24 25
25 /* Frv general purpose macros. */ 26 /* Frv general purpose macros. */
26 /* Align an address. */ 27 /* Align an address. */
27 #define ADDR_ALIGN(addr,align) (((addr) + (align) - 1) & ~((align) - 1)) 28 #define ADDR_ALIGN(addr,align) (((addr) + (align) - 1) & ~((align) - 1))
28
29 /* Return true if a value is inside a range. */
30 #define IN_RANGE_P(VALUE, LOW, HIGH) \
31 ( (((HOST_WIDE_INT)(VALUE)) >= (HOST_WIDE_INT)(LOW)) \
32 && (((HOST_WIDE_INT)(VALUE)) <= ((HOST_WIDE_INT)(HIGH))))
33
34 29
35 /* Driver configuration. */ 30 /* Driver configuration. */
36
37 /* A C expression which determines whether the option `-CHAR' takes arguments.
38 The value should be the number of arguments that option takes-zero, for many
39 options.
40
41 By default, this macro is defined to handle the standard options properly.
42 You need not define it unless you wish to add additional options which take
43 arguments.
44
45 Defined in svr4.h. */
46 #undef SWITCH_TAKES_ARG
47 #define SWITCH_TAKES_ARG(CHAR) \
48 (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
49
50 /* A C expression which determines whether the option `-NAME' takes arguments.
51 The value should be the number of arguments that option takes-zero, for many
52 options. This macro rather than `SWITCH_TAKES_ARG' is used for
53 multi-character option names.
54
55 By default, this macro is defined as `DEFAULT_WORD_SWITCH_TAKES_ARG', which
56 handles the standard options properly. You need not define
57 `WORD_SWITCH_TAKES_ARG' unless you wish to add additional options which take
58 arguments. Any redefinition should call `DEFAULT_WORD_SWITCH_TAKES_ARG' and
59 then check for additional options.
60
61 Defined in svr4.h. */
62 #undef WORD_SWITCH_TAKES_ARG
63 31
64 /* -fpic and -fPIC used to imply the -mlibrary-pic multilib, but with 32 /* -fpic and -fPIC used to imply the -mlibrary-pic multilib, but with
65 FDPIC which multilib to use depends on whether FDPIC is in use or 33 FDPIC which multilib to use depends on whether FDPIC is in use or
66 not. The trick we use is to introduce -multilib-library-pic as a 34 not. The trick we use is to introduce -multilib-library-pic as a
67 pseudo-flag that selects the library-pic multilib, and map fpic 35 pseudo-flag that selects the library-pic multilib, and map fpic
85 " 53 "
86 #ifndef SUBTARGET_DRIVER_SELF_SPECS 54 #ifndef SUBTARGET_DRIVER_SELF_SPECS
87 # define SUBTARGET_DRIVER_SELF_SPECS 55 # define SUBTARGET_DRIVER_SELF_SPECS
88 #endif 56 #endif
89 57
90 /* A C string constant that tells the GCC driver program options to pass to
91 the assembler. It can also specify how to translate options you give to GNU
92 CC into options for GCC to pass to the assembler. See the file `sun3.h'
93 for an example of this.
94
95 Do not define this macro if it does not need to do anything.
96
97 Defined in svr4.h. */
98 #undef ASM_SPEC 58 #undef ASM_SPEC
99 #define ASM_SPEC "\ 59 #define ASM_SPEC "\
100 %{G*} %{v} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*} \ 60 %{G*} \
101 %{mtomcat-stats} \ 61 %{mtomcat-stats} \
102 %{!mno-eflags: \ 62 %{!mno-eflags: \
103 %{mcpu=*} \ 63 %{mcpu=*} \
104 %{mgpr-*} %{mfpr-*} \ 64 %{mgpr-*} %{mfpr-*} \
105 %{msoft-float} %{mhard-float} \ 65 %{msoft-float} %{mhard-float} \
109 %{mmuladd} %{mno-muladd} \ 69 %{mmuladd} %{mno-muladd} \
110 %{mpack} %{mno-pack} \ 70 %{mpack} %{mno-pack} \
111 %{mno-fdpic:-mnopic} %{mfdpic} \ 71 %{mno-fdpic:-mnopic} %{mfdpic} \
112 %{fpic|fpie: -mpic} %{fPIC|fPIE: -mPIC} %{mlibrary-pic}}" 72 %{fpic|fpie: -mpic} %{fPIC|fPIE: -mPIC} %{mlibrary-pic}}"
113 73
114 /* Another C string constant used much like `LINK_SPEC'. The difference
115 between the two is that `STARTFILE_SPEC' is used at the very beginning of
116 the command given to the linker.
117
118 If this macro is not defined, a default is provided that loads the standard
119 C startup file from the usual place. See `gcc.c'.
120
121 Defined in svr4.h. */
122 #undef STARTFILE_SPEC 74 #undef STARTFILE_SPEC
123 #define STARTFILE_SPEC "crt0%O%s frvbegin%O%s" 75 #define STARTFILE_SPEC "crt0%O%s frvbegin%O%s"
124 76
125 /* Another C string constant used much like `LINK_SPEC'. The difference
126 between the two is that `ENDFILE_SPEC' is used at the very end of the
127 command given to the linker.
128
129 Do not define this macro if it does not need to do anything.
130
131 Defined in svr4.h. */
132 #undef ENDFILE_SPEC 77 #undef ENDFILE_SPEC
133 #define ENDFILE_SPEC "frvend%O%s" 78 #define ENDFILE_SPEC "frvend%O%s"
134 79
135 80
136 #define MASK_DEFAULT_FRV \ 81 #define MASK_DEFAULT_FRV \
172 117
173 Do not define this macro if it does not need to do anything. */ 118 Do not define this macro if it does not need to do anything. */
174 /* For ABI compliance, we need to put bss data into the normal data section. */ 119 /* For ABI compliance, we need to put bss data into the normal data section. */
175 #define CC1_SPEC "%{G*}" 120 #define CC1_SPEC "%{G*}"
176 121
177 /* A C string constant that tells the GCC driver program options to pass to
178 the linker. It can also specify how to translate options you give to GCC
179 into options for GCC to pass to the linker.
180
181 Do not define this macro if it does not need to do anything.
182
183 Defined in svr4.h. */
184 /* Override the svr4.h version with one that dispenses without the svr4
185 shared library options, notably -G. */
186 #undef LINK_SPEC 122 #undef LINK_SPEC
187 #define LINK_SPEC "\ 123 #define LINK_SPEC "\
188 %{h*} %{v:-V} \ 124 %{h*} %{v:-V} \
189 %{b} \
190 %{mfdpic:-melf32frvfd -z text} \ 125 %{mfdpic:-melf32frvfd -z text} \
191 %{static:-dn -Bstatic} \ 126 %{static:-dn -Bstatic} \
192 %{shared:-Bdynamic} \ 127 %{shared:-Bdynamic} \
193 %{symbolic:-Bsymbolic} \ 128 %{symbolic:-Bsymbolic} \
194 %{G*} \ 129 %{G*}"
195 %{YP,*} \
196 %{Qy:} %{!Qn:-Qy}"
197
198 /* Another C string constant used much like `LINK_SPEC'. The difference
199 between the two is that `LIB_SPEC' is used at the end of the command given
200 to the linker.
201
202 If this macro is not defined, a default is provided that loads the standard
203 C library from the usual place. See `gcc.c'.
204
205 Defined in svr4.h. */
206 130
207 #undef LIB_SPEC 131 #undef LIB_SPEC
208 #define LIB_SPEC "--start-group -lc -lsim --end-group" 132 #define LIB_SPEC "--start-group -lc -lsim --end-group"
209 133
210 #ifndef CPU_TYPE 134 #ifndef CPU_TYPE
325 #define TARGET_VERSION \ 249 #define TARGET_VERSION \
326 fprintf (stderr, " (68k, MIT syntax)"); 250 fprintf (stderr, " (68k, MIT syntax)");
327 #endif */ 251 #endif */
328 #define TARGET_VERSION fprintf (stderr, _(" (frv)")) 252 #define TARGET_VERSION fprintf (stderr, _(" (frv)"))
329 253
330 /* Sometimes certain combinations of command options do not make sense on a
331 particular target machine. You can define a macro `OVERRIDE_OPTIONS' to
332 take account of this. This macro, if defined, is executed once just after
333 all the command options have been parsed.
334
335 Don't use this macro to turn on various extra optimizations for `-O'. That
336 is what `OPTIMIZATION_OPTIONS' is for. */
337
338 #define OVERRIDE_OPTIONS frv_override_options ()
339
340 /* Some machines may desire to change what optimizations are performed for
341 various optimization levels. This macro, if defined, is executed once just
342 after the optimization level is determined and before the remainder of the
343 command options have been parsed. Values set in this macro are used as the
344 default values for the other command line options.
345
346 LEVEL is the optimization level specified; 2 if `-O2' is specified, 1 if
347 `-O' is specified, and 0 if neither is specified.
348
349 SIZE is nonzero if `-Os' is specified, 0 otherwise.
350
351 You should not use this macro to change options that are not
352 machine-specific. These should uniformly selected by the same optimization
353 level on all supported machines. Use this macro to enable machine-specific
354 optimizations.
355
356 *Do not examine `write_symbols' in this macro!* The debugging options are
357 *not supposed to alter the generated code. */
358 #define OPTIMIZATION_OPTIONS(LEVEL,SIZE) frv_optimization_options (LEVEL, SIZE)
359
360
361 /* Define this macro if debugging can be performed even without a frame
362 pointer. If this macro is defined, GCC will turn on the
363 `-fomit-frame-pointer' option whenever `-O' is specified. */
364 /* Frv needs a specific frame layout that includes the frame pointer. */
365
366 #define CAN_DEBUG_WITHOUT_FP
367
368 #define LABEL_ALIGN_AFTER_BARRIER(LABEL) (TARGET_ALIGN_LABELS ? 3 : 0) 254 #define LABEL_ALIGN_AFTER_BARRIER(LABEL) (TARGET_ALIGN_LABELS ? 3 : 0)
369 255
370 /* Small Data Area Support. */ 256 /* Small Data Area Support. */
371 /* Maximum size of variables that go in .sdata/.sbss. 257 /* Maximum size of variables that go in .sdata/.sbss.
372 The -msdata=foo switch also controls how small variables are handled. */ 258 The -msdata=foo switch also controls how small variables are handled. */
497 /* Define this macro to be the value 1 if instructions will fail to work if 383 /* Define this macro to be the value 1 if instructions will fail to work if
498 given data not on the nominal alignment. If instructions will merely go 384 given data not on the nominal alignment. If instructions will merely go
499 slower in that case, define this macro as 0. */ 385 slower in that case, define this macro as 0. */
500 #define STRICT_ALIGNMENT 1 386 #define STRICT_ALIGNMENT 1
501 387
502 /* Define this if you wish to imitate the way many other C compilers handle
503 alignment of bitfields and the structures that contain them.
504
505 The behavior is that the type written for a bit-field (`int', `short', or
506 other integer type) imposes an alignment for the entire structure, as if the
507 structure really did contain an ordinary field of that type. In addition,
508 the bit-field is placed within the structure so that it would fit within such
509 a field, not crossing a boundary for it.
510
511 Thus, on most machines, a bit-field whose type is written as `int' would not
512 cross a four-byte boundary, and would force four-byte alignment for the
513 whole structure. (The alignment used may not be four bytes; it is
514 controlled by the other alignment parameters.)
515
516 If the macro is defined, its definition should be a C expression; a nonzero
517 value for the expression enables this behavior.
518
519 Note that if this macro is not defined, or its value is zero, some bitfields
520 may cross more than one alignment boundary. The compiler can support such
521 references if there are `insv', `extv', and `extzv' insns that can directly
522 reference memory.
523
524 The other known way of making bitfields work is to define
525 `STRUCTURE_SIZE_BOUNDARY' as large as `BIGGEST_ALIGNMENT'. Then every
526 structure can be accessed with fullwords.
527
528 Unless the machine has bit-field instructions or you define
529 `STRUCTURE_SIZE_BOUNDARY' that way, you must define
530 `PCC_BITFIELD_TYPE_MATTERS' to have a nonzero value.
531
532 If your aim is to make GCC use the same conventions for laying out
533 bitfields as are used by another compiler, here is how to investigate what
534 the other compiler does. Compile and run this program:
535
536 struct foo1
537 {
538 char x;
539 char :0;
540 char y;
541 };
542
543 struct foo2
544 {
545 char x;
546 int :0;
547 char y;
548 };
549
550 main ()
551 {
552 printf ("Size of foo1 is %d\n",
553 sizeof (struct foo1));
554 printf ("Size of foo2 is %d\n",
555 sizeof (struct foo2));
556 exit (0);
557 }
558
559 If this prints 2 and 5, then the compiler's behavior is what you would get
560 from `PCC_BITFIELD_TYPE_MATTERS'.
561
562 Defined in svr4.h. */
563 #define PCC_BITFIELD_TYPE_MATTERS 1 388 #define PCC_BITFIELD_TYPE_MATTERS 1
564 389
565 390
566 /* Layout of Source Language Data Types. */ 391 /* Layout of Source Language Data Types. */
567 392
576 401
577 /* An expression whose value is 1 or 0, according to whether the type `char' 402 /* An expression whose value is 1 or 0, according to whether the type `char'
578 should be signed or unsigned by default. The user can always override this 403 should be signed or unsigned by default. The user can always override this
579 default with the options `-fsigned-char' and `-funsigned-char'. */ 404 default with the options `-fsigned-char' and `-funsigned-char'. */
580 #define DEFAULT_SIGNED_CHAR 1 405 #define DEFAULT_SIGNED_CHAR 1
406
407 #undef SIZE_TYPE
408 #define SIZE_TYPE "unsigned int"
409
410 #undef PTRDIFF_TYPE
411 #define PTRDIFF_TYPE "int"
412
413 #undef WCHAR_TYPE
414 #define WCHAR_TYPE "long int"
415
416 #undef WCHAR_TYPE_SIZE
417 #define WCHAR_TYPE_SIZE BITS_PER_WORD
581 418
582 419
583 /* General purpose registers. */ 420 /* General purpose registers. */
584 #define GPR_FIRST 0 /* First gpr */ 421 #define GPR_FIRST 0 /* First gpr */
585 #define GPR_LAST (GPR_FIRST + 63) /* Last gpr */ 422 #define GPR_LAST (GPR_FIRST + 63) /* Last gpr */
667 #define LR_REGNO (SPR_FIRST) 504 #define LR_REGNO (SPR_FIRST)
668 #define LCR_REGNO (SPR_FIRST + 1) 505 #define LCR_REGNO (SPR_FIRST + 1)
669 #define IACC_FIRST (SPR_FIRST + 2) 506 #define IACC_FIRST (SPR_FIRST + 2)
670 #define IACC_LAST (SPR_FIRST + 3) 507 #define IACC_LAST (SPR_FIRST + 3)
671 508
672 #define GPR_P(R) IN_RANGE_P (R, GPR_FIRST, GPR_LAST) 509 #define GPR_P(R) IN_RANGE (R, GPR_FIRST, GPR_LAST)
673 #define GPR_OR_AP_P(R) (GPR_P (R) || (R) == ARG_POINTER_REGNUM) 510 #define GPR_OR_AP_P(R) (GPR_P (R) || (R) == ARG_POINTER_REGNUM)
674 #define FPR_P(R) IN_RANGE_P (R, FPR_FIRST, FPR_LAST) 511 #define FPR_P(R) IN_RANGE (R, FPR_FIRST, FPR_LAST)
675 #define CC_P(R) IN_RANGE_P (R, CC_FIRST, CC_LAST) 512 #define CC_P(R) IN_RANGE (R, CC_FIRST, CC_LAST)
676 #define ICC_P(R) IN_RANGE_P (R, ICC_FIRST, ICC_LAST) 513 #define ICC_P(R) IN_RANGE (R, ICC_FIRST, ICC_LAST)
677 #define FCC_P(R) IN_RANGE_P (R, FCC_FIRST, FCC_LAST) 514 #define FCC_P(R) IN_RANGE (R, FCC_FIRST, FCC_LAST)
678 #define CR_P(R) IN_RANGE_P (R, CR_FIRST, CR_LAST) 515 #define CR_P(R) IN_RANGE (R, CR_FIRST, CR_LAST)
679 #define ICR_P(R) IN_RANGE_P (R, ICR_FIRST, ICR_LAST) 516 #define ICR_P(R) IN_RANGE (R, ICR_FIRST, ICR_LAST)
680 #define FCR_P(R) IN_RANGE_P (R, FCR_FIRST, FCR_LAST) 517 #define FCR_P(R) IN_RANGE (R, FCR_FIRST, FCR_LAST)
681 #define ACC_P(R) IN_RANGE_P (R, ACC_FIRST, ACC_LAST) 518 #define ACC_P(R) IN_RANGE (R, ACC_FIRST, ACC_LAST)
682 #define ACCG_P(R) IN_RANGE_P (R, ACCG_FIRST, ACCG_LAST) 519 #define ACCG_P(R) IN_RANGE (R, ACCG_FIRST, ACCG_LAST)
683 #define SPR_P(R) IN_RANGE_P (R, SPR_FIRST, SPR_LAST) 520 #define SPR_P(R) IN_RANGE (R, SPR_FIRST, SPR_LAST)
684 521
685 #define GPR_OR_PSEUDO_P(R) (GPR_P (R) || (R) >= FIRST_PSEUDO_REGISTER) 522 #define GPR_OR_PSEUDO_P(R) (GPR_P (R) || (R) >= FIRST_PSEUDO_REGISTER)
686 #define FPR_OR_PSEUDO_P(R) (FPR_P (R) || (R) >= FIRST_PSEUDO_REGISTER) 523 #define FPR_OR_PSEUDO_P(R) (FPR_P (R) || (R) >= FIRST_PSEUDO_REGISTER)
687 #define GPR_AP_OR_PSEUDO_P(R) (GPR_OR_AP_P (R) || (R) >= FIRST_PSEUDO_REGISTER) 524 #define GPR_AP_OR_PSEUDO_P(R) (GPR_OR_AP_P (R) || (R) >= FIRST_PSEUDO_REGISTER)
688 #define CC_OR_PSEUDO_P(R) (CC_P (R) || (R) >= FIRST_PSEUDO_REGISTER) 525 #define CC_OR_PSEUDO_P(R) (CC_P (R) || (R) >= FIRST_PSEUDO_REGISTER)
845 1, /* 168, AP - fake arg ptr */ \ 682 1, /* 168, AP - fake arg ptr */ \
846 1, /* 169, LR - Link register*/ \ 683 1, /* 169, LR - Link register*/ \
847 1, /* 170, LCR - Loop count reg */ \ 684 1, /* 170, LCR - Loop count reg */ \
848 1, 1 /* 171-172, iacc0 */ \ 685 1, 1 /* 171-172, iacc0 */ \
849 } 686 }
850
851 /* Zero or more C statements that may conditionally modify two variables
852 `fixed_regs' and `call_used_regs' (both of type `char []') after they have
853 been initialized from the two preceding macros.
854
855 This is necessary in case the fixed or call-clobbered registers depend on
856 target flags.
857
858 You need not define this macro if it has no work to do.
859
860 If the usage of an entire class of registers depends on the target flags,
861 you may indicate this to GCC by using this macro to modify `fixed_regs' and
862 `call_used_regs' to 1 for each of the registers in the classes which should
863 not be used by GCC. Also define the macro `REG_CLASS_FROM_LETTER' to return
864 `NO_REGS' if it is called with a letter for a class that shouldn't be used.
865
866 (However, if this class is not included in `GENERAL_REGS' and all of the
867 insn patterns whose constraints permit this class are controlled by target
868 switches, then GCC will automatically avoid using these registers when the
869 target switches are opposed to them.) */
870
871 #define CONDITIONAL_REGISTER_USAGE frv_conditional_register_usage ()
872 687
873 688
874 /* Order of allocation of registers. */ 689 /* Order of allocation of registers. */
875 690
876 /* If defined, an initializer for a vector of integers, containing the numbers 691 /* If defined, an initializer for a vector of integers, containing the numbers
1186 register must belong. An index register is one used in an address where its 1001 register must belong. An index register is one used in an address where its
1187 value is either multiplied by a scale factor or added to another register 1002 value is either multiplied by a scale factor or added to another register
1188 (as well as added to a displacement). */ 1003 (as well as added to a displacement). */
1189 #define INDEX_REG_CLASS GPR_REGS 1004 #define INDEX_REG_CLASS GPR_REGS
1190 1005
1191 /* A C expression which defines the machine-dependent operand constraint
1192 letters for register classes. If CHAR is such a letter, the value should be
1193 the register class corresponding to it. Otherwise, the value should be
1194 `NO_REGS'. The register letter `r', corresponding to class `GENERAL_REGS',
1195 will not be passed to this macro; you do not need to handle it.
1196
1197 The following letters are unavailable, due to being used as
1198 constraints:
1199 '0'..'9'
1200 '<', '>'
1201 'E', 'F', 'G', 'H'
1202 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P'
1203 'Q', 'R', 'S', 'T', 'U'
1204 'V', 'X'
1205 'g', 'i', 'm', 'n', 'o', 'p', 'r', 's' */
1206
1207 extern enum reg_class reg_class_from_letter[];
1208 #define REG_CLASS_FROM_LETTER(CHAR) reg_class_from_letter [(unsigned char)(CHAR)]
1209
1210 /* A C expression which is nonzero if register number NUM is suitable for use 1006 /* A C expression which is nonzero if register number NUM is suitable for use
1211 as a base register in operand addresses. It may be either a suitable hard 1007 as a base register in operand addresses. It may be either a suitable hard
1212 register or a pseudo register that has been allocated such a hard register. */ 1008 register or a pseudo register that has been allocated such a hard register. */
1213 #define REGNO_OK_FOR_BASE_P(NUM) \ 1009 #define REGNO_OK_FOR_BASE_P(NUM) \
1214 ((NUM) < FIRST_PSEUDO_REGISTER \ 1010 ((NUM) < FIRST_PSEUDO_REGISTER \
1229 #define REGNO_OK_FOR_INDEX_P(NUM) \ 1025 #define REGNO_OK_FOR_INDEX_P(NUM) \
1230 ((NUM) < FIRST_PSEUDO_REGISTER \ 1026 ((NUM) < FIRST_PSEUDO_REGISTER \
1231 ? GPR_P (NUM) \ 1027 ? GPR_P (NUM) \
1232 : (reg_renumber [NUM] >= 0 && GPR_P (reg_renumber [NUM]))) 1028 : (reg_renumber [NUM] >= 0 && GPR_P (reg_renumber [NUM])))
1233 1029
1234 /* A C expression that places additional restrictions on the register class to
1235 use when it is necessary to copy value X into a register in class CLASS.
1236 The value is a register class; perhaps CLASS, or perhaps another, smaller
1237 class. On many machines, the following definition is safe:
1238
1239 #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS
1240
1241 Sometimes returning a more restrictive class makes better code. For
1242 example, on the 68000, when X is an integer constant that is in range for a
1243 `moveq' instruction, the value of this macro is always `DATA_REGS' as long
1244 as CLASS includes the data registers. Requiring a data register guarantees
1245 that a `moveq' will be used.
1246
1247 If X is a `const_double', by returning `NO_REGS' you can force X into a
1248 memory constant. This is useful on certain machines where immediate
1249 floating values cannot be loaded into certain kinds of registers.
1250
1251 This declaration must be present. */
1252 #define PREFERRED_RELOAD_CLASS(X, CLASS) CLASS
1253
1254 #define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) \ 1030 #define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) \
1255 frv_secondary_reload_class (CLASS, MODE, X) 1031 frv_secondary_reload_class (CLASS, MODE, X)
1256 1032
1257 #define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, X) \ 1033 #define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, X) \
1258 frv_secondary_reload_class (CLASS, MODE, X) 1034 frv_secondary_reload_class (CLASS, MODE, X)
1259
1260 /* A C expression whose value is nonzero if pseudos that have been assigned to
1261 registers of class CLASS would likely be spilled because registers of CLASS
1262 are needed for spill registers.
1263
1264 The default value of this macro returns 1 if CLASS has exactly one register
1265 and zero otherwise. On most machines, this default should be used. Only
1266 define this macro to some other expression if pseudo allocated by
1267 `local-alloc.c' end up in memory because their hard registers were needed
1268 for spill registers. If this macro returns nonzero for those classes, those
1269 pseudos will only be allocated by `global.c', which knows how to reallocate
1270 the pseudo to another register. If there would not be another register
1271 available for reallocation, you should not change the definition of this
1272 macro since the only effect of such a definition would be to slow down
1273 register allocation. */
1274 #define CLASS_LIKELY_SPILLED_P(CLASS) frv_class_likely_spilled_p (CLASS)
1275 1035
1276 /* A C expression for the maximum number of consecutive registers of 1036 /* A C expression for the maximum number of consecutive registers of
1277 class CLASS needed to hold a value of mode MODE. 1037 class CLASS needed to hold a value of mode MODE.
1278 1038
1279 This is closely related to the macro `HARD_REGNO_NREGS'. In fact, the value 1039 This is closely related to the macro `HARD_REGNO_NREGS'. In fact, the value
1285 1045
1286 This declaration is required. */ 1046 This declaration is required. */
1287 #define CLASS_MAX_NREGS(CLASS, MODE) frv_class_max_nregs (CLASS, MODE) 1047 #define CLASS_MAX_NREGS(CLASS, MODE) frv_class_max_nregs (CLASS, MODE)
1288 1048
1289 #define ZERO_P(x) (x == CONST0_RTX (GET_MODE (x))) 1049 #define ZERO_P(x) (x == CONST0_RTX (GET_MODE (x)))
1290
1291 /* 6-bit signed immediate. */
1292 #define CONST_OK_FOR_I(VALUE) IN_RANGE_P(VALUE, -32, 31)
1293 /* 10-bit signed immediate. */
1294 #define CONST_OK_FOR_J(VALUE) IN_RANGE_P(VALUE, -512, 511)
1295 /* Unused */
1296 #define CONST_OK_FOR_K(VALUE) 0
1297 /* 16-bit signed immediate. */
1298 #define CONST_OK_FOR_L(VALUE) IN_RANGE_P(VALUE, -32768, 32767)
1299 /* 16-bit unsigned immediate. */
1300 #define CONST_OK_FOR_M(VALUE) IN_RANGE_P (VALUE, 0, 65535)
1301 /* 12-bit signed immediate that is negative. */
1302 #define CONST_OK_FOR_N(VALUE) IN_RANGE_P(VALUE, -2048, -1)
1303 /* Zero */
1304 #define CONST_OK_FOR_O(VALUE) ((VALUE) == 0)
1305 /* 12-bit signed immediate that is negative. */
1306 #define CONST_OK_FOR_P(VALUE) IN_RANGE_P(VALUE, 1, 2047)
1307
1308 /* A C expression that defines the machine-dependent operand constraint letters
1309 (`I', `J', `K', .. 'P') that specify particular ranges of integer values.
1310 If C is one of those letters, the expression should check that VALUE, an
1311 integer, is in the appropriate range and return 1 if so, 0 otherwise. If C
1312 is not one of those letters, the value should be 0 regardless of VALUE. */
1313 #define CONST_OK_FOR_LETTER_P(VALUE, C) \
1314 ( (C) == 'I' ? CONST_OK_FOR_I (VALUE) \
1315 : (C) == 'J' ? CONST_OK_FOR_J (VALUE) \
1316 : (C) == 'K' ? CONST_OK_FOR_K (VALUE) \
1317 : (C) == 'L' ? CONST_OK_FOR_L (VALUE) \
1318 : (C) == 'M' ? CONST_OK_FOR_M (VALUE) \
1319 : (C) == 'N' ? CONST_OK_FOR_N (VALUE) \
1320 : (C) == 'O' ? CONST_OK_FOR_O (VALUE) \
1321 : (C) == 'P' ? CONST_OK_FOR_P (VALUE) \
1322 : 0)
1323
1324
1325 /* A C expression that defines the machine-dependent operand constraint letters
1326 (`G', `H') that specify particular ranges of `const_double' values.
1327
1328 If C is one of those letters, the expression should check that VALUE, an RTX
1329 of code `const_double', is in the appropriate range and return 1 if so, 0
1330 otherwise. If C is not one of those letters, the value should be 0
1331 regardless of VALUE.
1332
1333 `const_double' is used for all floating-point constants and for `DImode'
1334 fixed-point constants. A given letter can accept either or both kinds of
1335 values. It can use `GET_MODE' to distinguish between these kinds. */
1336
1337 #define CONST_DOUBLE_OK_FOR_G(VALUE) \
1338 ((GET_MODE (VALUE) == VOIDmode \
1339 && CONST_DOUBLE_LOW (VALUE) == 0 \
1340 && CONST_DOUBLE_HIGH (VALUE) == 0) \
1341 || ((GET_MODE (VALUE) == SFmode \
1342 || GET_MODE (VALUE) == DFmode) \
1343 && (VALUE) == CONST0_RTX (GET_MODE (VALUE))))
1344
1345 #define CONST_DOUBLE_OK_FOR_H(VALUE) 0
1346
1347 #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \
1348 ( (C) == 'G' ? CONST_DOUBLE_OK_FOR_G (VALUE) \
1349 : (C) == 'H' ? CONST_DOUBLE_OK_FOR_H (VALUE) \
1350 : 0)
1351
1352 /* A C expression that defines the optional machine-dependent constraint
1353 letters (`Q', `R', `S', `T', `U') that can be used to segregate specific
1354 types of operands, usually memory references, for the target machine.
1355 Normally this macro will not be defined. If it is required for a particular
1356 target machine, it should return 1 if VALUE corresponds to the operand type
1357 represented by the constraint letter C. If C is not defined as an extra
1358 constraint, the value returned should be 0 regardless of VALUE.
1359
1360 For example, on the ROMP, load instructions cannot have their output in r0
1361 if the memory reference contains a symbolic address. Constraint letter `Q'
1362 is defined as representing a memory address that does *not* contain a
1363 symbolic address. An alternative is specified with a `Q' constraint on the
1364 input and `r' on the output. The next alternative specifies `m' on the
1365 input and a register class that does not include r0 on the output. */
1366
1367 /* 12-bit relocations. */
1368 #define EXTRA_CONSTRAINT_FOR_Q(VALUE) \
1369 (got12_operand (VALUE, GET_MODE (VALUE)))
1370
1371 /* Double word memory ops that take one instruction. */
1372 #define EXTRA_CONSTRAINT_FOR_R(VALUE) \
1373 (dbl_memory_one_insn_operand (VALUE, GET_MODE (VALUE)))
1374
1375 /* SYMBOL_REF */
1376 #define EXTRA_CONSTRAINT_FOR_S(VALUE) \
1377 (CONSTANT_P (VALUE) && call_operand (VALUE, VOIDmode))
1378
1379 /* Double word memory ops that take two instructions. */
1380 #define EXTRA_CONSTRAINT_FOR_T(VALUE) \
1381 (dbl_memory_two_insn_operand (VALUE, GET_MODE (VALUE)))
1382
1383 /* Memory operand for conditional execution. */
1384 #define EXTRA_CONSTRAINT_FOR_U(VALUE) \
1385 (condexec_memory_operand (VALUE, GET_MODE (VALUE)))
1386
1387 #define EXTRA_CONSTRAINT(VALUE, C) \
1388 ( (C) == 'Q' ? EXTRA_CONSTRAINT_FOR_Q (VALUE) \
1389 : (C) == 'R' ? EXTRA_CONSTRAINT_FOR_R (VALUE) \
1390 : (C) == 'S' ? EXTRA_CONSTRAINT_FOR_S (VALUE) \
1391 : (C) == 'T' ? EXTRA_CONSTRAINT_FOR_T (VALUE) \
1392 : (C) == 'U' ? EXTRA_CONSTRAINT_FOR_U (VALUE) \
1393 : 0)
1394
1395 #define EXTRA_MEMORY_CONSTRAINT(C,STR) \
1396 ((C) == 'U' || (C) == 'R' || (C) == 'T')
1397
1398 #define CONSTRAINT_LEN(C, STR) \
1399 ((C) == 'D' ? 3 : DEFAULT_CONSTRAINT_LEN ((C), (STR)))
1400
1401 #define REG_CLASS_FROM_CONSTRAINT(C, STR) \
1402 (((C) == 'D' && (STR)[1] == '8' && (STR)[2] == '9') ? GR89_REGS : \
1403 ((C) == 'D' && (STR)[1] == '0' && (STR)[2] == '9') ? GR9_REGS : \
1404 ((C) == 'D' && (STR)[1] == '0' && (STR)[2] == '8') ? GR8_REGS : \
1405 ((C) == 'D' && (STR)[1] == '1' && (STR)[2] == '4') ? FDPIC_FPTR_REGS : \
1406 ((C) == 'D' && (STR)[1] == '1' && (STR)[2] == '5') ? FDPIC_REGS : \
1407 REG_CLASS_FROM_LETTER ((C)))
1408 1050
1409 1051
1410 /* Basic Stack Layout. */ 1052 /* Basic Stack Layout. */
1411 1053
1412 /* Structure to describe information about a saved range of registers */ 1054 /* Structure to describe information about a saved range of registers */
1612 1254
1613 Defining both `PUSH_ROUNDING' and `ACCUMULATE_OUTGOING_ARGS' is not 1255 Defining both `PUSH_ROUNDING' and `ACCUMULATE_OUTGOING_ARGS' is not
1614 proper. */ 1256 proper. */
1615 #define ACCUMULATE_OUTGOING_ARGS 1 1257 #define ACCUMULATE_OUTGOING_ARGS 1
1616 1258
1617 /* A C expression that should indicate the number of bytes of its own arguments
1618 that a function pops on returning, or 0 if the function pops no arguments
1619 and the caller must therefore pop them all after the function returns.
1620
1621 FUNDECL is a C variable whose value is a tree node that describes the
1622 function in question. Normally it is a node of type `FUNCTION_DECL' that
1623 describes the declaration of the function. From this it is possible to
1624 obtain the DECL_ATTRIBUTES of the function.
1625
1626 FUNTYPE is a C variable whose value is a tree node that describes the
1627 function in question. Normally it is a node of type `FUNCTION_TYPE' that
1628 describes the data type of the function. From this it is possible to obtain
1629 the data types of the value and arguments (if known).
1630
1631 When a call to a library function is being considered, FUNTYPE will contain
1632 an identifier node for the library function. Thus, if you need to
1633 distinguish among various library functions, you can do so by their names.
1634 Note that "library function" in this context means a function used to
1635 perform arithmetic, whose name is known specially in the compiler and was
1636 not mentioned in the C code being compiled.
1637
1638 STACK-SIZE is the number of bytes of arguments passed on the stack. If a
1639 variable number of bytes is passed, it is zero, and argument popping will
1640 always be the responsibility of the calling function.
1641
1642 On the VAX, all functions always pop their arguments, so the definition of
1643 this macro is STACK-SIZE. On the 68000, using the standard calling
1644 convention, no functions pop their arguments, so the value of the macro is
1645 always 0 in this case. But an alternative calling convention is available
1646 in which functions that take a fixed number of arguments pop them but other
1647 functions (such as `printf') pop nothing (the caller pops all). When this
1648 convention is in use, FUNTYPE is examined to determine whether a function
1649 takes a fixed number of arguments. */
1650 #define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACK_SIZE) 0
1651
1652 1259
1653 /* The number of register assigned to holding function arguments. */ 1260 /* The number of register assigned to holding function arguments. */
1654 1261
1655 #define FRV_NUM_ARG_REGS 6 1262 #define FRV_NUM_ARG_REGS 6
1656
1657 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
1658 frv_function_arg (&CUM, MODE, TYPE, NAMED, FALSE)
1659
1660 /* Define this macro if the target machine has "register windows", so that the
1661 register in which a function sees an arguments is not necessarily the same
1662 as the one in which the caller passed the argument.
1663
1664 For such machines, `FUNCTION_ARG' computes the register in which the caller
1665 passes the value, and `FUNCTION_INCOMING_ARG' should be defined in a similar
1666 fashion to tell the function being called where the arguments will arrive.
1667
1668 If `FUNCTION_INCOMING_ARG' is not defined, `FUNCTION_ARG' serves both
1669 purposes. */
1670
1671 #define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) \
1672 frv_function_arg (&CUM, MODE, TYPE, NAMED, TRUE)
1673 1263
1674 /* A C type for declaring a variable that is used as the first argument of 1264 /* A C type for declaring a variable that is used as the first argument of
1675 `FUNCTION_ARG' and other related values. For some target machines, the type 1265 `FUNCTION_ARG' and other related values. For some target machines, the type
1676 `int' suffices and can hold the number of bytes of argument so far. 1266 `int' suffices and can hold the number of bytes of argument so far.
1677 1267
1710 special calling conventions are never compiled with GCC. The argument 1300 special calling conventions are never compiled with GCC. The argument
1711 LIBNAME exists for symmetry with `INIT_CUMULATIVE_ARGS'. */ 1301 LIBNAME exists for symmetry with `INIT_CUMULATIVE_ARGS'. */
1712 1302
1713 #define INIT_CUMULATIVE_INCOMING_ARGS(CUM, FNTYPE, LIBNAME) \ 1303 #define INIT_CUMULATIVE_INCOMING_ARGS(CUM, FNTYPE, LIBNAME) \
1714 frv_init_cumulative_args (&CUM, FNTYPE, LIBNAME, NULL, TRUE) 1304 frv_init_cumulative_args (&CUM, FNTYPE, LIBNAME, NULL, TRUE)
1715
1716 /* A C statement (sans semicolon) to update the summarizer variable CUM to
1717 advance past an argument in the argument list. The values MODE, TYPE and
1718 NAMED describe that argument. Once this is done, the variable CUM is
1719 suitable for analyzing the *following* argument with `FUNCTION_ARG', etc.
1720
1721 This macro need not do anything if the argument in question was passed on
1722 the stack. The compiler knows how to track the amount of stack space used
1723 for arguments without any special help. */
1724 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
1725 frv_function_arg_advance (&CUM, MODE, TYPE, NAMED)
1726
1727 /* If defined, a C expression that gives the alignment boundary, in bits, of an
1728 argument with the specified mode and type. If it is not defined,
1729 `PARM_BOUNDARY' is used for all arguments. */
1730
1731 #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \
1732 frv_function_arg_boundary (MODE, TYPE)
1733 1305
1734 /* A C expression that is nonzero if REGNO is the number of a hard register in 1306 /* A C expression that is nonzero if REGNO is the number of a hard register in
1735 which function arguments are sometimes passed. This does *not* include 1307 which function arguments are sometimes passed. This does *not* include
1736 implicit arguments such as the static chain and the structure-value address. 1308 implicit arguments such as the static chain and the structure-value address.
1737 On many machines, no registers can be used for this purpose since all 1309 On many machines, no registers can be used for this purpose since all
1884 Twrite (2, "__trampoline_setup bad size\n", \ 1456 Twrite (2, "__trampoline_setup bad size\n", \
1885 sizeof ("__trampoline_setup bad size\n") - 1); \ 1457 sizeof ("__trampoline_setup bad size\n") - 1); \
1886 exit (-1); \ 1458 exit (-1); \
1887 } \ 1459 } \
1888 \ 1460 \
1889 /* Create a function descriptor with the address of the code below 1461 /* Create a function descriptor with the address of the code below \
1890 and NULL as the FDPIC value. We don't need the real GOT value 1462 and NULL as the FDPIC value. We don't need the real GOT value \
1891 here, since we don't use it, so we use NULL, that is just as 1463 here, since we don't use it, so we use NULL, that is just as \
1892 good. */ \ 1464 good. */ \
1893 desc[0] = to; \ 1465 desc[0] = to; \
1894 desc[1] = NULL; \ 1466 desc[1] = NULL; \
1895 size -= 8; \ 1467 size -= 8; \
1896 \ 1468 \
1994 #define REVERSE_CONDEXEC_PREDICATES_P(x,y) 0 1566 #define REVERSE_CONDEXEC_PREDICATES_P(x,y) 0
1995 1567
1996 1568
1997 /* Describing Relative Costs of Operations. */ 1569 /* Describing Relative Costs of Operations. */
1998 1570
1999 /* A C expression for the cost of moving data from a register in class FROM to
2000 one in class TO. The classes are expressed using the enumeration values
2001 such as `GENERAL_REGS'. A value of 4 is the default; other values are
2002 interpreted relative to that.
2003
2004 It is not required that the cost always equal 2 when FROM is the same as TO;
2005 on some machines it is expensive to move between registers if they are not
2006 general registers.
2007
2008 If reload sees an insn consisting of a single `set' between two hard
2009 registers, and if `REGISTER_MOVE_COST' applied to their classes returns a
2010 value of 2, reload does not check to ensure that the constraints of the insn
2011 are met. Setting a cost of other than 2 will allow reload to verify that
2012 the constraints are met. You should do this if the `movM' pattern's
2013 constraints do not allow such copying. */
2014 #define REGISTER_MOVE_COST(MODE, FROM, TO) frv_register_move_cost (FROM, TO)
2015
2016 /* A C expression for the cost of moving data of mode M between a register and
2017 memory. A value of 2 is the default; this cost is relative to those in
2018 `REGISTER_MOVE_COST'.
2019
2020 If moving between registers and memory is more expensive than between two
2021 registers, you should define this macro to express the relative cost. */
2022 #define MEMORY_MOVE_COST(M,C,I) 4
2023
2024 /* A C expression for the cost of a branch instruction. A value of 1 is the 1571 /* A C expression for the cost of a branch instruction. A value of 1 is the
2025 default; other values are interpreted relative to that. */ 1572 default; other values are interpreted relative to that. */
2026 #define BRANCH_COST(speed_p, predictable_p) frv_branch_cost_int 1573 #define BRANCH_COST(speed_p, predictable_p) frv_branch_cost_int
2027 1574
2028 /* Define this macro as a C expression which is nonzero if accessing less than 1575 /* Define this macro as a C expression which is nonzero if accessing less than
2064 used. */ 1611 used. */
2065 #define BSS_SECTION_ASM_OP "\t.section .bss,\"aw\"" 1612 #define BSS_SECTION_ASM_OP "\t.section .bss,\"aw\""
2066 1613
2067 /* Short Data Support */ 1614 /* Short Data Support */
2068 #define SDATA_SECTION_ASM_OP "\t.section .sdata,\"aw\"" 1615 #define SDATA_SECTION_ASM_OP "\t.section .sdata,\"aw\""
2069
2070 /* On svr4, we *do* have support for the .init and .fini sections, and we
2071 can put stuff in there to be executed before and after `main'. We let
2072 crtstuff.c and other files know this by defining the following symbols.
2073 The definitions say how to change sections to the .init and .fini
2074 sections. This is the same for all known svr4 assemblers.
2075
2076 The standard System V.4 macros will work, but they look ugly in the
2077 assembly output, so redefine them. */
2078 1616
2079 #undef INIT_SECTION_ASM_OP 1617 #undef INIT_SECTION_ASM_OP
2080 #undef FINI_SECTION_ASM_OP 1618 #undef FINI_SECTION_ASM_OP
2081 #define INIT_SECTION_ASM_OP "\t.section .init,\"ax\"" 1619 #define INIT_SECTION_ASM_OP "\t.section .init,\"ax\""
2082 #define FINI_SECTION_ASM_OP "\t.section .fini,\"ax\"" 1620 #define FINI_SECTION_ASM_OP "\t.section .fini,\"ax\""
2152 1690
2153 This macro controls how the assembler definitions of uninitialized static 1691 This macro controls how the assembler definitions of uninitialized static
2154 variables are output. */ 1692 variables are output. */
2155 #undef ASM_OUTPUT_LOCAL 1693 #undef ASM_OUTPUT_LOCAL
2156 1694
2157 /* Like `ASM_OUTPUT_LOCAL' except takes the required alignment as a separate,
2158 explicit argument. If you define this macro, it is used in place of
2159 `ASM_OUTPUT_LOCAL', and gives you more flexibility in handling the required
2160 alignment of the variable. The alignment is specified as the number of
2161 bits.
2162
2163 Defined in svr4.h. */
2164 #undef ASM_OUTPUT_ALIGNED_LOCAL 1695 #undef ASM_OUTPUT_ALIGNED_LOCAL
2165 1696
2166 /* This is for final.c, because it is used by ASM_DECLARE_OBJECT_NAME. */ 1697 /* This is for final.c, because it is used by ASM_DECLARE_OBJECT_NAME. */
2167 extern int size_directive_output; 1698 extern int size_directive_output;
2168 1699
2173 `ASM_OUTPUT_ALIGNED_LOCAL', and gives you more flexibility in 1704 `ASM_OUTPUT_ALIGNED_LOCAL', and gives you more flexibility in
2174 handling the destination of the variable. */ 1705 handling the destination of the variable. */
2175 #undef ASM_OUTPUT_ALIGNED_DECL_LOCAL 1706 #undef ASM_OUTPUT_ALIGNED_DECL_LOCAL
2176 #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(STREAM, DECL, NAME, SIZE, ALIGN) \ 1707 #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(STREAM, DECL, NAME, SIZE, ALIGN) \
2177 do { \ 1708 do { \
2178 if ((SIZE) > 0 && (SIZE) <= g_switch_value) \ 1709 if ((SIZE) > 0 && (SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value) \
2179 switch_to_section (get_named_section (NULL, ".sbss", 0)); \ 1710 switch_to_section (get_named_section (NULL, ".sbss", 0)); \
2180 else \ 1711 else \
2181 switch_to_section (bss_section); \ 1712 switch_to_section (bss_section); \
2182 ASM_OUTPUT_ALIGN (STREAM, floor_log2 ((ALIGN) / BITS_PER_UNIT)); \ 1713 ASM_OUTPUT_ALIGN (STREAM, floor_log2 ((ALIGN) / BITS_PER_UNIT)); \
2183 ASM_DECLARE_OBJECT_NAME (STREAM, NAME, DECL); \ 1714 ASM_DECLARE_OBJECT_NAME (STREAM, NAME, DECL); \
2199 } while (0) 1730 } while (0)
2200 1731
2201 /* Globalizing directive for a label. */ 1732 /* Globalizing directive for a label. */
2202 #define GLOBAL_ASM_OP "\t.globl " 1733 #define GLOBAL_ASM_OP "\t.globl "
2203 1734
2204 /* A C statement to store into the string STRING a label whose name is made
2205 from the string PREFIX and the number NUM.
2206
2207 This string, when output subsequently by `assemble_name', should produce the
2208 output that `(*targetm.asm_out.internal_label)' would produce with the same PREFIX
2209 and NUM.
2210
2211 If the string begins with `*', then `assemble_name' will output the rest of
2212 the string unchanged. It is often convenient for
2213 `ASM_GENERATE_INTERNAL_LABEL' to use `*' in this way. If the string doesn't
2214 start with `*', then `ASM_OUTPUT_LABELREF' gets to output the string, and
2215 may change it. (Of course, `ASM_OUTPUT_LABELREF' is also part of your
2216 machine description, so you should know what it does on your machine.)
2217
2218 Defined in svr4.h. */
2219 #undef ASM_GENERATE_INTERNAL_LABEL 1735 #undef ASM_GENERATE_INTERNAL_LABEL
2220 #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ 1736 #define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \
2221 do { \ 1737 do { \
2222 sprintf (LABEL, "*.%s%ld", PREFIX, (long)NUM); \ 1738 sprintf (LABEL, "*.%s%ld", PREFIX, (long)NUM); \
2223 } while (0) 1739 } while (0)
2224 1740
2225 1741
2226 /* Macros Controlling Initialization Routines. */ 1742 /* Macros Controlling Initialization Routines. */
2227 1743
2228 /* If defined, a C string constant for the assembler operation to identify the
2229 following data as initialization code. If not defined, GCC will assume
2230 such a section does not exist. When you are using special sections for
2231 initialization and termination functions, this macro also controls how
2232 `crtstuff.c' and `libgcc2.c' arrange to run the initialization functions.
2233
2234 Defined in svr4.h. */
2235 #undef INIT_SECTION_ASM_OP 1744 #undef INIT_SECTION_ASM_OP
2236 1745
2237 /* If defined, `main' will call `__main' despite the presence of 1746 /* If defined, `main' will call `__main' despite the presence of
2238 `INIT_SECTION_ASM_OP'. This macro should be defined for systems where the 1747 `INIT_SECTION_ASM_OP'. This macro should be defined for systems where the
2239 init section is not actually run automatically, but is still useful for 1748 init section is not actually run automatically, but is still useful for
2323 If this macro is not defined, it is equivalent to a null statement. */ 1832 If this macro is not defined, it is equivalent to a null statement. */
2324 1833
2325 #define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS)\ 1834 #define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS)\
2326 frv_final_prescan_insn (INSN, OPVEC, NOPERANDS) 1835 frv_final_prescan_insn (INSN, OPVEC, NOPERANDS)
2327 1836
2328
2329 /* A C compound statement to output to stdio stream STREAM the assembler syntax
2330 for an instruction operand X. X is an RTL expression.
2331
2332 CODE is a value that can be used to specify one of several ways of printing
2333 the operand. It is used when identical operands must be printed differently
2334 depending on the context. CODE comes from the `%' specification that was
2335 used to request printing of the operand. If the specification was just
2336 `%DIGIT' then CODE is 0; if the specification was `%LTR DIGIT' then CODE is
2337 the ASCII code for LTR.
2338
2339 If X is a register, this macro should print the register's name. The names
2340 can be found in an array `reg_names' whose type is `char *[]'. `reg_names'
2341 is initialized from `REGISTER_NAMES'.
2342
2343 When the machine description has a specification `%PUNCT' (a `%' followed by
2344 a punctuation character), this macro is called with a null pointer for X and
2345 the punctuation character for CODE. */
2346 #define PRINT_OPERAND(STREAM, X, CODE) frv_print_operand (STREAM, X, CODE)
2347
2348 /* A C expression which evaluates to true if CODE is a valid punctuation
2349 character for use in the `PRINT_OPERAND' macro. If
2350 `PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no punctuation
2351 characters (except for the standard one, `%') are used in this way. */
2352 /* . == gr0
2353 # == hint operand -- always zero for now
2354 @ == small data base register (gr16)
2355 ~ == pic register (gr17)
2356 * == temporary integer CCR register (cr3)
2357 & == temporary integer ICC register (icc3) */
2358 #define PRINT_OPERAND_PUNCT_VALID_P(CODE) \
2359 ((CODE) == '.' || (CODE) == '#' || (CODE) == '@' || (CODE) == '~' \
2360 || (CODE) == '*' || (CODE) == '&')
2361
2362 /* A C compound statement to output to stdio stream STREAM the assembler syntax
2363 for an instruction operand that is a memory reference whose address is X. X
2364 is an RTL expression.
2365
2366 On some machines, the syntax for a symbolic address depends on the section
2367 that the address refers to. On these machines, define the macro
2368 `ENCODE_SECTION_INFO' to store the information into the `symbol_ref', and
2369 then check for it here.
2370
2371 This declaration must be present. */
2372 #define PRINT_OPERAND_ADDRESS(STREAM, X) frv_print_operand_address (STREAM, X)
2373
2374 /* If defined, C string expressions to be used for the `%R', `%L', `%U', and
2375 `%I' options of `asm_fprintf' (see `final.c'). These are useful when a
2376 single `md' file must support multiple assembler formats. In that case, the
2377 various `tm.h' files can define these macros differently.
2378
2379 USER_LABEL_PREFIX is defined in svr4.h. */
2380 #undef USER_LABEL_PREFIX 1837 #undef USER_LABEL_PREFIX
2381 #define USER_LABEL_PREFIX "" 1838 #define USER_LABEL_PREFIX ""
2382 #define REGISTER_PREFIX "" 1839 #define REGISTER_PREFIX ""
2383 #define LOCAL_LABEL_PREFIX "." 1840 #define LOCAL_LABEL_PREFIX "."
2384 #define IMMEDIATE_PREFIX "#" 1841 #define IMMEDIATE_PREFIX "#"
2431 1888
2432 #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (LR_REGNO) 1889 #define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (LR_REGNO)
2433 1890
2434 /* Assembler Commands for Alignment. */ 1891 /* Assembler Commands for Alignment. */
2435 1892
2436 /* A C statement to output to the stdio stream STREAM an assembler instruction
2437 to advance the location counter by NBYTES bytes. Those bytes should be zero
2438 when loaded. NBYTES will be a C expression of type `int'.
2439
2440 Defined in svr4.h. */
2441 #undef ASM_OUTPUT_SKIP 1893 #undef ASM_OUTPUT_SKIP
2442 #define ASM_OUTPUT_SKIP(STREAM, NBYTES) \ 1894 #define ASM_OUTPUT_SKIP(STREAM, NBYTES) \
2443 fprintf (STREAM, "\t.zero\t%u\n", (int)(NBYTES)) 1895 fprintf (STREAM, "\t.zero\t%u\n", (int)(NBYTES))
2444 1896
2445 /* A C statement to output to the stdio stream STREAM an assembler command to 1897 /* A C statement to output to the stdio stream STREAM an assembler command to
2471 actual register numbering scheme. 1923 actual register numbering scheme.
2472 1924
2473 This declaration is required. */ 1925 This declaration is required. */
2474 #define DBX_REGISTER_NUMBER(REGNO) (REGNO) 1926 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
2475 1927
2476 /* A C expression that returns the type of debugging output GCC produces
2477 when the user specifies `-g' or `-ggdb'. Define this if you have arranged
2478 for GCC to support more than one format of debugging output. Currently,
2479 the allowable values are `DBX_DEBUG', `SDB_DEBUG', `DWARF_DEBUG',
2480 `DWARF2_DEBUG', and `XCOFF_DEBUG'.
2481
2482 The value of this macro only affects the default debugging output; the user
2483 can always get a specific type of output by using `-gstabs', `-gcoff',
2484 `-gdwarf-1', `-gdwarf-2', or `-gxcoff'.
2485
2486 Defined in svr4.h. */
2487 #undef PREFERRED_DEBUGGING_TYPE 1928 #undef PREFERRED_DEBUGGING_TYPE
2488 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG 1929 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
2489 1930
2490 /* Miscellaneous Parameters. */ 1931 /* Miscellaneous Parameters. */
2491 1932
2544 1985
2545 /* An alias for the machine mode used for memory references to functions being 1986 /* An alias for the machine mode used for memory references to functions being
2546 called, in `call' RTL expressions. On most machines this should be 1987 called, in `call' RTL expressions. On most machines this should be
2547 `QImode'. */ 1988 `QImode'. */
2548 #define FUNCTION_MODE QImode 1989 #define FUNCTION_MODE QImode
2549
2550 /* Define this macro to handle System V style pragmas: #pragma pack and
2551 #pragma weak. Note, #pragma weak will only be supported if SUPPORT_WEAK is
2552 defined.
2553
2554 Defined in svr4.h. */
2555 #define HANDLE_SYSV_PRAGMA 1
2556 1990
2557 /* A C expression for the maximum number of instructions to execute via 1991 /* A C expression for the maximum number of instructions to execute via
2558 conditional execution instructions instead of a branch. A value of 1992 conditional execution instructions instead of a branch. A value of
2559 BRANCH_COST+1 is the default if the machine does not use 1993 BRANCH_COST+1 is the default if the machine does not use
2560 cc0, and 1 if it does use cc0. */ 1994 cc0, and 1 if it does use cc0. */
2608 optimizations. Although some jump optimizations are actually 2042 optimizations. Although some jump optimizations are actually
2609 deoptimizations for VLIW (super-scalar) processors. */ 2043 deoptimizations for VLIW (super-scalar) processors. */
2610 2044
2611 #define MINIMAL_SECOND_JUMP_OPTIMIZATION 2045 #define MINIMAL_SECOND_JUMP_OPTIMIZATION
2612 2046
2613
2614 /* If the following macro is defined and nonzero and deterministic
2615 finite state automata are used for pipeline hazard recognition, the
2616 code making resource-constrained software pipelining is on. */
2617 #define RCSP_SOFTWARE_PIPELINING 1
2618 2047
2619 /* If the following macro is defined and nonzero and deterministic 2048 /* If the following macro is defined and nonzero and deterministic
2620 finite state automata are used for pipeline hazard recognition, we 2049 finite state automata are used for pipeline hazard recognition, we
2621 will try to exchange insns in queue ready to improve the schedule. 2050 will try to exchange insns in queue ready to improve the schedule.
2622 The more macro value, the more tries will be made. */ 2051 The more macro value, the more tries will be made. */