| 1 |
/* Target macros for the FRV port of GCC. |
| 2 |
Copyright (C) 1999-2025 Free Software Foundation, Inc. |
| 3 |
Contributed by Red Hat Inc. |
| 4 |
|
| 5 |
This file is part of GCC. |
| 6 |
|
| 7 |
GCC is free software; you can redistribute it and/or modify it |
| 8 |
under the terms of the GNU General Public License as published |
| 9 |
by the Free Software Foundation; either version 3, or (at your |
| 10 |
option) any later version. |
| 11 |
|
| 12 |
GCC is distributed in the hope that it will be useful, but WITHOUT |
| 13 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 14 |
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
| 15 |
License for more details. |
| 16 |
|
| 17 |
You should have received a copy of the GNU General Public License |
| 18 |
along with GCC; see the file COPYING3. If not see |
| 19 |
<http://www.gnu.org/licenses/>. */ |
| 20 |
|
| 21 |
#ifndef __FRV_H__ |
| 22 |
#define __FRV_H__ |
| 23 |
|
| 24 |
/* Frv general purpose macros. */ |
| 25 |
/* Align an address. */ |
| 26 |
#define ADDR_ALIGN(addr,align) (((addr) + (align) - 1) & ~((align) - 1)) |
| 27 |
|
| 28 |
/* Driver configuration. */ |
| 29 |
|
| 30 |
/* -fpic and -fPIC used to imply the -mlibrary-pic multilib, but with |
| 31 |
FDPIC which multilib to use depends on whether FDPIC is in use or |
| 32 |
not. The trick we use is to introduce -multilib-library-pic as a |
| 33 |
pseudo-flag that selects the library-pic multilib, and map fpic |
| 34 |
and fPIC to it only if fdpic is not selected. Also, if fdpic is |
| 35 |
selected and no PIC/PIE options are present, we imply -fPIE. |
| 36 |
Otherwise, if -fpic or -fPIC are enabled and we're optimizing for |
| 37 |
speed, or if we have -On with n>=3, enable inlining of PLTs. As |
| 38 |
for -mgprel-ro, we want to enable it by default, but not for -fpic or |
| 39 |
-fpie. */ |
| 40 |
|
| 41 |
#define DRIVER_SELF_SPECS SUBTARGET_DRIVER_SELF_SPECS \ |
| 42 |
"%{mno-pack:\ |
| 43 |
%{!mhard-float:-msoft-float}\ |
| 44 |
%{!mmedia:-mno-media}}\ |
| 45 |
%{!mfdpic:%{" FPIC_SPEC ": -multilib-library-pic}}\ |
| 46 |
%{mfdpic:%{!fpic:%{!fpie:%{!fPIC:%{!fPIE:\ |
| 47 |
%{!fno-pic:%{!fno-pie:%{!fno-PIC:%{!fno-PIE:-fPIE}}}}}}}} \ |
| 48 |
%{!mno-inline-plt:%{O*:%{!O0:%{!Os:%{" FPIC_SPEC ":-minline-plt} \ |
| 49 |
%{" NO_FPIC_SPEC ":%{!O:%{!O1:%{!O2:-minline-plt}}}}}}}} \ |
| 50 |
%{!mno-gprel-ro:%{" NO_FPIE1_AND_FPIC1_SPEC ":-mgprel-ro}}} \ |
| 51 |
" |
| 52 |
#ifndef SUBTARGET_DRIVER_SELF_SPECS |
| 53 |
# define SUBTARGET_DRIVER_SELF_SPECS |
| 54 |
#endif |
| 55 |
|
| 56 |
#undef ASM_SPEC |
| 57 |
#define ASM_SPEC "\ |
| 58 |
%{G*} \ |
| 59 |
%{mtomcat-stats} \ |
| 60 |
%{!mno-eflags: \ |
| 61 |
%{mcpu=*} \ |
| 62 |
%{mgpr-*} %{mfpr-*} \ |
| 63 |
%{msoft-float} %{mhard-float} \ |
| 64 |
%{mdword} %{mno-dword} \ |
| 65 |
%{mdouble} %{mno-double} \ |
| 66 |
%{mmedia} %{mno-media} \ |
| 67 |
%{mmuladd} %{mno-muladd} \ |
| 68 |
%{mpack} %{mno-pack} \ |
| 69 |
%{mno-fdpic:-mnopic} %{mfdpic} \ |
| 70 |
%{" FPIE1_OR_FPIC1_SPEC ":-mpic} %{" FPIE2_OR_FPIC2_SPEC ":-mPIC} %{mlibrary-pic}}" |
| 71 |
|
| 72 |
#undef STARTFILE_SPEC |
| 73 |
#define STARTFILE_SPEC "crt0%O%s frvbegin%O%s" |
| 74 |
|
| 75 |
#undef ENDFILE_SPEC |
| 76 |
#define ENDFILE_SPEC "frvend%O%s" |
| 77 |
|
| 78 |
|
| 79 |
#define MASK_DEFAULT_FRV \ |
| 80 |
(MASK_MEDIA \ |
| 81 |
| MASK_DOUBLE \ |
| 82 |
| MASK_MULADD \ |
| 83 |
| MASK_DWORD \ |
| 84 |
| MASK_PACK) |
| 85 |
|
| 86 |
#define MASK_DEFAULT_FR500 \ |
| 87 |
(MASK_MEDIA | MASK_DWORD | MASK_PACK) |
| 88 |
|
| 89 |
#define MASK_DEFAULT_FR550 \ |
| 90 |
(MASK_MEDIA | MASK_DWORD | MASK_PACK) |
| 91 |
|
| 92 |
#define MASK_DEFAULT_FR450 \ |
| 93 |
(MASK_GPR_32 \ |
| 94 |
| MASK_FPR_32 \ |
| 95 |
| MASK_MEDIA \ |
| 96 |
| MASK_SOFT_FLOAT \ |
| 97 |
| MASK_DWORD \ |
| 98 |
| MASK_PACK) |
| 99 |
|
| 100 |
#define MASK_DEFAULT_FR400 \ |
| 101 |
(MASK_GPR_32 \ |
| 102 |
| MASK_FPR_32 \ |
| 103 |
| MASK_MEDIA \ |
| 104 |
| MASK_ACC_4 \ |
| 105 |
| MASK_SOFT_FLOAT \ |
| 106 |
| MASK_DWORD \ |
| 107 |
| MASK_PACK) |
| 108 |
|
| 109 |
#define MASK_DEFAULT_SIMPLE \ |
| 110 |
(MASK_GPR_32 | MASK_SOFT_FLOAT) |
| 111 |
|
| 112 |
/* A C string constant that tells the GCC driver program options to pass to |
| 113 |
`cc1'. It can also specify how to translate options you give to GCC into |
| 114 |
options for GCC to pass to the `cc1'. |
| 115 |
|
| 116 |
Do not define this macro if it does not need to do anything. */ |
| 117 |
/* For ABI compliance, we need to put bss data into the normal data section. */ |
| 118 |
#define CC1_SPEC "%{G*}" |
| 119 |
|
| 120 |
#undef LINK_SPEC |
| 121 |
#define LINK_SPEC "\ |
| 122 |
%{h*} %{v:-V} \ |
| 123 |
%{mfdpic:-melf32frvfd -z text} \ |
| 124 |
%{static:-dn -Bstatic} \ |
| 125 |
%{shared:-Bdynamic} \ |
| 126 |
%{symbolic:-Bsymbolic} \ |
| 127 |
%{G*}" |
| 128 |
|
| 129 |
#undef LIB_SPEC |
| 130 |
#define LIB_SPEC "--start-group -lc -lsim --end-group" |
| 131 |
|
| 132 |
#ifndef CPU_TYPE |
| 133 |
#define CPU_TYPE FRV_CPU_FR500 |
| 134 |
#endif |
| 135 |
|
| 136 |
/* Run-time target specifications */ |
| 137 |
|
| 138 |
#define TARGET_CPU_CPP_BUILTINS() \ |
| 139 |
do \ |
| 140 |
{ \ |
| 141 |
int issue_rate; \ |
| 142 |
\ |
| 143 |
builtin_define ("__frv__"); \ |
| 144 |
builtin_assert ("machine=frv"); \ |
| 145 |
\ |
| 146 |
issue_rate = frv_issue_rate (); \ |
| 147 |
if (issue_rate > 1) \ |
| 148 |
builtin_define_with_int_value ("__FRV_VLIW__", issue_rate); \ |
| 149 |
builtin_define_with_int_value ("__FRV_GPR__", NUM_GPRS); \ |
| 150 |
builtin_define_with_int_value ("__FRV_FPR__", NUM_FPRS); \ |
| 151 |
builtin_define_with_int_value ("__FRV_ACC__", NUM_ACCS); \ |
| 152 |
\ |
| 153 |
switch (frv_cpu_type) \ |
| 154 |
{ \ |
| 155 |
case FRV_CPU_GENERIC: \ |
| 156 |
builtin_define ("__CPU_GENERIC__"); \ |
| 157 |
break; \ |
| 158 |
case FRV_CPU_FR550: \ |
| 159 |
builtin_define ("__CPU_FR550__"); \ |
| 160 |
break; \ |
| 161 |
case FRV_CPU_FR500: \ |
| 162 |
case FRV_CPU_TOMCAT: \ |
| 163 |
builtin_define ("__CPU_FR500__"); \ |
| 164 |
break; \ |
| 165 |
case FRV_CPU_FR450: \ |
| 166 |
builtin_define ("__CPU_FR450__"); \ |
| 167 |
break; \ |
| 168 |
case FRV_CPU_FR405: \ |
| 169 |
builtin_define ("__CPU_FR405__"); \ |
| 170 |
break; \ |
| 171 |
case FRV_CPU_FR400: \ |
| 172 |
builtin_define ("__CPU_FR400__"); \ |
| 173 |
break; \ |
| 174 |
case FRV_CPU_FR300: \ |
| 175 |
case FRV_CPU_SIMPLE: \ |
| 176 |
builtin_define ("__CPU_FR300__"); \ |
| 177 |
break; \ |
| 178 |
} \ |
| 179 |
\ |
| 180 |
if (TARGET_HARD_FLOAT) \ |
| 181 |
builtin_define ("__FRV_HARD_FLOAT__"); \ |
| 182 |
if (TARGET_DWORD) \ |
| 183 |
builtin_define ("__FRV_DWORD__"); \ |
| 184 |
if (TARGET_FDPIC) \ |
| 185 |
builtin_define ("__FRV_FDPIC__"); \ |
| 186 |
if (flag_leading_underscore > 0) \ |
| 187 |
builtin_define ("__FRV_UNDERSCORE__"); \ |
| 188 |
} \ |
| 189 |
while (0) |
| 190 |
|
| 191 |
|
| 192 |
#define TARGET_HAS_FPRS (TARGET_HARD_FLOAT || TARGET_MEDIA) |
| 193 |
|
| 194 |
#define NUM_GPRS (TARGET_GPR_32? 32 : 64) |
| 195 |
#define NUM_FPRS (!TARGET_HAS_FPRS? 0 : TARGET_FPR_32? 32 : 64) |
| 196 |
#define NUM_ACCS (!TARGET_MEDIA? 0 : TARGET_ACC_4? 4 : 8) |
| 197 |
|
| 198 |
/* X is a valid accumulator number if (X & ACC_MASK) == X. */ |
| 199 |
#define ACC_MASK \ |
| 200 |
(!TARGET_MEDIA ? 0 \ |
| 201 |
: TARGET_ACC_4 ? 3 \ |
| 202 |
: frv_cpu_type == FRV_CPU_FR450 ? 11 \ |
| 203 |
: 7) |
| 204 |
|
| 205 |
/* Macros to identify the blend of media instructions available. Revision 1 |
| 206 |
is the one found on the FR500. Revision 2 includes the changes made for |
| 207 |
the FR400. |
| 208 |
|
| 209 |
Treat the generic processor as a revision 1 machine for now, for |
| 210 |
compatibility with earlier releases. */ |
| 211 |
|
| 212 |
#define TARGET_MEDIA_REV1 \ |
| 213 |
(TARGET_MEDIA \ |
| 214 |
&& (frv_cpu_type == FRV_CPU_GENERIC \ |
| 215 |
|| frv_cpu_type == FRV_CPU_FR500)) |
| 216 |
|
| 217 |
#define TARGET_MEDIA_REV2 \ |
| 218 |
(TARGET_MEDIA \ |
| 219 |
&& (frv_cpu_type == FRV_CPU_FR400 \ |
| 220 |
|| frv_cpu_type == FRV_CPU_FR405 \ |
| 221 |
|| frv_cpu_type == FRV_CPU_FR450 \ |
| 222 |
|| frv_cpu_type == FRV_CPU_FR550)) |
| 223 |
|
| 224 |
#define TARGET_MEDIA_FR450 \ |
| 225 |
(frv_cpu_type == FRV_CPU_FR450) |
| 226 |
|
| 227 |
#define TARGET_FR500_FR550_BUILTINS \ |
| 228 |
(frv_cpu_type == FRV_CPU_FR500 \ |
| 229 |
|| frv_cpu_type == FRV_CPU_FR550) |
| 230 |
|
| 231 |
#define TARGET_FR405_BUILTINS \ |
| 232 |
(frv_cpu_type == FRV_CPU_FR405 \ |
| 233 |
|| frv_cpu_type == FRV_CPU_FR450) |
| 234 |
|
| 235 |
#ifndef HAVE_AS_TLS |
| 236 |
#define HAVE_AS_TLS 0 |
| 237 |
#endif |
| 238 |
|
| 239 |
#define LABEL_ALIGN_AFTER_BARRIER(LABEL) (TARGET_ALIGN_LABELS ? 3 : 0) |
| 240 |
|
| 241 |
/* Small Data Area Support. */ |
| 242 |
/* Maximum size of variables that go in .sdata/.sbss. |
| 243 |
The -msdata=foo switch also controls how small variables are handled. */ |
| 244 |
#ifndef SDATA_DEFAULT_SIZE |
| 245 |
#define SDATA_DEFAULT_SIZE 8 |
| 246 |
#endif |
| 247 |
|
| 248 |
|
| 249 |
/* Storage Layout */ |
| 250 |
|
| 251 |
/* Define this macro to have the value 1 if the most significant bit in a byte |
| 252 |
has the lowest number; otherwise define it to have the value zero. This |
| 253 |
means that bit-field instructions count from the most significant bit. If |
| 254 |
the machine has no bit-field instructions, then this must still be defined, |
| 255 |
but it doesn't matter which value it is defined to. This macro need not be |
| 256 |
a constant. |
| 257 |
|
| 258 |
This macro does not affect the way structure fields are packed into bytes or |
| 259 |
words; that is controlled by `BYTES_BIG_ENDIAN'. */ |
| 260 |
#define BITS_BIG_ENDIAN 1 |
| 261 |
|
| 262 |
/* Define this macro to have the value 1 if the most significant byte in a word |
| 263 |
has the lowest number. This macro need not be a constant. */ |
| 264 |
#define BYTES_BIG_ENDIAN 1 |
| 265 |
|
| 266 |
/* Define this macro to have the value 1 if, in a multiword object, the most |
| 267 |
significant word has the lowest number. This applies to both memory |
| 268 |
locations and registers; GCC fundamentally assumes that the order of |
| 269 |
words in memory is the same as the order in registers. This macro need not |
| 270 |
be a constant. */ |
| 271 |
#define WORDS_BIG_ENDIAN 1 |
| 272 |
|
| 273 |
/* Number of storage units in a word; normally 4. */ |
| 274 |
#define UNITS_PER_WORD 4 |
| 275 |
|
| 276 |
/* A macro to update MODE and UNSIGNEDP when an object whose type is TYPE and |
| 277 |
which has the specified mode and signedness is to be stored in a register. |
| 278 |
This macro is only called when TYPE is a scalar type. |
| 279 |
|
| 280 |
On most RISC machines, which only have operations that operate on a full |
| 281 |
register, define this macro to set M to `word_mode' if M is an integer mode |
| 282 |
narrower than `BITS_PER_WORD'. In most cases, only integer modes should be |
| 283 |
widened because wider-precision floating-point operations are usually more |
| 284 |
expensive than their narrower counterparts. |
| 285 |
|
| 286 |
For most machines, the macro definition does not change UNSIGNEDP. However, |
| 287 |
some machines, have instructions that preferentially handle either signed or |
| 288 |
unsigned quantities of certain modes. For example, on the DEC Alpha, 32-bit |
| 289 |
loads from memory and 32-bit add instructions sign-extend the result to 64 |
| 290 |
bits. On such machines, set UNSIGNEDP according to which kind of extension |
| 291 |
is more efficient. |
| 292 |
|
| 293 |
Do not define this macro if it would never modify MODE. */ |
| 294 |
#define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \ |
| 295 |
do \ |
| 296 |
{ \ |
| 297 |
if (GET_MODE_CLASS (MODE) == MODE_INT \ |
| 298 |
&& GET_MODE_SIZE (MODE) < 4) \ |
| 299 |
(MODE) = SImode; \ |
| 300 |
} \ |
| 301 |
while (0) |
| 302 |
|
| 303 |
/* Normal alignment required for function parameters on the stack, in bits. |
| 304 |
All stack parameters receive at least this much alignment regardless of data |
| 305 |
type. On most machines, this is the same as the size of an integer. */ |
| 306 |
#define PARM_BOUNDARY 32 |
| 307 |
|
| 308 |
/* Define this macro if you wish to preserve a certain alignment for the stack |
| 309 |
pointer. The definition is a C expression for the desired alignment |
| 310 |
(measured in bits). |
| 311 |
|
| 312 |
If `PUSH_ROUNDING' is not defined, the stack will always be aligned to the |
| 313 |
specified boundary. If `PUSH_ROUNDING' is defined and specifies a less |
| 314 |
strict alignment than `STACK_BOUNDARY', the stack may be momentarily |
| 315 |
unaligned while pushing arguments. */ |
| 316 |
#define STACK_BOUNDARY 64 |
| 317 |
|
| 318 |
/* Alignment required for a function entry point, in bits. */ |
| 319 |
#define FUNCTION_BOUNDARY 128 |
| 320 |
|
| 321 |
/* Biggest alignment that any data type can require on this machine, |
| 322 |
in bits. */ |
| 323 |
#define BIGGEST_ALIGNMENT 64 |
| 324 |
|
| 325 |
/* @@@ A hack, needed because libobjc wants to use ADJUST_FIELD_ALIGN for |
| 326 |
some reason. */ |
| 327 |
#ifdef IN_TARGET_LIBS |
| 328 |
#define BIGGEST_FIELD_ALIGNMENT 64 |
| 329 |
#else |
| 330 |
/* An expression for the alignment of a structure field FIELD if the |
| 331 |
alignment computed in the usual way is COMPUTED. GCC uses this |
| 332 |
value instead of the value in `BIGGEST_ALIGNMENT' or |
| 333 |
`BIGGEST_FIELD_ALIGNMENT', if defined, for structure fields only. */ |
| 334 |
#define ADJUST_FIELD_ALIGN(FIELD, TYPE, COMPUTED) \ |
| 335 |
frv_adjust_field_align (FIELD, COMPUTED) |
| 336 |
#endif |
| 337 |
|
| 338 |
/* If defined, a C expression to compute the alignment for a static variable. |
| 339 |
TYPE is the data type, and ALIGN is the alignment that the object |
| 340 |
would ordinarily have. The value of this macro is used instead of that |
| 341 |
alignment to align the object. |
| 342 |
|
| 343 |
If this macro is not defined, then ALIGN is used. |
| 344 |
|
| 345 |
One use of this macro is to increase alignment of medium-size data to make |
| 346 |
it all fit in fewer cache lines. Another is to cause character arrays to be |
| 347 |
word-aligned so that `strcpy' calls that copy constants to character arrays |
| 348 |
can be done inline. */ |
| 349 |
#define DATA_ALIGNMENT(TYPE, ALIGN) \ |
| 350 |
(TREE_CODE (TYPE) == ARRAY_TYPE \ |
| 351 |
&& TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ |
| 352 |
&& (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) |
| 353 |
|
| 354 |
/* Define this macro to be the value 1 if instructions will fail to work if |
| 355 |
given data not on the nominal alignment. If instructions will merely go |
| 356 |
slower in that case, define this macro as 0. */ |
| 357 |
#define STRICT_ALIGNMENT 1 |
| 358 |
|
| 359 |
#define PCC_BITFIELD_TYPE_MATTERS 1 |
| 360 |
|
| 361 |
|
| 362 |
/* Layout of Source Language Data Types. */ |
| 363 |
|
| 364 |
#define CHAR_TYPE_SIZE 8 |
| 365 |
#define SHORT_TYPE_SIZE 16 |
| 366 |
#define INT_TYPE_SIZE 32 |
| 367 |
#define LONG_TYPE_SIZE 32 |
| 368 |
#define LONG_LONG_TYPE_SIZE 64 |
| 369 |
|
| 370 |
/* An expression whose value is 1 or 0, according to whether the type `char' |
| 371 |
should be signed or unsigned by default. The user can always override this |
| 372 |
default with the options `-fsigned-char' and `-funsigned-char'. */ |
| 373 |
#define DEFAULT_SIGNED_CHAR 1 |
| 374 |
|
| 375 |
#undef SIZE_TYPE |
| 376 |
#define SIZE_TYPE "unsigned int" |
| 377 |
|
| 378 |
#undef PTRDIFF_TYPE |
| 379 |
#define PTRDIFF_TYPE "int" |
| 380 |
|
| 381 |
#undef WCHAR_TYPE |
| 382 |
#define WCHAR_TYPE "long int" |
| 383 |
|
| 384 |
#undef WCHAR_TYPE_SIZE |
| 385 |
#define WCHAR_TYPE_SIZE BITS_PER_WORD |
| 386 |
|
| 387 |
|
| 388 |
/* General purpose registers. */ |
| 389 |
#define GPR_FIRST 0 /* First gpr */ |
| 390 |
#define GPR_LAST (GPR_FIRST + 63) /* Last gpr */ |
| 391 |
#define GPR_R0 GPR_FIRST /* R0, constant 0 */ |
| 392 |
#define GPR_FP (GPR_FIRST + 2) /* Frame pointer */ |
| 393 |
#define GPR_SP (GPR_FIRST + 1) /* Stack pointer */ |
| 394 |
/* small data register */ |
| 395 |
#define SDA_BASE_REG ((unsigned)(TARGET_FDPIC ? -1 : flag_pic ? PIC_REGNO : (GPR_FIRST + 16))) |
| 396 |
#define PIC_REGNO (GPR_FIRST + (TARGET_FDPIC?15:17)) /* PIC register. */ |
| 397 |
#define FDPIC_FPTR_REGNO (GPR_FIRST + 14) /* uClinux PIC function pointer register. */ |
| 398 |
#define FDPIC_REGNO (GPR_FIRST + 15) /* uClinux PIC register. */ |
| 399 |
|
| 400 |
#define HARD_REGNO_RENAME_OK(from,to) (TARGET_FDPIC ? ((to) != FDPIC_REG) : 1) |
| 401 |
|
| 402 |
#define OUR_FDPIC_REG get_hard_reg_initial_val (SImode, FDPIC_REGNO) |
| 403 |
|
| 404 |
#define FPR_FIRST 64 /* First FP reg */ |
| 405 |
#define FPR_LAST 127 /* Last FP reg */ |
| 406 |
|
| 407 |
#define GPR_TEMP_NUM frv_condexec_temps /* # gprs to reserve for temps */ |
| 408 |
|
| 409 |
/* We reserve the last CR and CCR in each category to be used as a reload |
| 410 |
register to reload the CR/CCR registers. This is a kludge. */ |
| 411 |
#define CC_FIRST 128 /* First ICC/FCC reg */ |
| 412 |
#define CC_LAST 135 /* Last ICC/FCC reg */ |
| 413 |
#define ICC_FIRST (CC_FIRST + 4) /* First ICC reg */ |
| 414 |
#define ICC_LAST (CC_FIRST + 7) /* Last ICC reg */ |
| 415 |
#define ICC_TEMP (CC_FIRST + 7) /* Temporary ICC reg */ |
| 416 |
#define FCC_FIRST (CC_FIRST) /* First FCC reg */ |
| 417 |
#define FCC_LAST (CC_FIRST + 3) /* Last FCC reg */ |
| 418 |
|
| 419 |
/* Amount to shift a value to locate a ICC or FCC register in the CCR |
| 420 |
register and shift it to the bottom 4 bits. */ |
| 421 |
#define CC_SHIFT_RIGHT(REGNO) (((REGNO) - CC_FIRST) << 2) |
| 422 |
|
| 423 |
/* Mask to isolate a single ICC/FCC value. */ |
| 424 |
#define CC_MASK 0xf |
| 425 |
|
| 426 |
/* Masks to isolate the various bits in an ICC field. */ |
| 427 |
#define ICC_MASK_N 0x8 /* negative */ |
| 428 |
#define ICC_MASK_Z 0x4 /* zero */ |
| 429 |
#define ICC_MASK_V 0x2 /* overflow */ |
| 430 |
#define ICC_MASK_C 0x1 /* carry */ |
| 431 |
|
| 432 |
/* Mask to isolate the N/Z flags in an ICC. */ |
| 433 |
#define ICC_MASK_NZ (ICC_MASK_N | ICC_MASK_Z) |
| 434 |
|
| 435 |
/* Mask to isolate the Z/C flags in an ICC. */ |
| 436 |
#define ICC_MASK_ZC (ICC_MASK_Z | ICC_MASK_C) |
| 437 |
|
| 438 |
/* Masks to isolate the various bits in a FCC field. */ |
| 439 |
#define FCC_MASK_E 0x8 /* equal */ |
| 440 |
#define FCC_MASK_L 0x4 /* less than */ |
| 441 |
#define FCC_MASK_G 0x2 /* greater than */ |
| 442 |
#define FCC_MASK_U 0x1 /* unordered */ |
| 443 |
|
| 444 |
/* For CCR registers, the machine wants CR4..CR7 to be used for integer |
| 445 |
code and CR0..CR3 to be used for floating point. */ |
| 446 |
#define CR_FIRST 136 /* First CCR */ |
| 447 |
#define CR_LAST 143 /* Last CCR */ |
| 448 |
#define CR_NUM (CR_LAST-CR_FIRST+1) /* # of CCRs (8) */ |
| 449 |
#define ICR_FIRST (CR_FIRST + 4) /* First integer CCR */ |
| 450 |
#define ICR_LAST (CR_FIRST + 7) /* Last integer CCR */ |
| 451 |
#define ICR_TEMP ICR_LAST /* Temp integer CCR */ |
| 452 |
#define FCR_FIRST (CR_FIRST + 0) /* First float CCR */ |
| 453 |
#define FCR_LAST (CR_FIRST + 3) /* Last float CCR */ |
| 454 |
|
| 455 |
/* Amount to shift a value to locate a CR register in the CCCR special purpose |
| 456 |
register and shift it to the bottom 2 bits. */ |
| 457 |
#define CR_SHIFT_RIGHT(REGNO) (((REGNO) - CR_FIRST) << 1) |
| 458 |
|
| 459 |
/* Mask to isolate a single CR value. */ |
| 460 |
#define CR_MASK 0x3 |
| 461 |
|
| 462 |
#define ACC_FIRST 144 /* First acc register */ |
| 463 |
#define ACC_LAST 155 /* Last acc register */ |
| 464 |
|
| 465 |
#define ACCG_FIRST 156 /* First accg register */ |
| 466 |
#define ACCG_LAST 167 /* Last accg register */ |
| 467 |
|
| 468 |
#define AP_FIRST 168 /* fake argument pointer */ |
| 469 |
|
| 470 |
#define SPR_FIRST 169 |
| 471 |
#define SPR_LAST 172 |
| 472 |
#define LR_REGNO (SPR_FIRST) |
| 473 |
#define LCR_REGNO (SPR_FIRST + 1) |
| 474 |
#define IACC_FIRST (SPR_FIRST + 2) |
| 475 |
#define IACC_LAST (SPR_FIRST + 3) |
| 476 |
|
| 477 |
#define GPR_P(R) IN_RANGE (R, GPR_FIRST, GPR_LAST) |
| 478 |
#define GPR_OR_AP_P(R) (GPR_P (R) || (R) == ARG_POINTER_REGNUM) |
| 479 |
#define FPR_P(R) IN_RANGE (R, FPR_FIRST, FPR_LAST) |
| 480 |
#define CC_P(R) IN_RANGE (R, CC_FIRST, CC_LAST) |
| 481 |
#define ICC_P(R) IN_RANGE (R, ICC_FIRST, ICC_LAST) |
| 482 |
#define FCC_P(R) IN_RANGE (R, FCC_FIRST, FCC_LAST) |
| 483 |
#define CR_P(R) IN_RANGE (R, CR_FIRST, CR_LAST) |
| 484 |
#define ICR_P(R) IN_RANGE (R, ICR_FIRST, ICR_LAST) |
| 485 |
#define FCR_P(R) IN_RANGE (R, FCR_FIRST, FCR_LAST) |
| 486 |
#define ACC_P(R) IN_RANGE (R, ACC_FIRST, ACC_LAST) |
| 487 |
#define ACCG_P(R) IN_RANGE (R, ACCG_FIRST, ACCG_LAST) |
| 488 |
#define SPR_P(R) IN_RANGE (R, SPR_FIRST, SPR_LAST) |
| 489 |
|
| 490 |
#define GPR_OR_PSEUDO_P(R) (GPR_P (R) || (R) >= FIRST_PSEUDO_REGISTER) |
| 491 |
#define FPR_OR_PSEUDO_P(R) (FPR_P (R) || (R) >= FIRST_PSEUDO_REGISTER) |
| 492 |
#define GPR_AP_OR_PSEUDO_P(R) (GPR_OR_AP_P (R) || (R) >= FIRST_PSEUDO_REGISTER) |
| 493 |
#define CC_OR_PSEUDO_P(R) (CC_P (R) || (R) >= FIRST_PSEUDO_REGISTER) |
| 494 |
#define ICC_OR_PSEUDO_P(R) (ICC_P (R) || (R) >= FIRST_PSEUDO_REGISTER) |
| 495 |
#define FCC_OR_PSEUDO_P(R) (FCC_P (R) || (R) >= FIRST_PSEUDO_REGISTER) |
| 496 |
#define CR_OR_PSEUDO_P(R) (CR_P (R) || (R) >= FIRST_PSEUDO_REGISTER) |
| 497 |
#define ICR_OR_PSEUDO_P(R) (ICR_P (R) || (R) >= FIRST_PSEUDO_REGISTER) |
| 498 |
#define FCR_OR_PSEUDO_P(R) (FCR_P (R) || (R) >= FIRST_PSEUDO_REGISTER) |
| 499 |
#define ACC_OR_PSEUDO_P(R) (ACC_P (R) || (R) >= FIRST_PSEUDO_REGISTER) |
| 500 |
#define ACCG_OR_PSEUDO_P(R) (ACCG_P (R) || (R) >= FIRST_PSEUDO_REGISTER) |
| 501 |
|
| 502 |
#define MAX_STACK_IMMEDIATE_OFFSET 2047 |
| 503 |
|
| 504 |
|
| 505 |
/* Register Basics. */ |
| 506 |
|
| 507 |
/* Number of hardware registers known to the compiler. They receive numbers 0 |
| 508 |
through `FIRST_PSEUDO_REGISTER-1'; thus, the first pseudo register's number |
| 509 |
really is assigned the number `FIRST_PSEUDO_REGISTER'. */ |
| 510 |
#define FIRST_PSEUDO_REGISTER (SPR_LAST + 1) |
| 511 |
|
| 512 |
/* The first/last register that can contain the arguments to a function. */ |
| 513 |
#define FIRST_ARG_REGNUM (GPR_FIRST + 8) |
| 514 |
#define LAST_ARG_REGNUM (FIRST_ARG_REGNUM + FRV_NUM_ARG_REGS - 1) |
| 515 |
|
| 516 |
/* Registers used by the exception handling functions. These should be |
| 517 |
registers that are not otherwise used by the calling sequence. */ |
| 518 |
#define FIRST_EH_REGNUM 14 |
| 519 |
#define LAST_EH_REGNUM 15 |
| 520 |
|
| 521 |
/* Scratch registers used in the prologue, epilogue and thunks. |
| 522 |
OFFSET_REGNO is for loading constant addends that are too big for a |
| 523 |
single instruction. TEMP_REGNO is used for transferring SPRs to and from |
| 524 |
the stack, and various other activities. */ |
| 525 |
#define OFFSET_REGNO 4 |
| 526 |
#define TEMP_REGNO 5 |
| 527 |
|
| 528 |
/* Registers used in the prologue. OLD_SP_REGNO is the old stack pointer, |
| 529 |
which is sometimes used to set up the frame pointer. */ |
| 530 |
#define OLD_SP_REGNO 6 |
| 531 |
|
| 532 |
/* Registers used in the epilogue. STACKADJ_REGNO stores the exception |
| 533 |
handler's stack adjustment. */ |
| 534 |
#define STACKADJ_REGNO 6 |
| 535 |
|
| 536 |
/* Registers used in thunks. JMP_REGNO is used for loading the target |
| 537 |
address. */ |
| 538 |
#define JUMP_REGNO 6 |
| 539 |
|
| 540 |
#define EH_RETURN_DATA_REGNO(N) ((N) <= (LAST_EH_REGNUM - FIRST_EH_REGNUM)? \ |
| 541 |
(N) + FIRST_EH_REGNUM : INVALID_REGNUM) |
| 542 |
#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (SImode, STACKADJ_REGNO) |
| 543 |
#define EH_RETURN_HANDLER_RTX RETURN_ADDR_RTX (0, frame_pointer_rtx) |
| 544 |
|
| 545 |
#define EPILOGUE_USES(REGNO) ((REGNO) == LR_REGNO) |
| 546 |
|
| 547 |
/* An initializer that says which registers are used for fixed purposes all |
| 548 |
throughout the compiled code and are therefore not available for general |
| 549 |
allocation. These would include the stack pointer, the frame pointer |
| 550 |
(except on machines where that can be used as a general register when no |
| 551 |
frame pointer is needed), the program counter on machines where that is |
| 552 |
considered one of the addressable registers, and any other numbered register |
| 553 |
with a standard use. |
| 554 |
|
| 555 |
This information is expressed as a sequence of numbers, separated by commas |
| 556 |
and surrounded by braces. The Nth number is 1 if register N is fixed, 0 |
| 557 |
otherwise. |
| 558 |
|
| 559 |
The table initialized from this macro, and the table initialized by the |
| 560 |
following one, may be overridden at run time either automatically, by the |
| 561 |
actions of the macro `CONDITIONAL_REGISTER_USAGE', or by the user with the |
| 562 |
command options `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG'. */ |
| 563 |
|
| 564 |
/* gr0 -- Hard Zero |
| 565 |
gr1 -- Stack Pointer |
| 566 |
gr2 -- Frame Pointer |
| 567 |
gr3 -- Hidden Parameter |
| 568 |
gr16 -- Small Data reserved |
| 569 |
gr17 -- Pic reserved |
| 570 |
gr28 -- OS reserved |
| 571 |
gr29 -- OS reserved |
| 572 |
gr30 -- OS reserved |
| 573 |
gr31 -- OS reserved |
| 574 |
cr3 -- reserved to reload FCC registers. |
| 575 |
cr7 -- reserved to reload ICC registers. */ |
| 576 |
#define FIXED_REGISTERS \ |
| 577 |
{ /* Integer Registers */ \ |
| 578 |
1, 1, 1, 1, 0, 0, 0, 0, /* 000-007, gr0 - gr7 */ \ |
| 579 |
0, 0, 0, 0, 0, 0, 0, 0, /* 008-015, gr8 - gr15 */ \ |
| 580 |
1, 1, 0, 0, 0, 0, 0, 0, /* 016-023, gr16 - gr23 */ \ |
| 581 |
0, 0, 0, 0, 1, 1, 1, 1, /* 024-031, gr24 - gr31 */ \ |
| 582 |
0, 0, 0, 0, 0, 0, 0, 0, /* 032-039, gr32 - gr39 */ \ |
| 583 |
0, 0, 0, 0, 0, 0, 0, 0, /* 040-040, gr48 - gr47 */ \ |
| 584 |
0, 0, 0, 0, 0, 0, 0, 0, /* 048-055, gr48 - gr55 */ \ |
| 585 |
0, 0, 0, 0, 0, 0, 0, 0, /* 056-063, gr56 - gr63 */ \ |
| 586 |
/* Float Registers */ \ |
| 587 |
0, 0, 0, 0, 0, 0, 0, 0, /* 064-071, fr0 - fr7 */ \ |
| 588 |
0, 0, 0, 0, 0, 0, 0, 0, /* 072-079, fr8 - fr15 */ \ |
| 589 |
0, 0, 0, 0, 0, 0, 0, 0, /* 080-087, fr16 - fr23 */ \ |
| 590 |
0, 0, 0, 0, 0, 0, 0, 0, /* 088-095, fr24 - fr31 */ \ |
| 591 |
0, 0, 0, 0, 0, 0, 0, 0, /* 096-103, fr32 - fr39 */ \ |
| 592 |
0, 0, 0, 0, 0, 0, 0, 0, /* 104-111, fr48 - fr47 */ \ |
| 593 |
0, 0, 0, 0, 0, 0, 0, 0, /* 112-119, fr48 - fr55 */ \ |
| 594 |
0, 0, 0, 0, 0, 0, 0, 0, /* 120-127, fr56 - fr63 */ \ |
| 595 |
/* Condition Code Registers */ \ |
| 596 |
0, 0, 0, 0, /* 128-131, fcc0 - fcc3 */ \ |
| 597 |
0, 0, 0, 1, /* 132-135, icc0 - icc3 */ \ |
| 598 |
/* Conditional execution Registers (CCR) */ \ |
| 599 |
0, 0, 0, 0, 0, 0, 0, 1, /* 136-143, cr0 - cr7 */ \ |
| 600 |
/* Accumulators */ \ |
| 601 |
1, 1, 1, 1, 1, 1, 1, 1, /* 144-151, acc0 - acc7 */ \ |
| 602 |
1, 1, 1, 1, /* 152-155, acc8 - acc11 */ \ |
| 603 |
1, 1, 1, 1, 1, 1, 1, 1, /* 156-163, accg0 - accg7 */ \ |
| 604 |
1, 1, 1, 1, /* 164-167, accg8 - accg11 */ \ |
| 605 |
/* Other registers */ \ |
| 606 |
1, /* 168, AP - fake arg ptr */ \ |
| 607 |
1, /* 169, LR - Link register*/ \ |
| 608 |
0, /* 170, LCR - Loop count reg*/ \ |
| 609 |
1, 1 /* 171-172, iacc0 */ \ |
| 610 |
} |
| 611 |
|
| 612 |
/* Like `FIXED_REGISTERS' but has 1 for each register that is clobbered (in |
| 613 |
general) by function calls as well as for fixed registers. This macro |
| 614 |
therefore identifies the registers that are not available for general |
| 615 |
allocation of values that must live across function calls. |
| 616 |
|
| 617 |
If a register has 0 in `CALL_USED_REGISTERS', the compiler automatically |
| 618 |
saves it on function entry and restores it on function exit, if the register |
| 619 |
is used within the function. */ |
| 620 |
#define CALL_USED_REGISTERS \ |
| 621 |
{ /* Integer Registers */ \ |
| 622 |
1, 1, 1, 1, 1, 1, 1, 1, /* 000-007, gr0 - gr7 */ \ |
| 623 |
1, 1, 1, 1, 1, 1, 1, 1, /* 008-015, gr8 - gr15 */ \ |
| 624 |
1, 1, 0, 0, 0, 0, 0, 0, /* 016-023, gr16 - gr23 */ \ |
| 625 |
0, 0, 0, 0, 1, 1, 1, 1, /* 024-031, gr24 - gr31 */ \ |
| 626 |
1, 1, 1, 1, 1, 1, 1, 1, /* 032-039, gr32 - gr39 */ \ |
| 627 |
1, 1, 1, 1, 1, 1, 1, 1, /* 040-040, gr48 - gr47 */ \ |
| 628 |
0, 0, 0, 0, 0, 0, 0, 0, /* 048-055, gr48 - gr55 */ \ |
| 629 |
0, 0, 0, 0, 0, 0, 0, 0, /* 056-063, gr56 - gr63 */ \ |
| 630 |
/* Float Registers */ \ |
| 631 |
1, 1, 1, 1, 1, 1, 1, 1, /* 064-071, fr0 - fr7 */ \ |
| 632 |
1, 1, 1, 1, 1, 1, 1, 1, /* 072-079, fr8 - fr15 */ \ |
| 633 |
0, 0, 0, 0, 0, 0, 0, 0, /* 080-087, fr16 - fr23 */ \ |
| 634 |
0, 0, 0, 0, 0, 0, 0, 0, /* 088-095, fr24 - fr31 */ \ |
| 635 |
1, 1, 1, 1, 1, 1, 1, 1, /* 096-103, fr32 - fr39 */ \ |
| 636 |
1, 1, 1, 1, 1, 1, 1, 1, /* 104-111, fr48 - fr47 */ \ |
| 637 |
0, 0, 0, 0, 0, 0, 0, 0, /* 112-119, fr48 - fr55 */ \ |
| 638 |
0, 0, 0, 0, 0, 0, 0, 0, /* 120-127, fr56 - fr63 */ \ |
| 639 |
/* Condition Code Registers */ \ |
| 640 |
1, 1, 1, 1, /* 128-131, fcc0 - fcc3 */ \ |
| 641 |
1, 1, 1, 1, /* 132-135, icc0 - icc3 */ \ |
| 642 |
/* Conditional execution Registers (CCR) */ \ |
| 643 |
1, 1, 1, 1, 1, 1, 1, 1, /* 136-143, cr0 - cr7 */ \ |
| 644 |
/* Accumulators */ \ |
| 645 |
1, 1, 1, 1, 1, 1, 1, 1, /* 144-151, acc0 - acc7 */ \ |
| 646 |
1, 1, 1, 1, /* 152-155, acc8 - acc11 */ \ |
| 647 |
1, 1, 1, 1, 1, 1, 1, 1, /* 156-163, accg0 - accg7 */ \ |
| 648 |
1, 1, 1, 1, /* 164-167, accg8 - accg11 */ \ |
| 649 |
/* Other registers */ \ |
| 650 |
1, /* 168, AP - fake arg ptr */ \ |
| 651 |
1, /* 169, LR - Link register*/ \ |
| 652 |
1, /* 170, LCR - Loop count reg */ \ |
| 653 |
1, 1 /* 171-172, iacc0 */ \ |
| 654 |
} |
| 655 |
|
| 656 |
|
| 657 |
/* Order of allocation of registers. */ |
| 658 |
|
| 659 |
/* If defined, an initializer for a vector of integers, containing the numbers |
| 660 |
of hard registers in the order in which GCC should prefer to use them |
| 661 |
(from most preferred to least). |
| 662 |
|
| 663 |
If this macro is not defined, registers are used lowest numbered first (all |
| 664 |
else being equal). |
| 665 |
|
| 666 |
One use of this macro is on machines where the highest numbered registers |
| 667 |
must always be saved and the save-multiple-registers instruction supports |
| 668 |
only sequences of consecutive registers. On such machines, define |
| 669 |
`REG_ALLOC_ORDER' to be an initializer that lists the highest numbered |
| 670 |
allocatable register first. */ |
| 671 |
|
| 672 |
/* On the FRV, allocate GR16 and GR17 after other saved registers so that we |
| 673 |
have a better chance of allocating 2 registers at a time and can use the |
| 674 |
double word load/store instructions in the prologue. */ |
| 675 |
#define REG_ALLOC_ORDER \ |
| 676 |
{ \ |
| 677 |
/* volatile registers */ \ |
| 678 |
GPR_FIRST + 4, GPR_FIRST + 5, GPR_FIRST + 6, GPR_FIRST + 7, \ |
| 679 |
GPR_FIRST + 8, GPR_FIRST + 9, GPR_FIRST + 10, GPR_FIRST + 11, \ |
| 680 |
GPR_FIRST + 12, GPR_FIRST + 13, GPR_FIRST + 14, GPR_FIRST + 15, \ |
| 681 |
GPR_FIRST + 32, GPR_FIRST + 33, GPR_FIRST + 34, GPR_FIRST + 35, \ |
| 682 |
GPR_FIRST + 36, GPR_FIRST + 37, GPR_FIRST + 38, GPR_FIRST + 39, \ |
| 683 |
GPR_FIRST + 40, GPR_FIRST + 41, GPR_FIRST + 42, GPR_FIRST + 43, \ |
| 684 |
GPR_FIRST + 44, GPR_FIRST + 45, GPR_FIRST + 46, GPR_FIRST + 47, \ |
| 685 |
\ |
| 686 |
FPR_FIRST + 0, FPR_FIRST + 1, FPR_FIRST + 2, FPR_FIRST + 3, \ |
| 687 |
FPR_FIRST + 4, FPR_FIRST + 5, FPR_FIRST + 6, FPR_FIRST + 7, \ |
| 688 |
FPR_FIRST + 8, FPR_FIRST + 9, FPR_FIRST + 10, FPR_FIRST + 11, \ |
| 689 |
FPR_FIRST + 12, FPR_FIRST + 13, FPR_FIRST + 14, FPR_FIRST + 15, \ |
| 690 |
FPR_FIRST + 32, FPR_FIRST + 33, FPR_FIRST + 34, FPR_FIRST + 35, \ |
| 691 |
FPR_FIRST + 36, FPR_FIRST + 37, FPR_FIRST + 38, FPR_FIRST + 39, \ |
| 692 |
FPR_FIRST + 40, FPR_FIRST + 41, FPR_FIRST + 42, FPR_FIRST + 43, \ |
| 693 |
FPR_FIRST + 44, FPR_FIRST + 45, FPR_FIRST + 46, FPR_FIRST + 47, \ |
| 694 |
\ |
| 695 |
ICC_FIRST + 0, ICC_FIRST + 1, ICC_FIRST + 2, ICC_FIRST + 3, \ |
| 696 |
FCC_FIRST + 0, FCC_FIRST + 1, FCC_FIRST + 2, FCC_FIRST + 3, \ |
| 697 |
CR_FIRST + 0, CR_FIRST + 1, CR_FIRST + 2, CR_FIRST + 3, \ |
| 698 |
CR_FIRST + 4, CR_FIRST + 5, CR_FIRST + 6, CR_FIRST + 7, \ |
| 699 |
\ |
| 700 |
/* saved registers */ \ |
| 701 |
GPR_FIRST + 18, GPR_FIRST + 19, \ |
| 702 |
GPR_FIRST + 20, GPR_FIRST + 21, GPR_FIRST + 22, GPR_FIRST + 23, \ |
| 703 |
GPR_FIRST + 24, GPR_FIRST + 25, GPR_FIRST + 26, GPR_FIRST + 27, \ |
| 704 |
GPR_FIRST + 48, GPR_FIRST + 49, GPR_FIRST + 50, GPR_FIRST + 51, \ |
| 705 |
GPR_FIRST + 52, GPR_FIRST + 53, GPR_FIRST + 54, GPR_FIRST + 55, \ |
| 706 |
GPR_FIRST + 56, GPR_FIRST + 57, GPR_FIRST + 58, GPR_FIRST + 59, \ |
| 707 |
GPR_FIRST + 60, GPR_FIRST + 61, GPR_FIRST + 62, GPR_FIRST + 63, \ |
| 708 |
GPR_FIRST + 16, GPR_FIRST + 17, \ |
| 709 |
\ |
| 710 |
FPR_FIRST + 16, FPR_FIRST + 17, FPR_FIRST + 18, FPR_FIRST + 19, \ |
| 711 |
FPR_FIRST + 20, FPR_FIRST + 21, FPR_FIRST + 22, FPR_FIRST + 23, \ |
| 712 |
FPR_FIRST + 24, FPR_FIRST + 25, FPR_FIRST + 26, FPR_FIRST + 27, \ |
| 713 |
FPR_FIRST + 28, FPR_FIRST + 29, FPR_FIRST + 30, FPR_FIRST + 31, \ |
| 714 |
FPR_FIRST + 48, FPR_FIRST + 49, FPR_FIRST + 50, FPR_FIRST + 51, \ |
| 715 |
FPR_FIRST + 52, FPR_FIRST + 53, FPR_FIRST + 54, FPR_FIRST + 55, \ |
| 716 |
FPR_FIRST + 56, FPR_FIRST + 57, FPR_FIRST + 58, FPR_FIRST + 59, \ |
| 717 |
FPR_FIRST + 60, FPR_FIRST + 61, FPR_FIRST + 62, FPR_FIRST + 63, \ |
| 718 |
\ |
| 719 |
/* special or fixed registers */ \ |
| 720 |
GPR_FIRST + 0, GPR_FIRST + 1, GPR_FIRST + 2, GPR_FIRST + 3, \ |
| 721 |
GPR_FIRST + 28, GPR_FIRST + 29, GPR_FIRST + 30, GPR_FIRST + 31, \ |
| 722 |
ACC_FIRST + 0, ACC_FIRST + 1, ACC_FIRST + 2, ACC_FIRST + 3, \ |
| 723 |
ACC_FIRST + 4, ACC_FIRST + 5, ACC_FIRST + 6, ACC_FIRST + 7, \ |
| 724 |
ACC_FIRST + 8, ACC_FIRST + 9, ACC_FIRST + 10, ACC_FIRST + 11, \ |
| 725 |
ACCG_FIRST + 0, ACCG_FIRST + 1, ACCG_FIRST + 2, ACCG_FIRST + 3, \ |
| 726 |
ACCG_FIRST + 4, ACCG_FIRST + 5, ACCG_FIRST + 6, ACCG_FIRST + 7, \ |
| 727 |
ACCG_FIRST + 8, ACCG_FIRST + 9, ACCG_FIRST + 10, ACCG_FIRST + 11, \ |
| 728 |
AP_FIRST, LR_REGNO, LCR_REGNO, \ |
| 729 |
IACC_FIRST + 0, IACC_FIRST + 1 \ |
| 730 |
} |
| 731 |
|
| 732 |
|
| 733 |
/* Define this macro if the compiler should avoid copies to/from CCmode |
| 734 |
registers. You should only define this macro if support fo copying to/from |
| 735 |
CCmode is incomplete. */ |
| 736 |
#define AVOID_CCMODE_COPIES |
| 737 |
|
| 738 |
|
| 739 |
/* Register Classes. */ |
| 740 |
|
| 741 |
/* An enumeral type that must be defined with all the register class names as |
| 742 |
enumeral values. `NO_REGS' must be first. `ALL_REGS' must be the last |
| 743 |
register class, followed by one more enumeral value, `LIM_REG_CLASSES', |
| 744 |
which is not a register class but rather tells how many classes there are. |
| 745 |
|
| 746 |
Each register class has a number, which is the value of casting the class |
| 747 |
name to type `int'. The number serves as an index in many of the tables |
| 748 |
described below. */ |
| 749 |
enum reg_class |
| 750 |
{ |
| 751 |
NO_REGS, |
| 752 |
ICC_REGS, |
| 753 |
FCC_REGS, |
| 754 |
CC_REGS, |
| 755 |
ICR_REGS, |
| 756 |
FCR_REGS, |
| 757 |
CR_REGS, |
| 758 |
LCR_REG, |
| 759 |
LR_REG, |
| 760 |
GR8_REGS, |
| 761 |
GR9_REGS, |
| 762 |
GR89_REGS, |
| 763 |
FDPIC_REGS, |
| 764 |
FDPIC_FPTR_REGS, |
| 765 |
FDPIC_CALL_REGS, |
| 766 |
SPR_REGS, |
| 767 |
QUAD_ACC_REGS, |
| 768 |
ACCG_REGS, |
| 769 |
QUAD_FPR_REGS, |
| 770 |
QUAD_REGS, |
| 771 |
GPR_REGS, |
| 772 |
ALL_REGS, |
| 773 |
LIM_REG_CLASSES |
| 774 |
}; |
| 775 |
|
| 776 |
#define GENERAL_REGS GPR_REGS |
| 777 |
|
| 778 |
/* The number of distinct register classes, defined as follows: |
| 779 |
|
| 780 |
#define N_REG_CLASSES (int) LIM_REG_CLASSES */ |
| 781 |
#define N_REG_CLASSES ((int) LIM_REG_CLASSES) |
| 782 |
|
| 783 |
/* An initializer containing the names of the register classes as C string |
| 784 |
constants. These names are used in writing some of the debugging dumps. */ |
| 785 |
#define REG_CLASS_NAMES { \ |
| 786 |
"NO_REGS", \ |
| 787 |
"ICC_REGS", \ |
| 788 |
"FCC_REGS", \ |
| 789 |
"CC_REGS", \ |
| 790 |
"ICR_REGS", \ |
| 791 |
"FCR_REGS", \ |
| 792 |
"CR_REGS", \ |
| 793 |
"LCR_REG", \ |
| 794 |
"LR_REG", \ |
| 795 |
"GR8_REGS", \ |
| 796 |
"GR9_REGS", \ |
| 797 |
"GR89_REGS", \ |
| 798 |
"FDPIC_REGS", \ |
| 799 |
"FDPIC_FPTR_REGS", \ |
| 800 |
"FDPIC_CALL_REGS", \ |
| 801 |
"SPR_REGS", \ |
| 802 |
"QUAD_ACC_REGS", \ |
| 803 |
"ACCG_REGS", \ |
| 804 |
"QUAD_FPR_REGS", \ |
| 805 |
"QUAD_REGS", \ |
| 806 |
"GPR_REGS", \ |
| 807 |
"ALL_REGS" \ |
| 808 |
} |
| 809 |
|
| 810 |
/* An initializer containing the contents of the register classes, as integers |
| 811 |
which are bit masks. The Nth integer specifies the contents of class N. |
| 812 |
The way the integer MASK is interpreted is that register R is in the class |
| 813 |
if `MASK & (1 << R)' is 1. |
| 814 |
|
| 815 |
When the machine has more than 32 registers, an integer does not suffice. |
| 816 |
Then the integers are replaced by sub-initializers, braced groupings |
| 817 |
containing several integers. Each sub-initializer must be suitable as an |
| 818 |
initializer for the type `HARD_REG_SET' which is defined in |
| 819 |
`hard-reg-set.h'. */ |
| 820 |
#define REG_CLASS_CONTENTS \ |
| 821 |
{ /* gr0-gr31 gr32-gr63 fr0-fr31 fr32-fr-63 cc/ccr/acc ap/spr */ \ |
| 822 |
{ 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x0}, /* NO_REGS */\ |
| 823 |
{ 0x00000000,0x00000000,0x00000000,0x00000000,0x000000f0,0x0}, /* ICC_REGS */\ |
| 824 |
{ 0x00000000,0x00000000,0x00000000,0x00000000,0x0000000f,0x0}, /* FCC_REGS */\ |
| 825 |
{ 0x00000000,0x00000000,0x00000000,0x00000000,0x000000ff,0x0}, /* CC_REGS */\ |
| 826 |
{ 0x00000000,0x00000000,0x00000000,0x00000000,0x0000f000,0x0}, /* ICR_REGS */\ |
| 827 |
{ 0x00000000,0x00000000,0x00000000,0x00000000,0x00000f00,0x0}, /* FCR_REGS */\ |
| 828 |
{ 0x00000000,0x00000000,0x00000000,0x00000000,0x0000ff00,0x0}, /* CR_REGS */\ |
| 829 |
{ 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x400}, /* LCR_REGS */\ |
| 830 |
{ 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x200}, /* LR_REGS */\ |
| 831 |
{ 0x00000100,0x00000000,0x00000000,0x00000000,0x00000000,0x0}, /* GR8_REGS */\ |
| 832 |
{ 0x00000200,0x00000000,0x00000000,0x00000000,0x00000000,0x0}, /* GR9_REGS */\ |
| 833 |
{ 0x00000300,0x00000000,0x00000000,0x00000000,0x00000000,0x0}, /* GR89_REGS */\ |
| 834 |
{ 0x00008000,0x00000000,0x00000000,0x00000000,0x00000000,0x0}, /* FDPIC_REGS */\ |
| 835 |
{ 0x00004000,0x00000000,0x00000000,0x00000000,0x00000000,0x0}, /* FDPIC_FPTR_REGS */\ |
| 836 |
{ 0x0000c000,0x00000000,0x00000000,0x00000000,0x00000000,0x0}, /* FDPIC_CALL_REGS */\ |
| 837 |
{ 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x1e00}, /* SPR_REGS */\ |
| 838 |
{ 0x00000000,0x00000000,0x00000000,0x00000000,0x0fff0000,0x0}, /* QUAD_ACC */\ |
| 839 |
{ 0x00000000,0x00000000,0x00000000,0x00000000,0xf0000000,0xff}, /* ACCG_REGS*/\ |
| 840 |
{ 0x00000000,0x00000000,0xffffffff,0xffffffff,0x00000000,0x0}, /* QUAD_FPR */\ |
| 841 |
{ 0x0ffffffc,0xffffffff,0x00000000,0x00000000,0x00000000,0x0}, /* QUAD_REGS*/\ |
| 842 |
{ 0xffffffff,0xffffffff,0x00000000,0x00000000,0x00000000,0x100}, /* GPR_REGS */\ |
| 843 |
{ 0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0x1fff}, /* ALL_REGS */\ |
| 844 |
} |
| 845 |
|
| 846 |
#define EVEN_ACC_REGS QUAD_ACC_REGS |
| 847 |
#define ACC_REGS QUAD_ACC_REGS |
| 848 |
#define FEVEN_REGS QUAD_FPR_REGS |
| 849 |
#define FPR_REGS QUAD_FPR_REGS |
| 850 |
#define EVEN_REGS QUAD_REGS |
| 851 |
|
| 852 |
/* A C expression whose value is a register class containing hard register |
| 853 |
REGNO. In general there is more than one such class; choose a class which |
| 854 |
is "minimal", meaning that no smaller class also contains the register. */ |
| 855 |
|
| 856 |
extern enum reg_class regno_reg_class[]; |
| 857 |
#define REGNO_REG_CLASS(REGNO) regno_reg_class [REGNO] |
| 858 |
|
| 859 |
/* A macro whose definition is the name of the class to which a valid base |
| 860 |
register must belong. A base register is one used in an address which is |
| 861 |
the register value plus a displacement. */ |
| 862 |
#define BASE_REG_CLASS GPR_REGS |
| 863 |
|
| 864 |
/* A macro whose definition is the name of the class to which a valid index |
| 865 |
register must belong. An index register is one used in an address where its |
| 866 |
value is either multiplied by a scale factor or added to another register |
| 867 |
(as well as added to a displacement). */ |
| 868 |
#define INDEX_REG_CLASS GPR_REGS |
| 869 |
|
| 870 |
/* A C expression which is nonzero if register number NUM is suitable for use |
| 871 |
as a base register in operand addresses. It may be either a suitable hard |
| 872 |
register or a pseudo register that has been allocated such a hard register. */ |
| 873 |
#define REGNO_OK_FOR_BASE_P(NUM) \ |
| 874 |
((NUM) < FIRST_PSEUDO_REGISTER \ |
| 875 |
? GPR_P (NUM) \ |
| 876 |
: (reg_renumber [NUM] >= 0 && GPR_P (reg_renumber [NUM]))) |
| 877 |
|
| 878 |
/* A C expression which is nonzero if register number NUM is suitable for use |
| 879 |
as an index register in operand addresses. It may be either a suitable hard |
| 880 |
register or a pseudo register that has been allocated such a hard register. |
| 881 |
|
| 882 |
The difference between an index register and a base register is that the |
| 883 |
index register may be scaled. If an address involves the sum of two |
| 884 |
registers, neither one of them scaled, then either one may be labeled the |
| 885 |
"base" and the other the "index"; but whichever labeling is used must fit |
| 886 |
the machine's constraints of which registers may serve in each capacity. |
| 887 |
The compiler will try both labelings, looking for one that is valid, and |
| 888 |
will reload one or both registers only if neither labeling works. */ |
| 889 |
#define REGNO_OK_FOR_INDEX_P(NUM) \ |
| 890 |
((NUM) < FIRST_PSEUDO_REGISTER \ |
| 891 |
? GPR_P (NUM) \ |
| 892 |
: (reg_renumber [NUM] >= 0 && GPR_P (reg_renumber [NUM]))) |
| 893 |
|
| 894 |
#define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, X) \ |
| 895 |
frv_secondary_reload_class (CLASS, MODE, X) |
| 896 |
|
| 897 |
#define SECONDARY_OUTPUT_RELOAD_CLASS(CLASS, MODE, X) \ |
| 898 |
frv_secondary_reload_class (CLASS, MODE, X) |
| 899 |
|
| 900 |
#define CLASS_MAX_NREGS(CLASS, MODE) frv_class_max_nregs (CLASS, MODE) |
| 901 |
|
| 902 |
#define ZERO_P(x) (x == CONST0_RTX (GET_MODE (x))) |
| 903 |
|
| 904 |
|
| 905 |
/* Basic Stack Layout. */ |
| 906 |
|
| 907 |
/* Structure to describe information about a saved range of registers */ |
| 908 |
|
| 909 |
typedef struct frv_stack_regs { |
| 910 |
const char * name; /* name of the register ranges */ |
| 911 |
int first; /* first register in the range */ |
| 912 |
int last; /* last register in the range */ |
| 913 |
int size_1word; /* # of bytes to be stored via 1 word stores */ |
| 914 |
int size_2words; /* # of bytes to be stored via 2 word stores */ |
| 915 |
unsigned char field_p; /* true if the registers are a single SPR */ |
| 916 |
unsigned char dword_p; /* true if we can do dword stores */ |
| 917 |
unsigned char special_p; /* true if the regs have a fixed save loc. */ |
| 918 |
} frv_stack_regs_t; |
| 919 |
|
| 920 |
/* Register ranges to look into saving. */ |
| 921 |
#define STACK_REGS_GPR 0 /* Gprs (normally gr16..gr31, gr48..gr63) */ |
| 922 |
#define STACK_REGS_FPR 1 /* Fprs (normally fr16..fr31, fr48..fr63) */ |
| 923 |
#define STACK_REGS_LR 2 /* LR register */ |
| 924 |
#define STACK_REGS_CC 3 /* CCrs (normally not saved) */ |
| 925 |
#define STACK_REGS_LCR 5 /* lcr register */ |
| 926 |
#define STACK_REGS_STDARG 6 /* stdarg registers */ |
| 927 |
#define STACK_REGS_STRUCT 7 /* structure return (gr3) */ |
| 928 |
#define STACK_REGS_FP 8 /* FP register */ |
| 929 |
#define STACK_REGS_MAX 9 /* # of register ranges */ |
| 930 |
|
| 931 |
/* Values for save_p field. */ |
| 932 |
#define REG_SAVE_NO_SAVE 0 /* register not saved */ |
| 933 |
#define REG_SAVE_1WORD 1 /* save the register */ |
| 934 |
#define REG_SAVE_2WORDS 2 /* save register and register+1 */ |
| 935 |
|
| 936 |
/* Structure used to define the frv stack. */ |
| 937 |
|
| 938 |
typedef struct frv_stack { |
| 939 |
int total_size; /* total bytes allocated for stack */ |
| 940 |
int vars_size; /* variable save area size */ |
| 941 |
int parameter_size; /* outgoing parameter size */ |
| 942 |
int stdarg_size; /* size of regs needed to be saved for stdarg */ |
| 943 |
int regs_size; /* size of the saved registers */ |
| 944 |
int regs_size_1word; /* # of bytes to be stored via 1 word stores */ |
| 945 |
int regs_size_2words; /* # of bytes to be stored via 2 word stores */ |
| 946 |
int header_size; /* size of the old FP, struct ret., LR save */ |
| 947 |
int pretend_size; /* size of pretend args */ |
| 948 |
int vars_offset; /* offset to save local variables from new SP*/ |
| 949 |
int regs_offset; /* offset to save registers from new SP */ |
| 950 |
/* register range information */ |
| 951 |
frv_stack_regs_t regs[STACK_REGS_MAX]; |
| 952 |
/* offset to store each register */ |
| 953 |
int reg_offset[FIRST_PSEUDO_REGISTER]; |
| 954 |
/* whether to save register (& reg+1) */ |
| 955 |
unsigned char save_p[FIRST_PSEUDO_REGISTER]; |
| 956 |
} frv_stack_t; |
| 957 |
|
| 958 |
/* Define this macro if pushing a word onto the stack moves the stack pointer |
| 959 |
to a smaller address. */ |
| 960 |
#define STACK_GROWS_DOWNWARD 1 |
| 961 |
|
| 962 |
/* Define this macro to nonzero if the addresses of local variable slots |
| 963 |
are at negative offsets from the frame pointer. */ |
| 964 |
#define FRAME_GROWS_DOWNWARD 1 |
| 965 |
|
| 966 |
/* Offset from the stack pointer register to the first location at which |
| 967 |
outgoing arguments are placed. If not specified, the default value of zero |
| 968 |
is used. This is the proper value for most machines. |
| 969 |
|
| 970 |
If `ARGS_GROW_DOWNWARD', this is the offset to the location above the first |
| 971 |
location at which outgoing arguments are placed. */ |
| 972 |
#define STACK_POINTER_OFFSET 0 |
| 973 |
|
| 974 |
/* Offset from the argument pointer register to the first argument's address. |
| 975 |
On some machines it may depend on the data type of the function. |
| 976 |
|
| 977 |
If `ARGS_GROW_DOWNWARD', this is the offset to the location above the first |
| 978 |
argument's address. */ |
| 979 |
#define FIRST_PARM_OFFSET(FUNDECL) 0 |
| 980 |
|
| 981 |
/* A C expression whose value is RTL representing the address in a stack frame |
| 982 |
where the pointer to the caller's frame is stored. Assume that FRAMEADDR is |
| 983 |
an RTL expression for the address of the stack frame itself. |
| 984 |
|
| 985 |
If you don't define this macro, the default is to return the value of |
| 986 |
FRAMEADDR--that is, the stack frame address is also the address of the stack |
| 987 |
word that points to the previous frame. */ |
| 988 |
#define DYNAMIC_CHAIN_ADDRESS(FRAMEADDR) frv_dynamic_chain_address (FRAMEADDR) |
| 989 |
|
| 990 |
/* A C expression whose value is RTL representing the value of the return |
| 991 |
address for the frame COUNT steps up from the current frame, after the |
| 992 |
prologue. FRAMEADDR is the frame pointer of the COUNT frame, or the frame |
| 993 |
pointer of the COUNT - 1 frame if `RETURN_ADDR_IN_PREVIOUS_FRAME' is |
| 994 |
defined. |
| 995 |
|
| 996 |
The value of the expression must always be the correct address when COUNT is |
| 997 |
zero, but may be `NULL_RTX' if there is not way to determine the return |
| 998 |
address of other frames. */ |
| 999 |
#define RETURN_ADDR_RTX(COUNT, FRAMEADDR) frv_return_addr_rtx (COUNT, FRAMEADDR) |
| 1000 |
|
| 1001 |
#define RETURN_POINTER_REGNUM LR_REGNO |
| 1002 |
|
| 1003 |
/* A C expression whose value is RTL representing the location of the incoming |
| 1004 |
return address at the beginning of any function, before the prologue. This |
| 1005 |
RTL is either a `REG', indicating that the return value is saved in `REG', |
| 1006 |
or a `MEM' representing a location in the stack. |
| 1007 |
|
| 1008 |
You only need to define this macro if you want to support call frame |
| 1009 |
debugging information like that provided by DWARF 2. */ |
| 1010 |
#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (SImode, RETURN_POINTER_REGNUM) |
| 1011 |
|
| 1012 |
|
| 1013 |
/* Register That Address the Stack Frame. */ |
| 1014 |
|
| 1015 |
/* The register number of the stack pointer register, which must also be a |
| 1016 |
fixed register according to `FIXED_REGISTERS'. On most machines, the |
| 1017 |
hardware determines which register this is. */ |
| 1018 |
#define STACK_POINTER_REGNUM (GPR_FIRST + 1) |
| 1019 |
|
| 1020 |
/* The register number of the frame pointer register, which is used to access |
| 1021 |
automatic variables in the stack frame. On some machines, the hardware |
| 1022 |
determines which register this is. On other machines, you can choose any |
| 1023 |
register you wish for this purpose. */ |
| 1024 |
#define FRAME_POINTER_REGNUM (GPR_FIRST + 2) |
| 1025 |
|
| 1026 |
/* The register number of the arg pointer register, which is used to access the |
| 1027 |
function's argument list. On some machines, this is the same as the frame |
| 1028 |
pointer register. On some machines, the hardware determines which register |
| 1029 |
this is. On other machines, you can choose any register you wish for this |
| 1030 |
purpose. If this is not the same register as the frame pointer register, |
| 1031 |
then you must mark it as a fixed register according to `FIXED_REGISTERS', or |
| 1032 |
arrange to be able to eliminate it. */ |
| 1033 |
|
| 1034 |
/* On frv this is a fake register that is eliminated in |
| 1035 |
terms of either the frame pointer or stack pointer. */ |
| 1036 |
#define ARG_POINTER_REGNUM AP_FIRST |
| 1037 |
|
| 1038 |
/* Register numbers used for passing a function's static chain pointer. If |
| 1039 |
register windows are used, the register number as seen by the called |
| 1040 |
function is `STATIC_CHAIN_INCOMING_REGNUM', while the register number as |
| 1041 |
seen by the calling function is `STATIC_CHAIN_REGNUM'. If these registers |
| 1042 |
are the same, `STATIC_CHAIN_INCOMING_REGNUM' need not be defined. |
| 1043 |
|
| 1044 |
The static chain register need not be a fixed register. |
| 1045 |
|
| 1046 |
If the static chain is passed in memory, these macros should not be defined; |
| 1047 |
instead, the next two macros should be defined. */ |
| 1048 |
#define STATIC_CHAIN_REGNUM (GPR_FIRST + 7) |
| 1049 |
#define STATIC_CHAIN_INCOMING_REGNUM (GPR_FIRST + 7) |
| 1050 |
|
| 1051 |
|
| 1052 |
/* Eliminating the Frame Pointer and the Arg Pointer. */ |
| 1053 |
|
| 1054 |
/* If defined, this macro specifies a table of register pairs used to eliminate |
| 1055 |
unneeded registers that point into the stack frame. If it is not defined, |
| 1056 |
the only elimination attempted by the compiler is to replace references to |
| 1057 |
the frame pointer with references to the stack pointer. |
| 1058 |
|
| 1059 |
The definition of this macro is a list of structure initializations, each of |
| 1060 |
which specifies an original and replacement register. |
| 1061 |
|
| 1062 |
On some machines, the position of the argument pointer is not known until |
| 1063 |
the compilation is completed. In such a case, a separate hard register must |
| 1064 |
be used for the argument pointer. This register can be eliminated by |
| 1065 |
replacing it with either the frame pointer or the argument pointer, |
| 1066 |
depending on whether or not the frame pointer has been eliminated. |
| 1067 |
|
| 1068 |
In this case, you might specify: |
| 1069 |
#define ELIMINABLE_REGS \ |
| 1070 |
{{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ |
| 1071 |
{ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ |
| 1072 |
{FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}} |
| 1073 |
|
| 1074 |
Note that the elimination of the argument pointer with the stack pointer is |
| 1075 |
specified first since that is the preferred elimination. */ |
| 1076 |
|
| 1077 |
#define ELIMINABLE_REGS \ |
| 1078 |
{ \ |
| 1079 |
{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ |
| 1080 |
{ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ |
| 1081 |
{FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM} \ |
| 1082 |
} |
| 1083 |
|
| 1084 |
/* This macro returns the initial difference between the specified pair |
| 1085 |
of registers. */ |
| 1086 |
|
| 1087 |
#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ |
| 1088 |
(OFFSET) = frv_initial_elimination_offset (FROM, TO) |
| 1089 |
|
| 1090 |
|
| 1091 |
/* Passing Function Arguments on the Stack. */ |
| 1092 |
|
| 1093 |
/* If defined, the maximum amount of space required for outgoing arguments will |
| 1094 |
be computed and placed into the variable |
| 1095 |
`crtl->outgoing_args_size'. No space will be pushed onto the |
| 1096 |
stack for each call; instead, the function prologue should increase the |
| 1097 |
stack frame size by this amount. |
| 1098 |
|
| 1099 |
Defining both `PUSH_ROUNDING' and `ACCUMULATE_OUTGOING_ARGS' is not |
| 1100 |
proper. */ |
| 1101 |
#define ACCUMULATE_OUTGOING_ARGS 1 |
| 1102 |
|
| 1103 |
|
| 1104 |
/* The number of register assigned to holding function arguments. */ |
| 1105 |
|
| 1106 |
#define FRV_NUM_ARG_REGS 6 |
| 1107 |
|
| 1108 |
/* A C type for declaring a variable that is used as the first argument of |
| 1109 |
`FUNCTION_ARG' and other related values. For some target machines, the type |
| 1110 |
`int' suffices and can hold the number of bytes of argument so far. |
| 1111 |
|
| 1112 |
There is no need to record in `CUMULATIVE_ARGS' anything about the arguments |
| 1113 |
that have been passed on the stack. The compiler has other variables to |
| 1114 |
keep track of that. For target machines on which all arguments are passed |
| 1115 |
on the stack, there is no need to store anything in `CUMULATIVE_ARGS'; |
| 1116 |
however, the data structure must exist and should not be empty, so use |
| 1117 |
`int'. */ |
| 1118 |
#define CUMULATIVE_ARGS int |
| 1119 |
|
| 1120 |
/* A C statement (sans semicolon) for initializing the variable CUM for the |
| 1121 |
state at the beginning of the argument list. The variable has type |
| 1122 |
`CUMULATIVE_ARGS'. The value of FNTYPE is the tree node for the data type |
| 1123 |
of the function which will receive the args, or 0 if the args are to a |
| 1124 |
compiler support library function. The value of INDIRECT is nonzero when |
| 1125 |
processing an indirect call, for example a call through a function pointer. |
| 1126 |
The value of INDIRECT is zero for a call to an explicitly named function, a |
| 1127 |
library function call, or when `INIT_CUMULATIVE_ARGS' is used to find |
| 1128 |
arguments for the function being compiled. |
| 1129 |
|
| 1130 |
When processing a call to a compiler support library function, LIBNAME |
| 1131 |
identifies which one. It is a `symbol_ref' rtx which contains the name of |
| 1132 |
the function, as a string. LIBNAME is 0 when an ordinary C function call is |
| 1133 |
being processed. Thus, each time this macro is called, either LIBNAME or |
| 1134 |
FNTYPE is nonzero, but never both of them at once. */ |
| 1135 |
|
| 1136 |
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, FNDECL, N_NAMED_ARGS) \ |
| 1137 |
frv_init_cumulative_args (&CUM, FNTYPE, LIBNAME, FNDECL, FALSE) |
| 1138 |
|
| 1139 |
/* Like `INIT_CUMULATIVE_ARGS' but overrides it for the purposes of finding the |
| 1140 |
arguments for the function being compiled. If this macro is undefined, |
| 1141 |
`INIT_CUMULATIVE_ARGS' is used instead. |
| 1142 |
|
| 1143 |
The value passed for LIBNAME is always 0, since library routines with |
| 1144 |
special calling conventions are never compiled with GCC. The argument |
| 1145 |
LIBNAME exists for symmetry with `INIT_CUMULATIVE_ARGS'. */ |
| 1146 |
|
| 1147 |
#define INIT_CUMULATIVE_INCOMING_ARGS(CUM, FNTYPE, LIBNAME) \ |
| 1148 |
frv_init_cumulative_args (&CUM, FNTYPE, LIBNAME, NULL, TRUE) |
| 1149 |
|
| 1150 |
/* A C expression that is nonzero if REGNO is the number of a hard register in |
| 1151 |
which function arguments are sometimes passed. This does *not* include |
| 1152 |
implicit arguments such as the static chain and the structure-value address. |
| 1153 |
On many machines, no registers can be used for this purpose since all |
| 1154 |
function arguments are pushed on the stack. */ |
| 1155 |
#define FUNCTION_ARG_REGNO_P(REGNO) \ |
| 1156 |
((REGNO) >= FIRST_ARG_REGNUM && ((REGNO) <= LAST_ARG_REGNUM)) |
| 1157 |
|
| 1158 |
|
| 1159 |
/* How Scalar Function Values are Returned. */ |
| 1160 |
|
| 1161 |
/* The number of the hard register that is used to return a scalar value from a |
| 1162 |
function call. */ |
| 1163 |
#define RETURN_VALUE_REGNUM (GPR_FIRST + 8) |
| 1164 |
|
| 1165 |
#define FUNCTION_VALUE_REGNO_P(REGNO) frv_function_value_regno_p (REGNO) |
| 1166 |
|
| 1167 |
|
| 1168 |
/* How Large Values are Returned. */ |
| 1169 |
|
| 1170 |
/* The number of the register that is used to pass the structure |
| 1171 |
value address. */ |
| 1172 |
#define FRV_STRUCT_VALUE_REGNUM (GPR_FIRST + 3) |
| 1173 |
|
| 1174 |
|
| 1175 |
/* Function Entry and Exit. */ |
| 1176 |
|
| 1177 |
/* Define this macro as a C expression that is nonzero if the return |
| 1178 |
instruction or the function epilogue ignores the value of the stack pointer; |
| 1179 |
in other words, if it is safe to delete an instruction to adjust the stack |
| 1180 |
pointer before a return from the function. |
| 1181 |
|
| 1182 |
Note that this macro's value is relevant only for functions for which frame |
| 1183 |
pointers are maintained. It is never safe to delete a final stack |
| 1184 |
adjustment in a function that has no frame pointer, and the compiler knows |
| 1185 |
this regardless of `EXIT_IGNORE_STACK'. */ |
| 1186 |
#define EXIT_IGNORE_STACK 1 |
| 1187 |
|
| 1188 |
/* Generating Code for Profiling. */ |
| 1189 |
|
| 1190 |
/* A C statement or compound statement to output to FILE some assembler code to |
| 1191 |
call the profiling subroutine `mcount'. Before calling, the assembler code |
| 1192 |
must load the address of a counter variable into a register where `mcount' |
| 1193 |
expects to find the address. The name of this variable is `LP' followed by |
| 1194 |
the number LABELNO, so you would generate the name using `LP%d' in a |
| 1195 |
`fprintf'. |
| 1196 |
|
| 1197 |
The details of how the address should be passed to `mcount' are determined |
| 1198 |
by your operating system environment, not by GCC. To figure them out, |
| 1199 |
compile a small program for profiling using the system's installed C |
| 1200 |
compiler and look at the assembler code that results. |
| 1201 |
|
| 1202 |
This declaration must be present, but it can be an abort if profiling is |
| 1203 |
not implemented. */ |
| 1204 |
|
| 1205 |
#define FUNCTION_PROFILER(FILE, LABELNO) |
| 1206 |
|
| 1207 |
/* Trampolines for Nested Functions. */ |
| 1208 |
|
| 1209 |
/* A C expression for the size in bytes of the trampoline, as an integer. */ |
| 1210 |
#define TRAMPOLINE_SIZE frv_trampoline_size () |
| 1211 |
|
| 1212 |
/* Alignment required for trampolines, in bits. |
| 1213 |
|
| 1214 |
If you don't define this macro, the value of `BIGGEST_ALIGNMENT' is used for |
| 1215 |
aligning trampolines. */ |
| 1216 |
#define TRAMPOLINE_ALIGNMENT (TARGET_FDPIC ? 64 : 32) |
| 1217 |
|
| 1218 |
/* Define this macro if trampolines need a special subroutine to do their work. |
| 1219 |
The macro should expand to a series of `asm' statements which will be |
| 1220 |
compiled with GCC. They go in a library function named |
| 1221 |
`__transfer_from_trampoline'. |
| 1222 |
|
| 1223 |
If you need to avoid executing the ordinary prologue code of a compiled C |
| 1224 |
function when you jump to the subroutine, you can do so by placing a special |
| 1225 |
label of your own in the assembler code. Use one `asm' statement to |
| 1226 |
generate an assembler label, and another to make the label global. Then |
| 1227 |
trampolines can use that label to jump directly to your special assembler |
| 1228 |
code. */ |
| 1229 |
|
| 1230 |
#ifdef __FRV_UNDERSCORE__ |
| 1231 |
#define TRAMPOLINE_TEMPLATE_NAME "___trampoline_template" |
| 1232 |
#else |
| 1233 |
#define TRAMPOLINE_TEMPLATE_NAME "__trampoline_template" |
| 1234 |
#endif |
| 1235 |
|
| 1236 |
#define Twrite _write |
| 1237 |
|
| 1238 |
#if ! __FRV_FDPIC__ |
| 1239 |
#define TRANSFER_FROM_TRAMPOLINE \ |
| 1240 |
extern int Twrite (int, const void *, unsigned); \ |
| 1241 |
extern void exit (int); \ |
| 1242 |
\ |
| 1243 |
void \ |
| 1244 |
__trampoline_setup (short * addr, int size, int fnaddr, int sc) \ |
| 1245 |
{ \ |
| 1246 |
extern short __trampoline_template[]; \ |
| 1247 |
short * to = addr; \ |
| 1248 |
short * from = &__trampoline_template[0]; \ |
| 1249 |
int i; \ |
| 1250 |
\ |
| 1251 |
if (size < 20) \ |
| 1252 |
{ \ |
| 1253 |
Twrite (2, "__trampoline_setup bad size\n", \ |
| 1254 |
sizeof ("__trampoline_setup bad size\n") - 1); \ |
| 1255 |
exit (-1); \ |
| 1256 |
} \ |
| 1257 |
\ |
| 1258 |
to[0] = from[0]; \ |
| 1259 |
to[1] = (short)(fnaddr); \ |
| 1260 |
to[2] = from[2]; \ |
| 1261 |
to[3] = (short)(sc); \ |
| 1262 |
to[4] = from[4]; \ |
| 1263 |
to[5] = (short)(fnaddr >> 16); \ |
| 1264 |
to[6] = from[6]; \ |
| 1265 |
to[7] = (short)(sc >> 16); \ |
| 1266 |
to[8] = from[8]; \ |
| 1267 |
to[9] = from[9]; \ |
| 1268 |
\ |
| 1269 |
for (i = 0; i < 20; i++) \ |
| 1270 |
__asm__ volatile ("dcf @(%0,%1)\n\tici @(%0,%1)" :: "r" (to), "r" (i)); \ |
| 1271 |
} \ |
| 1272 |
\ |
| 1273 |
__asm__("\n" \ |
| 1274 |
"\t.globl " TRAMPOLINE_TEMPLATE_NAME "\n" \ |
| 1275 |
"\t.text\n" \ |
| 1276 |
TRAMPOLINE_TEMPLATE_NAME ":\n" \ |
| 1277 |
"\tsetlos #0, gr6\n" /* jump register */ \ |
| 1278 |
"\tsetlos #0, gr7\n" /* static chain */ \ |
| 1279 |
"\tsethi #0, gr6\n" \ |
| 1280 |
"\tsethi #0, gr7\n" \ |
| 1281 |
"\tjmpl @(gr0,gr6)\n"); |
| 1282 |
#else |
| 1283 |
#define TRANSFER_FROM_TRAMPOLINE \ |
| 1284 |
extern int Twrite (int, const void *, unsigned); \ |
| 1285 |
extern void exit (int); \ |
| 1286 |
\ |
| 1287 |
void \ |
| 1288 |
__trampoline_setup (addr, size, fnaddr, sc) \ |
| 1289 |
short * addr; \ |
| 1290 |
int size; \ |
| 1291 |
int fnaddr; \ |
| 1292 |
int sc; \ |
| 1293 |
{ \ |
| 1294 |
extern short __trampoline_template[]; \ |
| 1295 |
short * from = &__trampoline_template[0]; \ |
| 1296 |
int i; \ |
| 1297 |
short **desc = (short **)addr; \ |
| 1298 |
short * to = addr + 4; \ |
| 1299 |
\ |
| 1300 |
if (size != 32) \ |
| 1301 |
{ \ |
| 1302 |
Twrite (2, "__trampoline_setup bad size\n", \ |
| 1303 |
sizeof ("__trampoline_setup bad size\n") - 1); \ |
| 1304 |
exit (-1); \ |
| 1305 |
} \ |
| 1306 |
\ |
| 1307 |
/* Create a function descriptor with the address of the code below \ |
| 1308 |
and NULL as the FDPIC value. We don't need the real GOT value \ |
| 1309 |
here, since we don't use it, so we use NULL, that is just as \ |
| 1310 |
good. */ \ |
| 1311 |
desc[0] = to; \ |
| 1312 |
desc[1] = NULL; \ |
| 1313 |
size -= 8; \ |
| 1314 |
\ |
| 1315 |
to[0] = from[0]; \ |
| 1316 |
to[1] = (short)(fnaddr); \ |
| 1317 |
to[2] = from[2]; \ |
| 1318 |
to[3] = (short)(sc); \ |
| 1319 |
to[4] = from[4]; \ |
| 1320 |
to[5] = (short)(fnaddr >> 16); \ |
| 1321 |
to[6] = from[6]; \ |
| 1322 |
to[7] = (short)(sc >> 16); \ |
| 1323 |
to[8] = from[8]; \ |
| 1324 |
to[9] = from[9]; \ |
| 1325 |
to[10] = from[10]; \ |
| 1326 |
to[11] = from[11]; \ |
| 1327 |
\ |
| 1328 |
for (i = 0; i < size; i++) \ |
| 1329 |
__asm__ volatile ("dcf @(%0,%1)\n\tici @(%0,%1)" :: "r" (to), "r" (i)); \ |
| 1330 |
} \ |
| 1331 |
\ |
| 1332 |
__asm__("\n" \ |
| 1333 |
"\t.globl " TRAMPOLINE_TEMPLATE_NAME "\n" \ |
| 1334 |
"\t.text\n" \ |
| 1335 |
TRAMPOLINE_TEMPLATE_NAME ":\n" \ |
| 1336 |
"\tsetlos #0, gr6\n" /* Jump register. */ \ |
| 1337 |
"\tsetlos #0, gr7\n" /* Static chain. */ \ |
| 1338 |
"\tsethi #0, gr6\n" \ |
| 1339 |
"\tsethi #0, gr7\n" \ |
| 1340 |
"\tldd @(gr6,gr0),gr14\n" \ |
| 1341 |
"\tjmpl @(gr14,gr0)\n" \ |
| 1342 |
); |
| 1343 |
#endif |
| 1344 |
|
| 1345 |
|
| 1346 |
/* Addressing Modes. */ |
| 1347 |
|
| 1348 |
/* A number, the maximum number of registers that can appear in a valid memory |
| 1349 |
address. Note that it is up to you to specify a value equal to the maximum |
| 1350 |
number that `TARGET_LEGITIMATE_ADDRESS_P' would ever accept. */ |
| 1351 |
#define MAX_REGS_PER_ADDRESS 2 |
| 1352 |
|
| 1353 |
/* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for |
| 1354 |
use as a base register. For hard registers, it should always accept those |
| 1355 |
which the hardware permits and reject the others. Whether the macro accepts |
| 1356 |
or rejects pseudo registers must be controlled by `REG_OK_STRICT' as |
| 1357 |
described above. This usually requires two variant definitions, of which |
| 1358 |
`REG_OK_STRICT' controls the one actually used. */ |
| 1359 |
#ifdef REG_OK_STRICT |
| 1360 |
#define REG_OK_FOR_BASE_P(X) GPR_P (REGNO (X)) |
| 1361 |
#else |
| 1362 |
#define REG_OK_FOR_BASE_P(X) GPR_AP_OR_PSEUDO_P (REGNO (X)) |
| 1363 |
#endif |
| 1364 |
|
| 1365 |
/* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for |
| 1366 |
use as an index register. |
| 1367 |
|
| 1368 |
The difference between an index register and a base register is that the |
| 1369 |
index register may be scaled. If an address involves the sum of two |
| 1370 |
registers, neither one of them scaled, then either one may be labeled the |
| 1371 |
"base" and the other the "index"; but whichever labeling is used must fit |
| 1372 |
the machine's constraints of which registers may serve in each capacity. |
| 1373 |
The compiler will try both labelings, looking for one that is valid, and |
| 1374 |
will reload one or both registers only if neither labeling works. */ |
| 1375 |
#define REG_OK_FOR_INDEX_P(X) REG_OK_FOR_BASE_P (X) |
| 1376 |
|
| 1377 |
#define FIND_BASE_TERM frv_find_base_term |
| 1378 |
|
| 1379 |
/* The load-and-update commands allow pre-modification in addresses. |
| 1380 |
The index has to be in a register. */ |
| 1381 |
#define HAVE_PRE_MODIFY_REG 1 |
| 1382 |
|
| 1383 |
|
| 1384 |
/* We define extra CC modes in frv-modes.def so we need a selector. */ |
| 1385 |
|
| 1386 |
#define SELECT_CC_MODE frv_select_cc_mode |
| 1387 |
|
| 1388 |
/* A C expression whose value is one if it is always safe to reverse a |
| 1389 |
comparison whose mode is MODE. If `SELECT_CC_MODE' can ever return MODE for |
| 1390 |
a floating-point inequality comparison, then `REVERSIBLE_CC_MODE (MODE)' |
| 1391 |
must be zero. |
| 1392 |
|
| 1393 |
You need not define this macro if it would always returns zero or if the |
| 1394 |
floating-point format is anything other than `IEEE_FLOAT_FORMAT'. For |
| 1395 |
example, here is the definition used on the SPARC, where floating-point |
| 1396 |
inequality comparisons are always given `CCFPEmode': |
| 1397 |
|
| 1398 |
#define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode) */ |
| 1399 |
|
| 1400 |
/* On frv, don't consider floating point comparisons to be reversible. In |
| 1401 |
theory, fp equality comparisons can be reversible. */ |
| 1402 |
#define REVERSIBLE_CC_MODE(MODE) \ |
| 1403 |
((MODE) == CCmode || (MODE) == CC_UNSmode || (MODE) == CC_NZmode) |
| 1404 |
|
| 1405 |
|
| 1406 |
/* Describing Relative Costs of Operations. */ |
| 1407 |
|
| 1408 |
/* A C expression for the cost of a branch instruction. A value of 1 is the |
| 1409 |
default; other values are interpreted relative to that. */ |
| 1410 |
#define BRANCH_COST(speed_p, predictable_p) frv_branch_cost_int |
| 1411 |
|
| 1412 |
/* Define this macro as a C expression which is nonzero if accessing less than |
| 1413 |
a word of memory (i.e. a `char' or a `short') is no faster than accessing a |
| 1414 |
word of memory, i.e., if such access require more than one instruction or if |
| 1415 |
there is no difference in cost between byte and (aligned) word loads. |
| 1416 |
|
| 1417 |
When this macro is not defined, the compiler will access a field by finding |
| 1418 |
the smallest containing object; when it is defined, a fullword load will be |
| 1419 |
used if alignment permits. Unless bytes accesses are faster than word |
| 1420 |
accesses, using word accesses is preferable since it may eliminate |
| 1421 |
subsequent memory access if subsequent accesses occur to other fields in the |
| 1422 |
same word of the structure, but to different bytes. */ |
| 1423 |
#define SLOW_BYTE_ACCESS 1 |
| 1424 |
|
| 1425 |
/* Define this macro if it is as good or better to call a constant function |
| 1426 |
address than to call an address kept in a register. */ |
| 1427 |
#define NO_FUNCTION_CSE 1 |
| 1428 |
|
| 1429 |
|
| 1430 |
/* Dividing the output into sections. */ |
| 1431 |
|
| 1432 |
/* A C expression whose value is a string containing the assembler operation |
| 1433 |
that should precede instructions and read-only data. Normally `".text"' is |
| 1434 |
right. */ |
| 1435 |
#define TEXT_SECTION_ASM_OP "\t.text" |
| 1436 |
|
| 1437 |
/* A C expression whose value is a string containing the assembler operation to |
| 1438 |
identify the following data as writable initialized data. Normally |
| 1439 |
`".data"' is right. */ |
| 1440 |
#define DATA_SECTION_ASM_OP "\t.data" |
| 1441 |
|
| 1442 |
#define BSS_SECTION_ASM_OP "\t.section .bss,\"aw\"" |
| 1443 |
|
| 1444 |
/* Short Data Support */ |
| 1445 |
#define SDATA_SECTION_ASM_OP "\t.section .sdata,\"aw\"" |
| 1446 |
|
| 1447 |
#undef INIT_SECTION_ASM_OP |
| 1448 |
#undef FINI_SECTION_ASM_OP |
| 1449 |
#define INIT_SECTION_ASM_OP "\t.section .init,\"ax\"" |
| 1450 |
#define FINI_SECTION_ASM_OP "\t.section .fini,\"ax\"" |
| 1451 |
|
| 1452 |
#undef CTORS_SECTION_ASM_OP |
| 1453 |
#undef DTORS_SECTION_ASM_OP |
| 1454 |
#define CTORS_SECTION_ASM_OP "\t.section\t.ctors,\"a\"" |
| 1455 |
#define DTORS_SECTION_ASM_OP "\t.section\t.dtors,\"a\"" |
| 1456 |
|
| 1457 |
/* A C expression whose value is a string containing the assembler operation to |
| 1458 |
switch to the fixup section that records all initialized pointers in a -fpic |
| 1459 |
program so they can be changed program startup time if the program is loaded |
| 1460 |
at a different address than linked for. */ |
| 1461 |
#define FIXUP_SECTION_ASM_OP "\t.section .rofixup,\"a\"" |
| 1462 |
|
| 1463 |
/* Position Independent Code. */ |
| 1464 |
|
| 1465 |
/* A C expression that is nonzero if X is a legitimate immediate operand on the |
| 1466 |
target machine when generating position independent code. You can assume |
| 1467 |
that X satisfies `CONSTANT_P', so you need not check this. You can also |
| 1468 |
assume FLAG_PIC is true, so you need not check it either. You need not |
| 1469 |
define this macro if all constants (including `SYMBOL_REF') can be immediate |
| 1470 |
operands when generating position independent code. */ |
| 1471 |
#define LEGITIMATE_PIC_OPERAND_P(X) \ |
| 1472 |
( GET_CODE (X) == CONST_INT \ |
| 1473 |
|| GET_CODE (X) == CONST_DOUBLE \ |
| 1474 |
|| (GET_CODE (X) == HIGH && GET_CODE (XEXP (X, 0)) == CONST_INT) \ |
| 1475 |
|| got12_operand (X, VOIDmode)) \ |
| 1476 |
|
| 1477 |
|
| 1478 |
/* The Overall Framework of an Assembler File. */ |
| 1479 |
|
| 1480 |
/* A C string constant describing how to begin a comment in the target |
| 1481 |
assembler language. The compiler assumes that the comment will end at the |
| 1482 |
end of the line. */ |
| 1483 |
#define ASM_COMMENT_START ";" |
| 1484 |
|
| 1485 |
/* A C string constant for text to be output before each `asm' statement or |
| 1486 |
group of consecutive ones. Normally this is `"#APP"', which is a comment |
| 1487 |
that has no effect on most assemblers but tells the GNU assembler that it |
| 1488 |
must check the lines that follow for all valid assembler constructs. */ |
| 1489 |
#define ASM_APP_ON "#APP\n" |
| 1490 |
|
| 1491 |
/* A C string constant for text to be output after each `asm' statement or |
| 1492 |
group of consecutive ones. Normally this is `"#NO_APP"', which tells the |
| 1493 |
GNU assembler to resume making the time-saving assumptions that are valid |
| 1494 |
for ordinary compiler output. */ |
| 1495 |
#define ASM_APP_OFF "#NO_APP\n" |
| 1496 |
|
| 1497 |
|
| 1498 |
/* Output of Data. */ |
| 1499 |
|
| 1500 |
/* This is how to output a label to dwarf/dwarf2. */ |
| 1501 |
#define ASM_OUTPUT_DWARF_ADDR(STREAM, LABEL) \ |
| 1502 |
do { \ |
| 1503 |
fprintf (STREAM, "\t.picptr\t"); \ |
| 1504 |
assemble_name (STREAM, LABEL); \ |
| 1505 |
} while (0) |
| 1506 |
|
| 1507 |
/* Whether to emit the gas specific dwarf2 line number support. */ |
| 1508 |
#define DWARF2_ASM_LINE_DEBUG_INFO (TARGET_DEBUG_LOC) |
| 1509 |
|
| 1510 |
/* Output of Uninitialized Variables. */ |
| 1511 |
|
| 1512 |
/* A C statement (sans semicolon) to output to the stdio stream STREAM the |
| 1513 |
assembler definition of a local-common-label named NAME whose size is SIZE |
| 1514 |
bytes. The variable ROUNDED is the size rounded up to whatever alignment |
| 1515 |
the caller wants. |
| 1516 |
|
| 1517 |
Use the expression `assemble_name (STREAM, NAME)' to output the name itself; |
| 1518 |
before and after that, output the additional assembler syntax for defining |
| 1519 |
the name, and a newline. |
| 1520 |
|
| 1521 |
This macro controls how the assembler definitions of uninitialized static |
| 1522 |
variables are output. */ |
| 1523 |
#undef ASM_OUTPUT_LOCAL |
| 1524 |
|
| 1525 |
#undef ASM_OUTPUT_ALIGNED_LOCAL |
| 1526 |
|
| 1527 |
/* This is for final.cc, because it is used by ASM_DECLARE_OBJECT_NAME. */ |
| 1528 |
extern int size_directive_output; |
| 1529 |
|
| 1530 |
/* Like `ASM_OUTPUT_ALIGNED_LOCAL' except that it takes an additional |
| 1531 |
parameter - the DECL of variable to be output, if there is one. |
| 1532 |
This macro can be called with DECL == NULL_TREE. If you define |
| 1533 |
this macro, it is used in place of `ASM_OUTPUT_LOCAL' and |
| 1534 |
`ASM_OUTPUT_ALIGNED_LOCAL', and gives you more flexibility in |
| 1535 |
handling the destination of the variable. */ |
| 1536 |
#undef ASM_OUTPUT_ALIGNED_DECL_LOCAL |
| 1537 |
#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(STREAM, DECL, NAME, SIZE, ALIGN) \ |
| 1538 |
do { \ |
| 1539 |
if ((SIZE) > 0 && (SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value) \ |
| 1540 |
switch_to_section (get_named_section (NULL, ".sbss", 0)); \ |
| 1541 |
else \ |
| 1542 |
switch_to_section (bss_section); \ |
| 1543 |
ASM_OUTPUT_ALIGN (STREAM, floor_log2 ((ALIGN) / BITS_PER_UNIT)); \ |
| 1544 |
ASM_DECLARE_OBJECT_NAME (STREAM, NAME, DECL); \ |
| 1545 |
ASM_OUTPUT_SKIP (STREAM, (SIZE) ? (SIZE) : 1); \ |
| 1546 |
} while (0) |
| 1547 |
|
| 1548 |
|
| 1549 |
/* Output and Generation of Labels. */ |
| 1550 |
|
| 1551 |
/* A C statement (sans semicolon) to output to the stdio stream STREAM the |
| 1552 |
assembler definition of a label named NAME. Use the expression |
| 1553 |
`assemble_name (STREAM, NAME)' to output the name itself; before and after |
| 1554 |
that, output the additional assembler syntax for defining the name, and a |
| 1555 |
newline. */ |
| 1556 |
#define ASM_OUTPUT_LABEL(STREAM, NAME) \ |
| 1557 |
do { \ |
| 1558 |
assemble_name (STREAM, NAME); \ |
| 1559 |
fputs (":\n", STREAM); \ |
| 1560 |
} while (0) |
| 1561 |
|
| 1562 |
/* Globalizing directive for a label. */ |
| 1563 |
#define GLOBAL_ASM_OP "\t.globl " |
| 1564 |
|
| 1565 |
#undef ASM_GENERATE_INTERNAL_LABEL |
| 1566 |
#define ASM_GENERATE_INTERNAL_LABEL(LABEL, PREFIX, NUM) \ |
| 1567 |
do { \ |
| 1568 |
sprintf (LABEL, "*.%s%ld", PREFIX, (long)NUM); \ |
| 1569 |
} while (0) |
| 1570 |
|
| 1571 |
|
| 1572 |
/* Macros Controlling Initialization Routines. */ |
| 1573 |
|
| 1574 |
#undef INIT_SECTION_ASM_OP |
| 1575 |
|
| 1576 |
/* If defined, `main' will call `__main' despite the presence of |
| 1577 |
`INIT_SECTION_ASM_OP'. This macro should be defined for systems where the |
| 1578 |
init section is not actually run automatically, but is still useful for |
| 1579 |
collecting the lists of constructors and destructors. */ |
| 1580 |
#define INVOKE__main |
| 1581 |
|
| 1582 |
/* Output of Assembler Instructions. */ |
| 1583 |
|
| 1584 |
/* A C initializer containing the assembler's names for the machine registers, |
| 1585 |
each one as a C string constant. This is what translates register numbers |
| 1586 |
in the compiler into assembler language. */ |
| 1587 |
#define REGISTER_NAMES \ |
| 1588 |
{ \ |
| 1589 |
"gr0", "sp", "fp", "gr3", "gr4", "gr5", "gr6", "gr7", \ |
| 1590 |
"gr8", "gr9", "gr10", "gr11", "gr12", "gr13", "gr14", "gr15", \ |
| 1591 |
"gr16", "gr17", "gr18", "gr19", "gr20", "gr21", "gr22", "gr23", \ |
| 1592 |
"gr24", "gr25", "gr26", "gr27", "gr28", "gr29", "gr30", "gr31", \ |
| 1593 |
"gr32", "gr33", "gr34", "gr35", "gr36", "gr37", "gr38", "gr39", \ |
| 1594 |
"gr40", "gr41", "gr42", "gr43", "gr44", "gr45", "gr46", "gr47", \ |
| 1595 |
"gr48", "gr49", "gr50", "gr51", "gr52", "gr53", "gr54", "gr55", \ |
| 1596 |
"gr56", "gr57", "gr58", "gr59", "gr60", "gr61", "gr62", "gr63", \ |
| 1597 |
\ |
| 1598 |
"fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7", \ |
| 1599 |
"fr8", "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15", \ |
| 1600 |
"fr16", "fr17", "fr18", "fr19", "fr20", "fr21", "fr22", "fr23", \ |
| 1601 |
"fr24", "fr25", "fr26", "fr27", "fr28", "fr29", "fr30", "fr31", \ |
| 1602 |
"fr32", "fr33", "fr34", "fr35", "fr36", "fr37", "fr38", "fr39", \ |
| 1603 |
"fr40", "fr41", "fr42", "fr43", "fr44", "fr45", "fr46", "fr47", \ |
| 1604 |
"fr48", "fr49", "fr50", "fr51", "fr52", "fr53", "fr54", "fr55", \ |
| 1605 |
"fr56", "fr57", "fr58", "fr59", "fr60", "fr61", "fr62", "fr63", \ |
| 1606 |
\ |
| 1607 |
"fcc0", "fcc1", "fcc2", "fcc3", "icc0", "icc1", "icc2", "icc3", \ |
| 1608 |
"cc0", "cc1", "cc2", "cc3", "cc4", "cc5", "cc6", "cc7", \ |
| 1609 |
"acc0", "acc1", "acc2", "acc3", "acc4", "acc5", "acc6", "acc7", \ |
| 1610 |
"acc8", "acc9", "acc10", "acc11", \ |
| 1611 |
"accg0","accg1","accg2","accg3","accg4","accg5","accg6","accg7", \ |
| 1612 |
"accg8", "accg9", "accg10", "accg11", \ |
| 1613 |
"ap", "lr", "lcr", "iacc0h", "iacc0l" \ |
| 1614 |
} |
| 1615 |
|
| 1616 |
/* Define this macro if you are using an unusual assembler that |
| 1617 |
requires different names for the machine instructions. |
| 1618 |
|
| 1619 |
The definition is a C statement or statements which output an |
| 1620 |
assembler instruction opcode to the stdio stream STREAM. The |
| 1621 |
macro-operand PTR is a variable of type `char *' which points to |
| 1622 |
the opcode name in its "internal" form--the form that is written |
| 1623 |
in the machine description. The definition should output the |
| 1624 |
opcode name to STREAM, performing any translation you desire, and |
| 1625 |
increment the variable PTR to point at the end of the opcode so |
| 1626 |
that it will not be output twice. |
| 1627 |
|
| 1628 |
In fact, your macro definition may process less than the entire |
| 1629 |
opcode name, or more than the opcode name; but if you want to |
| 1630 |
process text that includes `%'-sequences to substitute operands, |
| 1631 |
you must take care of the substitution yourself. Just be sure to |
| 1632 |
increment PTR over whatever text should not be output normally. |
| 1633 |
|
| 1634 |
If you need to look at the operand values, they can be found as the |
| 1635 |
elements of `recog_operand'. |
| 1636 |
|
| 1637 |
If the macro definition does nothing, the instruction is output in |
| 1638 |
the usual way. */ |
| 1639 |
|
| 1640 |
#define ASM_OUTPUT_OPCODE(STREAM, PTR)\ |
| 1641 |
(PTR) = frv_asm_output_opcode (STREAM, PTR) |
| 1642 |
|
| 1643 |
/* If defined, a C statement to be executed just prior to the output |
| 1644 |
of assembler code for INSN, to modify the extracted operands so |
| 1645 |
they will be output differently. |
| 1646 |
|
| 1647 |
Here the argument OPVEC is the vector containing the operands |
| 1648 |
extracted from INSN, and NOPERANDS is the number of elements of |
| 1649 |
the vector which contain meaningful data for this insn. The |
| 1650 |
contents of this vector are what will be used to convert the insn |
| 1651 |
template into assembler code, so you can change the assembler |
| 1652 |
output by changing the contents of the vector. |
| 1653 |
|
| 1654 |
This macro is useful when various assembler syntaxes share a single |
| 1655 |
file of instruction patterns; by defining this macro differently, |
| 1656 |
you can cause a large class of instructions to be output |
| 1657 |
differently (such as with rearranged operands). Naturally, |
| 1658 |
variations in assembler syntax affecting individual insn patterns |
| 1659 |
ought to be handled by writing conditional output routines in |
| 1660 |
those patterns. |
| 1661 |
|
| 1662 |
If this macro is not defined, it is equivalent to a null statement. */ |
| 1663 |
|
| 1664 |
#define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS)\ |
| 1665 |
frv_final_prescan_insn (INSN, OPVEC, NOPERANDS) |
| 1666 |
|
| 1667 |
#undef USER_LABEL_PREFIX |
| 1668 |
#define USER_LABEL_PREFIX "" |
| 1669 |
#define REGISTER_PREFIX "" |
| 1670 |
#define LOCAL_LABEL_PREFIX "." |
| 1671 |
#define IMMEDIATE_PREFIX "#" |
| 1672 |
|
| 1673 |
|
| 1674 |
/* Output of dispatch tables. */ |
| 1675 |
|
| 1676 |
/* This macro should be provided on machines where the addresses in a dispatch |
| 1677 |
table are relative to the table's own address. |
| 1678 |
|
| 1679 |
The definition should be a C statement to output to the stdio stream STREAM |
| 1680 |
an assembler pseudo-instruction to generate a difference between two labels. |
| 1681 |
VALUE and REL are the numbers of two internal labels. The definitions of |
| 1682 |
these labels are output using `(*targetm.asm_out.internal_label)', and they must be |
| 1683 |
printed in the same way here. For example, |
| 1684 |
|
| 1685 |
fprintf (STREAM, "\t.word L%d-L%d\n", VALUE, REL) */ |
| 1686 |
#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \ |
| 1687 |
fprintf (STREAM, "\t.word .L%d-.L%d\n", VALUE, REL) |
| 1688 |
|
| 1689 |
/* This macro should be provided on machines where the addresses in a dispatch |
| 1690 |
table are absolute. |
| 1691 |
|
| 1692 |
The definition should be a C statement to output to the stdio stream STREAM |
| 1693 |
an assembler pseudo-instruction to generate a reference to a label. VALUE |
| 1694 |
is the number of an internal label whose definition is output using |
| 1695 |
`(*targetm.asm_out.internal_label)'. For example, |
| 1696 |
|
| 1697 |
fprintf (STREAM, "\t.word L%d\n", VALUE) */ |
| 1698 |
#define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \ |
| 1699 |
fprintf (STREAM, "\t.word .L%d\n", VALUE) |
| 1700 |
|
| 1701 |
#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic) |
| 1702 |
|
| 1703 |
/* Assembler Commands for Exception Regions. */ |
| 1704 |
|
| 1705 |
/* Define this macro to 0 if your target supports DWARF 2 frame unwind |
| 1706 |
information, but it does not yet work with exception handling. Otherwise, |
| 1707 |
if your target supports this information (if it defines |
| 1708 |
`INCOMING_RETURN_ADDR_RTX' and `OBJECT_FORMAT_ELF'), GCC will provide |
| 1709 |
a default definition of 1. |
| 1710 |
|
| 1711 |
If this macro is defined to 1, the DWARF 2 unwinder will be the default |
| 1712 |
exception handling mechanism; otherwise, setjmp/longjmp will be used by |
| 1713 |
default. |
| 1714 |
|
| 1715 |
If this macro is defined to anything, the DWARF 2 unwinder will be used |
| 1716 |
instead of inline unwinders and __unwind_function in the non-setjmp case. */ |
| 1717 |
#define DWARF2_UNWIND_INFO 1 |
| 1718 |
|
| 1719 |
#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (LR_REGNO) |
| 1720 |
|
| 1721 |
/* Assembler Commands for Alignment. */ |
| 1722 |
|
| 1723 |
#undef ASM_OUTPUT_SKIP |
| 1724 |
#define ASM_OUTPUT_SKIP(STREAM, NBYTES) \ |
| 1725 |
fprintf (STREAM, "\t.zero\t%u\n", (int)(NBYTES)) |
| 1726 |
|
| 1727 |
/* A C statement to output to the stdio stream STREAM an assembler command to |
| 1728 |
advance the location counter to a multiple of 2 to the POWER bytes. POWER |
| 1729 |
will be a C expression of type `int'. */ |
| 1730 |
#define ASM_OUTPUT_ALIGN(STREAM, POWER) \ |
| 1731 |
fprintf ((STREAM), "\t.p2align %d\n", (POWER)) |
| 1732 |
|
| 1733 |
/* Inside the text section, align with unpacked nops rather than zeros. */ |
| 1734 |
#define ASM_OUTPUT_ALIGN_WITH_NOP(STREAM, POWER) \ |
| 1735 |
fprintf ((STREAM), "\t.p2alignl %d,0x80880000\n", (POWER)) |
| 1736 |
|
| 1737 |
/* Macros Affecting all Debug Formats. */ |
| 1738 |
|
| 1739 |
/* A C expression that returns the debugger register number for the compiler |
| 1740 |
register number REGNO. In simple cases, the value of this expression may be |
| 1741 |
REGNO itself. But sometimes there are some registers that the compiler |
| 1742 |
knows about and debugger does not, or vice versa. In such cases, some register |
| 1743 |
may need to have one number in the compiler and another for debugger. |
| 1744 |
|
| 1745 |
If two registers have consecutive numbers inside GCC, and they can be |
| 1746 |
used as a pair to hold a multiword value, then they *must* have consecutive |
| 1747 |
numbers after renumbering with `DEBUGGER_REGNO'. Otherwise, debuggers |
| 1748 |
will be unable to access such a pair, because they expect register pairs to |
| 1749 |
be consecutive in their own numbering scheme. |
| 1750 |
|
| 1751 |
If you find yourself defining `DEBUGGER_REGNO' in way that does not |
| 1752 |
preserve register pairs, then what you must do instead is redefine the |
| 1753 |
actual register numbering scheme. |
| 1754 |
|
| 1755 |
This declaration is required. */ |
| 1756 |
#define DEBUGGER_REGNO(REGNO) (REGNO) |
| 1757 |
|
| 1758 |
#undef PREFERRED_DEBUGGING_TYPE |
| 1759 |
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG |
| 1760 |
|
| 1761 |
/* Miscellaneous Parameters. */ |
| 1762 |
|
| 1763 |
/* An alias for a machine mode name. This is the machine mode that elements of |
| 1764 |
a jump-table should have. */ |
| 1765 |
#define CASE_VECTOR_MODE SImode |
| 1766 |
|
| 1767 |
/* Define this macro if operations between registers with integral mode smaller |
| 1768 |
than a word are always performed on the entire register. Most RISC machines |
| 1769 |
have this property and most CISC machines do not. */ |
| 1770 |
#define WORD_REGISTER_OPERATIONS 1 |
| 1771 |
|
| 1772 |
/* Define this macro to be a C expression indicating when insns that read |
| 1773 |
memory in MODE, an integral mode narrower than a word, set the bits outside |
| 1774 |
of MODE to be either the sign-extension or the zero-extension of the data |
| 1775 |
read. Return `SIGN_EXTEND' for values of MODE for which the insn |
| 1776 |
sign-extends, `ZERO_EXTEND' for which it zero-extends, and `UNKNOWN' for other |
| 1777 |
modes. |
| 1778 |
|
| 1779 |
This macro is not called with MODE non-integral or with a width greater than |
| 1780 |
or equal to `BITS_PER_WORD', so you may return any value in this case. Do |
| 1781 |
not define this macro if it would always return `UNKNOWN'. On machines where |
| 1782 |
this macro is defined, you will normally define it as the constant |
| 1783 |
`SIGN_EXTEND' or `ZERO_EXTEND'. */ |
| 1784 |
#define LOAD_EXTEND_OP(MODE) SIGN_EXTEND |
| 1785 |
|
| 1786 |
/* Define if loading short immediate values into registers sign extends. */ |
| 1787 |
#define SHORT_IMMEDIATES_SIGN_EXTEND 1 |
| 1788 |
|
| 1789 |
/* The maximum number of bytes that a single instruction can move quickly from |
| 1790 |
memory to memory. */ |
| 1791 |
#define MOVE_MAX 8 |
| 1792 |
|
| 1793 |
/* An alias for the machine mode for pointers. On most machines, define this |
| 1794 |
to be the integer mode corresponding to the width of a hardware pointer; |
| 1795 |
`SImode' on 32-bit machine or `DImode' on 64-bit machines. On some machines |
| 1796 |
you must define this to be one of the partial integer modes, such as |
| 1797 |
`PSImode'. |
| 1798 |
|
| 1799 |
The width of `Pmode' must be at least as large as the value of |
| 1800 |
`POINTER_SIZE'. If it is not equal, you must define the macro |
| 1801 |
`POINTERS_EXTEND_UNSIGNED' to specify how pointers are extended to `Pmode'. */ |
| 1802 |
#define Pmode SImode |
| 1803 |
|
| 1804 |
/* An alias for the machine mode used for memory references to functions being |
| 1805 |
called, in `call' RTL expressions. On most machines this should be |
| 1806 |
`QImode'. */ |
| 1807 |
#define FUNCTION_MODE QImode |
| 1808 |
|
| 1809 |
/* A C expression for the maximum number of instructions to execute via |
| 1810 |
conditional execution instructions instead of a branch. A value of |
| 1811 |
BRANCH_COST+1 is the default if the machine does not use |
| 1812 |
cc0, and 1 if it does use cc0. */ |
| 1813 |
#define MAX_CONDITIONAL_EXECUTE frv_condexec_insns |
| 1814 |
|
| 1815 |
/* A C expression to modify the code described by the conditional if |
| 1816 |
information CE_INFO, possibly updating the tests in TRUE_EXPR, and |
| 1817 |
FALSE_EXPR for converting if-then and if-then-else code to conditional |
| 1818 |
instructions. Set either TRUE_EXPR or FALSE_EXPR to a null pointer if the |
| 1819 |
tests cannot be converted. */ |
| 1820 |
#define IFCVT_MODIFY_TESTS(CE_INFO, TRUE_EXPR, FALSE_EXPR) \ |
| 1821 |
frv_ifcvt_modify_tests (CE_INFO, &TRUE_EXPR, &FALSE_EXPR) |
| 1822 |
|
| 1823 |
/* A C expression to modify the code described by the conditional if |
| 1824 |
information CE_INFO, for the basic block BB, possibly updating the tests in |
| 1825 |
TRUE_EXPR, and FALSE_EXPR for converting the && and || parts of if-then or |
| 1826 |
if-then-else code to conditional instructions. OLD_TRUE and OLD_FALSE are |
| 1827 |
the previous tests. Set either TRUE_EXPR or FALSE_EXPR to a null pointer if |
| 1828 |
the tests cannot be converted. */ |
| 1829 |
#define IFCVT_MODIFY_MULTIPLE_TESTS(CE_INFO, BB, TRUE_EXPR, FALSE_EXPR) \ |
| 1830 |
frv_ifcvt_modify_multiple_tests (CE_INFO, BB, &TRUE_EXPR, &FALSE_EXPR) |
| 1831 |
|
| 1832 |
/* A C expression to modify the code described by the conditional if |
| 1833 |
information CE_INFO with the new PATTERN in INSN. If PATTERN is a null |
| 1834 |
pointer after the IFCVT_MODIFY_INSN macro executes, it is assumed that that |
| 1835 |
insn cannot be converted to be executed conditionally. */ |
| 1836 |
#define IFCVT_MODIFY_INSN(CE_INFO, PATTERN, INSN) \ |
| 1837 |
(PATTERN) = frv_ifcvt_modify_insn (CE_INFO, PATTERN, INSN) |
| 1838 |
|
| 1839 |
/* A C expression to perform any final machine dependent modifications in |
| 1840 |
converting code to conditional execution in the code described by the |
| 1841 |
conditional if information CE_INFO. */ |
| 1842 |
#define IFCVT_MODIFY_FINAL(CE_INFO) frv_ifcvt_modify_final (CE_INFO) |
| 1843 |
|
| 1844 |
/* A C expression to cancel any machine dependent modifications in converting |
| 1845 |
code to conditional execution in the code described by the conditional if |
| 1846 |
information CE_INFO. */ |
| 1847 |
#define IFCVT_MODIFY_CANCEL(CE_INFO) frv_ifcvt_modify_cancel (CE_INFO) |
| 1848 |
|
| 1849 |
/* Initialize the machine-specific static data for if-conversion. */ |
| 1850 |
#define IFCVT_MACHDEP_INIT(CE_INFO) frv_ifcvt_machdep_init (CE_INFO) |
| 1851 |
|
| 1852 |
/* The definition of the following macro results in that the 2nd jump |
| 1853 |
optimization (after the 2nd insn scheduling) is minimal. It is |
| 1854 |
necessary to define when start cycle marks of insns (TImode is used |
| 1855 |
for this) is used for VLIW insn packing. Some jump optimizations |
| 1856 |
make such marks invalid. These marks are corrected for some |
| 1857 |
(minimal) optimizations. ??? Probably the macro is temporary. |
| 1858 |
Final solution could making the 2nd jump optimizations before the |
| 1859 |
2nd instruction scheduling or corrections of the marks for all jump |
| 1860 |
optimizations. Although some jump optimizations are actually |
| 1861 |
deoptimizations for VLIW (super-scalar) processors. */ |
| 1862 |
|
| 1863 |
#define MINIMAL_SECOND_JUMP_OPTIMIZATION |
| 1864 |
|
| 1865 |
|
| 1866 |
/* If the following macro is defined and nonzero and deterministic |
| 1867 |
finite state automata are used for pipeline hazard recognition, we |
| 1868 |
will try to exchange insns in queue ready to improve the schedule. |
| 1869 |
The more macro value, the more tries will be made. */ |
| 1870 |
#define FIRST_CYCLE_MULTIPASS_SCHEDULING 1 |
| 1871 |
|
| 1872 |
/* The following macro is used only when value of |
| 1873 |
FIRST_CYCLE_MULTIPASS_SCHEDULING is nonzero. The more macro value, |
| 1874 |
the more tries will be made to choose better schedule. If the |
| 1875 |
macro value is zero or negative there will be no multi-pass |
| 1876 |
scheduling. */ |
| 1877 |
#define FIRST_CYCLE_MULTIPASS_SCHEDULING_LOOKAHEAD frv_sched_lookahead |
| 1878 |
|
| 1879 |
enum frv_builtins |
| 1880 |
{ |
| 1881 |
FRV_BUILTIN_MAND, |
| 1882 |
FRV_BUILTIN_MOR, |
| 1883 |
FRV_BUILTIN_MXOR, |
| 1884 |
FRV_BUILTIN_MNOT, |
| 1885 |
FRV_BUILTIN_MAVEH, |
| 1886 |
FRV_BUILTIN_MSATHS, |
| 1887 |
FRV_BUILTIN_MSATHU, |
| 1888 |
FRV_BUILTIN_MADDHSS, |
| 1889 |
FRV_BUILTIN_MADDHUS, |
| 1890 |
FRV_BUILTIN_MSUBHSS, |
| 1891 |
FRV_BUILTIN_MSUBHUS, |
| 1892 |
FRV_BUILTIN_MPACKH, |
| 1893 |
FRV_BUILTIN_MQADDHSS, |
| 1894 |
FRV_BUILTIN_MQADDHUS, |
| 1895 |
FRV_BUILTIN_MQSUBHSS, |
| 1896 |
FRV_BUILTIN_MQSUBHUS, |
| 1897 |
FRV_BUILTIN_MUNPACKH, |
| 1898 |
FRV_BUILTIN_MDPACKH, |
| 1899 |
FRV_BUILTIN_MBTOH, |
| 1900 |
FRV_BUILTIN_MHTOB, |
| 1901 |
FRV_BUILTIN_MCOP1, |
| 1902 |
FRV_BUILTIN_MCOP2, |
| 1903 |
FRV_BUILTIN_MROTLI, |
| 1904 |
FRV_BUILTIN_MROTRI, |
| 1905 |
FRV_BUILTIN_MWCUT, |
| 1906 |
FRV_BUILTIN_MSLLHI, |
| 1907 |
FRV_BUILTIN_MSRLHI, |
| 1908 |
FRV_BUILTIN_MSRAHI, |
| 1909 |
FRV_BUILTIN_MEXPDHW, |
| 1910 |
FRV_BUILTIN_MEXPDHD, |
| 1911 |
FRV_BUILTIN_MMULHS, |
| 1912 |
FRV_BUILTIN_MMULHU, |
| 1913 |
FRV_BUILTIN_MMULXHS, |
| 1914 |
FRV_BUILTIN_MMULXHU, |
| 1915 |
FRV_BUILTIN_MMACHS, |
| 1916 |
FRV_BUILTIN_MMACHU, |
| 1917 |
FRV_BUILTIN_MMRDHS, |
| 1918 |
FRV_BUILTIN_MMRDHU, |
| 1919 |
FRV_BUILTIN_MQMULHS, |
| 1920 |
FRV_BUILTIN_MQMULHU, |
| 1921 |
FRV_BUILTIN_MQMULXHU, |
| 1922 |
FRV_BUILTIN_MQMULXHS, |
| 1923 |
FRV_BUILTIN_MQMACHS, |
| 1924 |
FRV_BUILTIN_MQMACHU, |
| 1925 |
FRV_BUILTIN_MCPXRS, |
| 1926 |
FRV_BUILTIN_MCPXRU, |
| 1927 |
FRV_BUILTIN_MCPXIS, |
| 1928 |
FRV_BUILTIN_MCPXIU, |
| 1929 |
FRV_BUILTIN_MQCPXRS, |
| 1930 |
FRV_BUILTIN_MQCPXRU, |
| 1931 |
FRV_BUILTIN_MQCPXIS, |
| 1932 |
FRV_BUILTIN_MQCPXIU, |
| 1933 |
FRV_BUILTIN_MCUT, |
| 1934 |
FRV_BUILTIN_MCUTSS, |
| 1935 |
FRV_BUILTIN_MWTACC, |
| 1936 |
FRV_BUILTIN_MWTACCG, |
| 1937 |
FRV_BUILTIN_MRDACC, |
| 1938 |
FRV_BUILTIN_MRDACCG, |
| 1939 |
FRV_BUILTIN_MTRAP, |
| 1940 |
FRV_BUILTIN_MCLRACC, |
| 1941 |
FRV_BUILTIN_MCLRACCA, |
| 1942 |
FRV_BUILTIN_MDUNPACKH, |
| 1943 |
FRV_BUILTIN_MBTOHE, |
| 1944 |
FRV_BUILTIN_MQXMACHS, |
| 1945 |
FRV_BUILTIN_MQXMACXHS, |
| 1946 |
FRV_BUILTIN_MQMACXHS, |
| 1947 |
FRV_BUILTIN_MADDACCS, |
| 1948 |
FRV_BUILTIN_MSUBACCS, |
| 1949 |
FRV_BUILTIN_MASACCS, |
| 1950 |
FRV_BUILTIN_MDADDACCS, |
| 1951 |
FRV_BUILTIN_MDSUBACCS, |
| 1952 |
FRV_BUILTIN_MDASACCS, |
| 1953 |
FRV_BUILTIN_MABSHS, |
| 1954 |
FRV_BUILTIN_MDROTLI, |
| 1955 |
FRV_BUILTIN_MCPLHI, |
| 1956 |
FRV_BUILTIN_MCPLI, |
| 1957 |
FRV_BUILTIN_MDCUTSSI, |
| 1958 |
FRV_BUILTIN_MQSATHS, |
| 1959 |
FRV_BUILTIN_MQLCLRHS, |
| 1960 |
FRV_BUILTIN_MQLMTHS, |
| 1961 |
FRV_BUILTIN_MQSLLHI, |
| 1962 |
FRV_BUILTIN_MQSRAHI, |
| 1963 |
FRV_BUILTIN_MHSETLOS, |
| 1964 |
FRV_BUILTIN_MHSETLOH, |
| 1965 |
FRV_BUILTIN_MHSETHIS, |
| 1966 |
FRV_BUILTIN_MHSETHIH, |
| 1967 |
FRV_BUILTIN_MHDSETS, |
| 1968 |
FRV_BUILTIN_MHDSETH, |
| 1969 |
FRV_BUILTIN_SMUL, |
| 1970 |
FRV_BUILTIN_UMUL, |
| 1971 |
FRV_BUILTIN_PREFETCH0, |
| 1972 |
FRV_BUILTIN_PREFETCH, |
| 1973 |
FRV_BUILTIN_SMASS, |
| 1974 |
FRV_BUILTIN_SMSSS, |
| 1975 |
FRV_BUILTIN_SMU, |
| 1976 |
FRV_BUILTIN_SCUTSS, |
| 1977 |
FRV_BUILTIN_ADDSS, |
| 1978 |
FRV_BUILTIN_SUBSS, |
| 1979 |
FRV_BUILTIN_SLASS, |
| 1980 |
FRV_BUILTIN_IACCreadll, |
| 1981 |
FRV_BUILTIN_IACCreadl, |
| 1982 |
FRV_BUILTIN_IACCsetll, |
| 1983 |
FRV_BUILTIN_IACCsetl, |
| 1984 |
FRV_BUILTIN_SCAN, |
| 1985 |
FRV_BUILTIN_READ8, |
| 1986 |
FRV_BUILTIN_READ16, |
| 1987 |
FRV_BUILTIN_READ32, |
| 1988 |
FRV_BUILTIN_READ64, |
| 1989 |
FRV_BUILTIN_WRITE8, |
| 1990 |
FRV_BUILTIN_WRITE16, |
| 1991 |
FRV_BUILTIN_WRITE32, |
| 1992 |
FRV_BUILTIN_WRITE64 |
| 1993 |
}; |
| 1994 |
#define FRV_BUILTIN_FIRST_NONMEDIA FRV_BUILTIN_SMUL |
| 1995 |
|
| 1996 |
/* Enable prototypes on the call rtl functions. */ |
| 1997 |
#define MD_CALL_PROTOTYPES 1 |
| 1998 |
|
| 1999 |
#define CPU_UNITS_QUERY 1 |
| 2000 |
|
| 2001 |
#endif /* __FRV_H__ */ |