| 1 |
/* Definitions of target machine for GNU compiler, Renesas M32R cpu. |
| 2 |
Copyright (C) 1996-2025 Free Software Foundation, Inc. |
| 3 |
|
| 4 |
This file is part of GCC. |
| 5 |
|
| 6 |
GCC is free software; you can redistribute it and/or modify it |
| 7 |
under the terms of the GNU General Public License as published |
| 8 |
by the Free Software Foundation; either version 3, or (at your |
| 9 |
option) any later version. |
| 10 |
|
| 11 |
GCC is distributed in the hope that it will be useful, but WITHOUT |
| 12 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 13 |
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
| 14 |
License for more details. |
| 15 |
|
| 16 |
You should have received a copy of the GNU General Public License |
| 17 |
along with GCC; see the file COPYING3. If not see |
| 18 |
<http://www.gnu.org/licenses/>. */ |
| 19 |
|
| 20 |
/* Things to do: |
| 21 |
- longlong.h? |
| 22 |
*/ |
| 23 |
|
| 24 |
#undef SIZE_TYPE |
| 25 |
#undef PTRDIFF_TYPE |
| 26 |
#undef WCHAR_TYPE |
| 27 |
#undef WCHAR_TYPE_SIZE |
| 28 |
#undef CPP_SPEC |
| 29 |
#undef ASM_SPEC |
| 30 |
#undef LINK_SPEC |
| 31 |
#undef STARTFILE_SPEC |
| 32 |
#undef ENDFILE_SPEC |
| 33 |
|
| 34 |
#undef ASM_APP_ON |
| 35 |
#undef ASM_APP_OFF |
| 36 |
|
| 37 |
|
| 38 |
/* M32R/X overrides. */ |
| 39 |
|
| 40 |
/* Additional flags for the preprocessor. */ |
| 41 |
#define CPP_CPU_SPEC "%{m32rx:-D__M32RX__ -D__m32rx__ -U__M32R2__ -U__m32r2__} \ |
| 42 |
%{m32r2:-D__M32R2__ -D__m32r2__ -U__M32RX__ -U__m32rx__} \ |
| 43 |
%{m32r:-U__M32RX__ -U__m32rx__ -U__M32R2__ -U__m32r2__} \ |
| 44 |
" |
| 45 |
|
| 46 |
/* Assembler switches. */ |
| 47 |
#define ASM_CPU_SPEC \ |
| 48 |
"%{m32r} %{m32rx} %{m32r2} %{!O0: %{O*: -O}} --no-warn-explicit-parallel-conflicts" |
| 49 |
|
| 50 |
/* Use m32rx specific crt0/crtinit/crtfini files. */ |
| 51 |
#define STARTFILE_CPU_SPEC "%{!shared:crt0.o%s} %{m32rx:m32rx/crtinit.o%s} %{!m32rx:crtinit.o%s}" |
| 52 |
#define ENDFILE_CPU_SPEC "-lgloss %{m32rx:m32rx/crtfini.o%s} %{!m32rx:crtfini.o%s}" |
| 53 |
|
| 54 |
/* Define this macro as a C expression for the initializer of an array of |
| 55 |
strings to tell the driver program which options are defaults for this |
| 56 |
target and thus do not need to be handled specially when using |
| 57 |
`MULTILIB_OPTIONS'. */ |
| 58 |
#define SUBTARGET_MULTILIB_DEFAULTS , "m32r" |
| 59 |
|
| 60 |
/* Number of additional registers the subtarget defines. */ |
| 61 |
#define SUBTARGET_NUM_REGISTERS 1 |
| 62 |
|
| 63 |
/* 1 for registers that cannot be allocated. */ |
| 64 |
#define SUBTARGET_FIXED_REGISTERS , 1 |
| 65 |
|
| 66 |
/* 1 for registers that are not available across function calls. */ |
| 67 |
#define SUBTARGET_CALL_USED_REGISTERS , 1 |
| 68 |
|
| 69 |
/* Order to allocate model specific registers. */ |
| 70 |
#define SUBTARGET_REG_ALLOC_ORDER , 19 |
| 71 |
|
| 72 |
/* Registers which are accumulators. */ |
| 73 |
#define SUBTARGET_REG_CLASS_ACCUM 0x80000 |
| 74 |
|
| 75 |
/* All registers added. */ |
| 76 |
#define SUBTARGET_REG_CLASS_ALL SUBTARGET_REG_CLASS_ACCUM |
| 77 |
|
| 78 |
/* Additional accumulator registers. */ |
| 79 |
#define SUBTARGET_ACCUM_P(REGNO) ((REGNO) == 19) |
| 80 |
|
| 81 |
/* Define additional register names. */ |
| 82 |
#define SUBTARGET_REGISTER_NAMES , "a1" |
| 83 |
/* end M32R/X overrides. */ |
| 84 |
|
| 85 |
/* Names to predefine in the preprocessor for this target machine. */ |
| 86 |
/* __M32R__ is defined by the existing compiler so we use that. */ |
| 87 |
#define TARGET_CPU_CPP_BUILTINS() \ |
| 88 |
do \ |
| 89 |
{ \ |
| 90 |
builtin_define ("__M32R__"); \ |
| 91 |
builtin_define ("__m32r__"); \ |
| 92 |
builtin_assert ("cpu=m32r"); \ |
| 93 |
builtin_assert ("machine=m32r"); \ |
| 94 |
builtin_define (TARGET_BIG_ENDIAN \ |
| 95 |
? "__BIG_ENDIAN__" : "__LITTLE_ENDIAN__"); \ |
| 96 |
} \ |
| 97 |
while (0) |
| 98 |
|
| 99 |
/* This macro defines names of additional specifications to put in the specs |
| 100 |
that can be used in various specifications like CC1_SPEC. Its definition |
| 101 |
is an initializer with a subgrouping for each command option. |
| 102 |
|
| 103 |
Each subgrouping contains a string constant, that defines the |
| 104 |
specification name, and a string constant that used by the GCC driver |
| 105 |
program. |
| 106 |
|
| 107 |
Do not define this macro if it does not need to do anything. */ |
| 108 |
|
| 109 |
#ifndef SUBTARGET_EXTRA_SPECS |
| 110 |
#define SUBTARGET_EXTRA_SPECS |
| 111 |
#endif |
| 112 |
|
| 113 |
#ifndef ASM_CPU_SPEC |
| 114 |
#define ASM_CPU_SPEC "" |
| 115 |
#endif |
| 116 |
|
| 117 |
#ifndef CPP_CPU_SPEC |
| 118 |
#define CPP_CPU_SPEC "" |
| 119 |
#endif |
| 120 |
|
| 121 |
#ifndef CC1_CPU_SPEC |
| 122 |
#define CC1_CPU_SPEC "" |
| 123 |
#endif |
| 124 |
|
| 125 |
#ifndef LINK_CPU_SPEC |
| 126 |
#define LINK_CPU_SPEC "" |
| 127 |
#endif |
| 128 |
|
| 129 |
#ifndef STARTFILE_CPU_SPEC |
| 130 |
#define STARTFILE_CPU_SPEC "%{!shared:crt0.o%s} crtinit.o%s" |
| 131 |
#endif |
| 132 |
|
| 133 |
#ifndef ENDFILE_CPU_SPEC |
| 134 |
#define ENDFILE_CPU_SPEC "-lgloss crtfini.o%s" |
| 135 |
#endif |
| 136 |
|
| 137 |
#ifndef RELAX_SPEC |
| 138 |
#if 0 /* Not supported yet. */ |
| 139 |
#define RELAX_SPEC "%{mrelax:-relax}" |
| 140 |
#else |
| 141 |
#define RELAX_SPEC "" |
| 142 |
#endif |
| 143 |
#endif |
| 144 |
|
| 145 |
#define EXTRA_SPECS \ |
| 146 |
{ "asm_cpu", ASM_CPU_SPEC }, \ |
| 147 |
{ "cpp_cpu", CPP_CPU_SPEC }, \ |
| 148 |
{ "cc1_cpu", CC1_CPU_SPEC }, \ |
| 149 |
{ "link_cpu", LINK_CPU_SPEC }, \ |
| 150 |
{ "startfile_cpu", STARTFILE_CPU_SPEC }, \ |
| 151 |
{ "endfile_cpu", ENDFILE_CPU_SPEC }, \ |
| 152 |
{ "relax", RELAX_SPEC }, \ |
| 153 |
SUBTARGET_EXTRA_SPECS |
| 154 |
|
| 155 |
#define CPP_SPEC "%(cpp_cpu)" |
| 156 |
|
| 157 |
#undef CC1_SPEC |
| 158 |
#define CC1_SPEC "%{G*} %(cc1_cpu)" |
| 159 |
|
| 160 |
/* Options to pass on to the assembler. */ |
| 161 |
#undef ASM_SPEC |
| 162 |
#define ASM_SPEC "%(asm_cpu) %(relax) %{" FPIE_OR_FPIC_SPEC ":-K PIC}" |
| 163 |
|
| 164 |
#define LINK_SPEC "%{v} %(link_cpu) %(relax)" |
| 165 |
|
| 166 |
#undef STARTFILE_SPEC |
| 167 |
#define STARTFILE_SPEC "%(startfile_cpu)" |
| 168 |
|
| 169 |
#undef ENDFILE_SPEC |
| 170 |
#define ENDFILE_SPEC "%(endfile_cpu)" |
| 171 |
|
| 172 |
#undef LIB_SPEC |
| 173 |
|
| 174 |
/* Run-time compilation parameters selecting different hardware subsets. */ |
| 175 |
|
| 176 |
#define TARGET_M32R (! TARGET_M32RX && ! TARGET_M32R2) |
| 177 |
|
| 178 |
#ifndef TARGET_LITTLE_ENDIAN |
| 179 |
#define TARGET_LITTLE_ENDIAN 0 |
| 180 |
#endif |
| 181 |
#define TARGET_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN) |
| 182 |
|
| 183 |
/* This defaults us to m32r. */ |
| 184 |
#ifndef TARGET_CPU_DEFAULT |
| 185 |
#define TARGET_CPU_DEFAULT 0 |
| 186 |
#endif |
| 187 |
|
| 188 |
#ifndef M32R_OPTS_H |
| 189 |
#include "config/m32r/m32r-opts.h" |
| 190 |
#endif |
| 191 |
|
| 192 |
/* Define this macro as a C expression for the initializer of an array of |
| 193 |
strings to tell the driver program which options are defaults for this |
| 194 |
target and thus do not need to be handled specially when using |
| 195 |
`MULTILIB_OPTIONS'. */ |
| 196 |
#ifndef SUBTARGET_MULTILIB_DEFAULTS |
| 197 |
#define SUBTARGET_MULTILIB_DEFAULTS |
| 198 |
#endif |
| 199 |
|
| 200 |
#ifndef MULTILIB_DEFAULTS |
| 201 |
#define MULTILIB_DEFAULTS { "mmodel=small" SUBTARGET_MULTILIB_DEFAULTS } |
| 202 |
#endif |
| 203 |
|
| 204 |
#ifndef SUBTARGET_OVERRIDE_OPTIONS |
| 205 |
#define SUBTARGET_OVERRIDE_OPTIONS |
| 206 |
#endif |
| 207 |
|
| 208 |
/* Target machine storage layout. */ |
| 209 |
|
| 210 |
/* Define this if most significant bit is lowest numbered |
| 211 |
in instructions that operate on numbered bit-fields. */ |
| 212 |
#define BITS_BIG_ENDIAN 1 |
| 213 |
|
| 214 |
/* Define this if most significant byte of a word is the lowest numbered. */ |
| 215 |
#define BYTES_BIG_ENDIAN (TARGET_LITTLE_ENDIAN == 0) |
| 216 |
|
| 217 |
/* Define this if most significant word of a multiword number is the lowest |
| 218 |
numbered. */ |
| 219 |
#define WORDS_BIG_ENDIAN (TARGET_LITTLE_ENDIAN == 0) |
| 220 |
|
| 221 |
/* Width of a word, in units (bytes). */ |
| 222 |
#define UNITS_PER_WORD 4 |
| 223 |
|
| 224 |
/* Define this macro if it is advisable to hold scalars in registers |
| 225 |
in a wider mode than that declared by the program. In such cases, |
| 226 |
the value is constrained to be within the bounds of the declared |
| 227 |
type, but kept valid in the wider mode. The signedness of the |
| 228 |
extension may differ from that of the type. */ |
| 229 |
#define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \ |
| 230 |
if (GET_MODE_CLASS (MODE) == MODE_INT \ |
| 231 |
&& GET_MODE_SIZE (MODE) < UNITS_PER_WORD) \ |
| 232 |
{ \ |
| 233 |
(MODE) = SImode; \ |
| 234 |
} |
| 235 |
|
| 236 |
/* Allocation boundary (in *bits*) for storing arguments in argument list. */ |
| 237 |
#define PARM_BOUNDARY 32 |
| 238 |
|
| 239 |
/* Boundary (in *bits*) on which stack pointer should be aligned. */ |
| 240 |
#define STACK_BOUNDARY 32 |
| 241 |
|
| 242 |
/* ALIGN FRAMES on word boundaries */ |
| 243 |
#define M32R_STACK_ALIGN(LOC) (((LOC) + 3) & ~ 3) |
| 244 |
|
| 245 |
/* Allocation boundary (in *bits*) for the code of a function. */ |
| 246 |
#define FUNCTION_BOUNDARY 32 |
| 247 |
|
| 248 |
/* Alignment of field after `int : 0' in a structure. */ |
| 249 |
#define EMPTY_FIELD_BOUNDARY 32 |
| 250 |
|
| 251 |
/* Every structure's size must be a multiple of this. */ |
| 252 |
#define STRUCTURE_SIZE_BOUNDARY 8 |
| 253 |
|
| 254 |
/* A bit-field declared as `int' forces `int' alignment for the struct. */ |
| 255 |
#define PCC_BITFIELD_TYPE_MATTERS 1 |
| 256 |
|
| 257 |
/* No data type wants to be aligned rounder than this. */ |
| 258 |
#define BIGGEST_ALIGNMENT 32 |
| 259 |
|
| 260 |
/* The best alignment to use in cases where we have a choice. */ |
| 261 |
#define FASTEST_ALIGNMENT 32 |
| 262 |
|
| 263 |
/* Make arrays of chars word-aligned for the same reasons. */ |
| 264 |
#define DATA_ALIGNMENT(TYPE, ALIGN) \ |
| 265 |
(TREE_CODE (TYPE) == ARRAY_TYPE \ |
| 266 |
&& TYPE_MODE (TREE_TYPE (TYPE)) == QImode \ |
| 267 |
&& (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN)) |
| 268 |
|
| 269 |
/* Set this nonzero if move instructions will actually fail to work |
| 270 |
when given unaligned data. */ |
| 271 |
#define STRICT_ALIGNMENT 1 |
| 272 |
|
| 273 |
/* Define LAVEL_ALIGN to calculate code length of PNOP at labels. */ |
| 274 |
#define LABEL_ALIGN(insn) 2 |
| 275 |
|
| 276 |
/* Layout of source language data types. */ |
| 277 |
|
| 278 |
#define SHORT_TYPE_SIZE 16 |
| 279 |
#define INT_TYPE_SIZE 32 |
| 280 |
#define LONG_TYPE_SIZE 32 |
| 281 |
#define LONG_LONG_TYPE_SIZE 64 |
| 282 |
|
| 283 |
/* Define this as 1 if `char' should by default be signed; else as 0. */ |
| 284 |
#define DEFAULT_SIGNED_CHAR 1 |
| 285 |
|
| 286 |
#define SIZE_TYPE "long unsigned int" |
| 287 |
#define PTRDIFF_TYPE "long int" |
| 288 |
#define WCHAR_TYPE "short unsigned int" |
| 289 |
#define WCHAR_TYPE_SIZE 16 |
| 290 |
|
| 291 |
/* Standard register usage. */ |
| 292 |
|
| 293 |
/* Number of actual hardware registers. |
| 294 |
The hardware registers are assigned numbers for the compiler |
| 295 |
from 0 to just below FIRST_PSEUDO_REGISTER. |
| 296 |
All registers that the compiler knows about must be given numbers, |
| 297 |
even those that are not normally considered general registers. */ |
| 298 |
|
| 299 |
#define M32R_NUM_REGISTERS 19 |
| 300 |
|
| 301 |
#ifndef SUBTARGET_NUM_REGISTERS |
| 302 |
#define SUBTARGET_NUM_REGISTERS 0 |
| 303 |
#endif |
| 304 |
|
| 305 |
#define FIRST_PSEUDO_REGISTER (M32R_NUM_REGISTERS + SUBTARGET_NUM_REGISTERS) |
| 306 |
|
| 307 |
/* 1 for registers that have pervasive standard uses |
| 308 |
and are not available for the register allocator. |
| 309 |
|
| 310 |
0-3 - arguments/results |
| 311 |
4-5 - call used [4 is used as a tmp during prologue/epilogue generation] |
| 312 |
6 - call used, gptmp |
| 313 |
7 - call used, static chain pointer |
| 314 |
8-11 - call saved |
| 315 |
12 - call saved [reserved for global pointer] |
| 316 |
13 - frame pointer |
| 317 |
14 - subroutine link register |
| 318 |
15 - stack pointer |
| 319 |
16 - arg pointer |
| 320 |
17 - carry flag |
| 321 |
18 - accumulator |
| 322 |
19 - accumulator 1 in the m32r/x |
| 323 |
By default, the extension registers are not available. */ |
| 324 |
|
| 325 |
#ifndef SUBTARGET_FIXED_REGISTERS |
| 326 |
#define SUBTARGET_FIXED_REGISTERS |
| 327 |
#endif |
| 328 |
|
| 329 |
#define FIXED_REGISTERS \ |
| 330 |
{ \ |
| 331 |
0, 0, 0, 0, 0, 0, 0, 0, \ |
| 332 |
0, 0, 0, 0, 0, 0, 0, 1, \ |
| 333 |
1, 1, 1 \ |
| 334 |
SUBTARGET_FIXED_REGISTERS \ |
| 335 |
} |
| 336 |
|
| 337 |
/* 1 for registers not available across function calls. |
| 338 |
These must include the FIXED_REGISTERS and also any |
| 339 |
registers that can be used without being saved. |
| 340 |
The latter must include the registers where values are returned |
| 341 |
and the register where structure-value addresses are passed. |
| 342 |
Aside from that, you can include as many other registers as you like. */ |
| 343 |
|
| 344 |
#ifndef SUBTARGET_CALL_USED_REGISTERS |
| 345 |
#define SUBTARGET_CALL_USED_REGISTERS |
| 346 |
#endif |
| 347 |
|
| 348 |
#define CALL_REALLY_USED_REGISTERS \ |
| 349 |
{ \ |
| 350 |
1, 1, 1, 1, 1, 1, 1, 1, \ |
| 351 |
0, 0, 0, 0, 0, 0, 1, 1, \ |
| 352 |
1, 1, 1 \ |
| 353 |
SUBTARGET_CALL_USED_REGISTERS \ |
| 354 |
} |
| 355 |
|
| 356 |
/* If defined, an initializer for a vector of integers, containing the |
| 357 |
numbers of hard registers in the order in which GCC should |
| 358 |
prefer to use them (from most preferred to least). */ |
| 359 |
|
| 360 |
#ifndef SUBTARGET_REG_ALLOC_ORDER |
| 361 |
#define SUBTARGET_REG_ALLOC_ORDER |
| 362 |
#endif |
| 363 |
|
| 364 |
#if 1 /* Better for int code. */ |
| 365 |
#define REG_ALLOC_ORDER \ |
| 366 |
{ \ |
| 367 |
4, 5, 6, 7, 2, 3, 8, 9, 10, \ |
| 368 |
11, 12, 13, 14, 0, 1, 15, 16, 17, 18 \ |
| 369 |
SUBTARGET_REG_ALLOC_ORDER \ |
| 370 |
} |
| 371 |
|
| 372 |
#else /* Better for fp code at expense of int code. */ |
| 373 |
#define REG_ALLOC_ORDER \ |
| 374 |
{ \ |
| 375 |
0, 1, 2, 3, 4, 5, 6, 7, 8, \ |
| 376 |
9, 10, 11, 12, 13, 14, 15, 16, 17, 18 \ |
| 377 |
SUBTARGET_REG_ALLOC_ORDER \ |
| 378 |
} |
| 379 |
#endif |
| 380 |
|
| 381 |
#define HARD_REGNO_RENAME_OK(OLD_REG, NEW_REG) \ |
| 382 |
m32r_hard_regno_rename_ok (OLD_REG, NEW_REG) |
| 383 |
|
| 384 |
/* Register classes and constants. */ |
| 385 |
|
| 386 |
/* Define the classes of registers for register constraints in the |
| 387 |
machine description. Also define ranges of constants. |
| 388 |
|
| 389 |
One of the classes must always be named ALL_REGS and include all hard regs. |
| 390 |
If there is more than one class, another class must be named NO_REGS |
| 391 |
and contain no registers. |
| 392 |
|
| 393 |
The name GENERAL_REGS must be the name of a class (or an alias for |
| 394 |
another name such as ALL_REGS). This is the class of registers |
| 395 |
that is allowed by "g" or "r" in a register constraint. |
| 396 |
Also, registers outside this class are allocated only when |
| 397 |
instructions express preferences for them. |
| 398 |
|
| 399 |
The classes must be numbered in nondecreasing order; that is, |
| 400 |
a larger-numbered class must never be contained completely |
| 401 |
in a smaller-numbered class. |
| 402 |
|
| 403 |
For any two classes, it is very desirable that there be another |
| 404 |
class that represents their union. |
| 405 |
|
| 406 |
It is important that any condition codes have class NO_REGS. |
| 407 |
See `register_operand'. */ |
| 408 |
|
| 409 |
enum reg_class |
| 410 |
{ |
| 411 |
NO_REGS, CARRY_REG, ACCUM_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES |
| 412 |
}; |
| 413 |
|
| 414 |
#define N_REG_CLASSES ((int) LIM_REG_CLASSES) |
| 415 |
|
| 416 |
/* Give names of register classes as strings for dump file. */ |
| 417 |
#define REG_CLASS_NAMES \ |
| 418 |
{ "NO_REGS", "CARRY_REG", "ACCUM_REGS", "GENERAL_REGS", "ALL_REGS" } |
| 419 |
|
| 420 |
/* Define which registers fit in which classes. |
| 421 |
This is an initializer for a vector of HARD_REG_SET |
| 422 |
of length N_REG_CLASSES. */ |
| 423 |
|
| 424 |
#ifndef SUBTARGET_REG_CLASS_CARRY |
| 425 |
#define SUBTARGET_REG_CLASS_CARRY 0 |
| 426 |
#endif |
| 427 |
|
| 428 |
#ifndef SUBTARGET_REG_CLASS_ACCUM |
| 429 |
#define SUBTARGET_REG_CLASS_ACCUM 0 |
| 430 |
#endif |
| 431 |
|
| 432 |
#ifndef SUBTARGET_REG_CLASS_GENERAL |
| 433 |
#define SUBTARGET_REG_CLASS_GENERAL 0 |
| 434 |
#endif |
| 435 |
|
| 436 |
#ifndef SUBTARGET_REG_CLASS_ALL |
| 437 |
#define SUBTARGET_REG_CLASS_ALL 0 |
| 438 |
#endif |
| 439 |
|
| 440 |
#define REG_CLASS_CONTENTS \ |
| 441 |
{ \ |
| 442 |
{ 0x00000 }, \ |
| 443 |
{ 0x20000 | SUBTARGET_REG_CLASS_CARRY }, \ |
| 444 |
{ 0x40000 | SUBTARGET_REG_CLASS_ACCUM }, \ |
| 445 |
{ 0x1ffff | SUBTARGET_REG_CLASS_GENERAL }, \ |
| 446 |
{ 0x7ffff | SUBTARGET_REG_CLASS_ALL }, \ |
| 447 |
} |
| 448 |
|
| 449 |
/* The same information, inverted: |
| 450 |
Return the class number of the smallest class containing |
| 451 |
reg number REGNO. This could be a conditional expression |
| 452 |
or could index an array. */ |
| 453 |
extern enum reg_class m32r_regno_reg_class[FIRST_PSEUDO_REGISTER]; |
| 454 |
#define REGNO_REG_CLASS(REGNO) (m32r_regno_reg_class[REGNO]) |
| 455 |
|
| 456 |
/* The class value for index registers, and the one for base regs. */ |
| 457 |
#define INDEX_REG_CLASS GENERAL_REGS |
| 458 |
#define BASE_REG_CLASS GENERAL_REGS |
| 459 |
|
| 460 |
/* These assume that REGNO is a hard or pseudo reg number. |
| 461 |
They give nonzero only if REGNO is a hard reg of the suitable class |
| 462 |
or a pseudo reg currently allocated to a suitable hard reg. |
| 463 |
Since they use reg_renumber, they are safe only once reg_renumber |
| 464 |
has been allocated, which happens in reginfo.cc during register |
| 465 |
allocation. */ |
| 466 |
#define REGNO_OK_FOR_BASE_P(REGNO) \ |
| 467 |
((REGNO) < FIRST_PSEUDO_REGISTER \ |
| 468 |
? GPR_P (REGNO) || (REGNO) == ARG_POINTER_REGNUM \ |
| 469 |
: GPR_P (reg_renumber[REGNO])) |
| 470 |
|
| 471 |
#define REGNO_OK_FOR_INDEX_P(REGNO) REGNO_OK_FOR_BASE_P(REGNO) |
| 472 |
|
| 473 |
/* Return true if a value is inside a range. */ |
| 474 |
#define IN_RANGE_P(VALUE, LOW, HIGH) \ |
| 475 |
(((unsigned HOST_WIDE_INT)((VALUE) - (LOW))) \ |
| 476 |
<= ((unsigned HOST_WIDE_INT)((HIGH) - (LOW)))) |
| 477 |
|
| 478 |
/* Some range macros. */ |
| 479 |
#define INT16_P(X) ((X) >= - 0x8000 && (X) <= 0x7fff) |
| 480 |
#define CMP_INT16_P(X) ((X) >= - 0x7fff && (X) <= 0x8000) |
| 481 |
#define UINT16_P(X) (((unsigned HOST_WIDE_INT) (X)) <= 0x0000ffff) |
| 482 |
#define UINT24_P(X) (((unsigned HOST_WIDE_INT) (X)) <= 0x00ffffff) |
| 483 |
|
| 484 |
/* Stack layout and stack pointer usage. */ |
| 485 |
|
| 486 |
/* Define this macro if pushing a word onto the stack moves the stack |
| 487 |
pointer to a smaller address. */ |
| 488 |
#define STACK_GROWS_DOWNWARD 1 |
| 489 |
|
| 490 |
/* Offset from the stack pointer register to the first location at which |
| 491 |
outgoing arguments are placed. */ |
| 492 |
#define STACK_POINTER_OFFSET 0 |
| 493 |
|
| 494 |
/* Offset of first parameter from the argument pointer register value. */ |
| 495 |
#define FIRST_PARM_OFFSET(FNDECL) 0 |
| 496 |
|
| 497 |
/* Register to use for pushing function arguments. */ |
| 498 |
#define STACK_POINTER_REGNUM 15 |
| 499 |
|
| 500 |
/* Base register for access to local variables of the function. */ |
| 501 |
#define FRAME_POINTER_REGNUM 13 |
| 502 |
|
| 503 |
/* Base register for access to arguments of the function. */ |
| 504 |
#define ARG_POINTER_REGNUM 16 |
| 505 |
|
| 506 |
/* Register in which static-chain is passed to a function. |
| 507 |
This must not be a register used by the prologue. */ |
| 508 |
#define STATIC_CHAIN_REGNUM 7 |
| 509 |
|
| 510 |
/* These aren't official macros. */ |
| 511 |
#define PROLOGUE_TMP_REGNUM 4 |
| 512 |
#define RETURN_ADDR_REGNUM 14 |
| 513 |
/* #define GP_REGNUM 12 */ |
| 514 |
#define CARRY_REGNUM 17 |
| 515 |
#define ACCUM_REGNUM 18 |
| 516 |
#define M32R_MAX_INT_REGS 16 |
| 517 |
|
| 518 |
#ifndef SUBTARGET_GPR_P |
| 519 |
#define SUBTARGET_GPR_P(REGNO) 0 |
| 520 |
#endif |
| 521 |
|
| 522 |
#ifndef SUBTARGET_ACCUM_P |
| 523 |
#define SUBTARGET_ACCUM_P(REGNO) 0 |
| 524 |
#endif |
| 525 |
|
| 526 |
#ifndef SUBTARGET_CARRY_P |
| 527 |
#define SUBTARGET_CARRY_P(REGNO) 0 |
| 528 |
#endif |
| 529 |
|
| 530 |
#define GPR_P(REGNO) (IN_RANGE_P ((REGNO), 0, 15) || SUBTARGET_GPR_P (REGNO)) |
| 531 |
#define ACCUM_P(REGNO) ((REGNO) == ACCUM_REGNUM || SUBTARGET_ACCUM_P (REGNO)) |
| 532 |
#define CARRY_P(REGNO) ((REGNO) == CARRY_REGNUM || SUBTARGET_CARRY_P (REGNO)) |
| 533 |
|
| 534 |
/* Eliminating the frame and arg pointers. */ |
| 535 |
|
| 536 |
/* If defined, this macro specifies a table of register pairs used to |
| 537 |
eliminate unneeded registers that point into the stack frame. If |
| 538 |
it is not defined, the only elimination attempted by the compiler |
| 539 |
is to replace references to the frame pointer with references to |
| 540 |
the stack pointer. |
| 541 |
|
| 542 |
Note that the elimination of the argument pointer with the stack |
| 543 |
pointer is specified first since that is the preferred elimination. */ |
| 544 |
|
| 545 |
#define ELIMINABLE_REGS \ |
| 546 |
{{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM }, \ |
| 547 |
{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM }, \ |
| 548 |
{ ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM }} |
| 549 |
|
| 550 |
/* This macro returns the initial difference between the specified pair |
| 551 |
of registers. */ |
| 552 |
|
| 553 |
#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ |
| 554 |
do \ |
| 555 |
{ \ |
| 556 |
int size = m32r_compute_frame_size (get_frame_size ()); \ |
| 557 |
\ |
| 558 |
if ((FROM) == FRAME_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM) \ |
| 559 |
(OFFSET) = 0; \ |
| 560 |
else if ((FROM) == ARG_POINTER_REGNUM && (TO) == FRAME_POINTER_REGNUM) \ |
| 561 |
(OFFSET) = size - crtl->args.pretend_args_size; \ |
| 562 |
else if ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM) \ |
| 563 |
(OFFSET) = size - crtl->args.pretend_args_size; \ |
| 564 |
else \ |
| 565 |
gcc_unreachable (); \ |
| 566 |
} \ |
| 567 |
while (0) |
| 568 |
|
| 569 |
/* Function argument passing. */ |
| 570 |
|
| 571 |
/* If defined, the maximum amount of space required for outgoing |
| 572 |
arguments will be computed and placed into the variable |
| 573 |
`crtl->outgoing_args_size'. No space will be pushed |
| 574 |
onto the stack for each call; instead, the function prologue should |
| 575 |
increase the stack frame size by this amount. */ |
| 576 |
#define ACCUMULATE_OUTGOING_ARGS 1 |
| 577 |
|
| 578 |
/* Define a data type for recording info about an argument list |
| 579 |
during the scan of that argument list. This data type should |
| 580 |
hold all necessary information about the function itself |
| 581 |
and about the args processed so far, enough to enable macros |
| 582 |
such as FUNCTION_ARG to determine where the next arg should go. */ |
| 583 |
#define CUMULATIVE_ARGS int |
| 584 |
|
| 585 |
/* Initialize a variable CUM of type CUMULATIVE_ARGS |
| 586 |
for a call to a function whose data type is FNTYPE. |
| 587 |
For a library call, FNTYPE is 0. */ |
| 588 |
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \ |
| 589 |
((CUM) = 0) |
| 590 |
|
| 591 |
/* The number of registers used for parameter passing. Local to this file. */ |
| 592 |
#define M32R_MAX_PARM_REGS 4 |
| 593 |
|
| 594 |
/* 1 if N is a possible register number for function argument passing. */ |
| 595 |
#define FUNCTION_ARG_REGNO_P(N) \ |
| 596 |
((unsigned) (N) < M32R_MAX_PARM_REGS) |
| 597 |
|
| 598 |
|
| 599 |
/* Function results. */ |
| 600 |
|
| 601 |
/* Tell GCC to use TARGET_RETURN_IN_MEMORY. */ |
| 602 |
#define DEFAULT_PCC_STRUCT_RETURN 0 |
| 603 |
|
| 604 |
/* Function entry and exit. */ |
| 605 |
|
| 606 |
/* Initialize data used by insn expanders. This is called from |
| 607 |
init_emit, once for each function, before code is generated. */ |
| 608 |
#define INIT_EXPANDERS m32r_init_expanders () |
| 609 |
|
| 610 |
/* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, |
| 611 |
the stack pointer does not matter. The value is tested only in |
| 612 |
functions that have frame pointers. |
| 613 |
No definition is equivalent to always zero. */ |
| 614 |
#define EXIT_IGNORE_STACK 1 |
| 615 |
|
| 616 |
/* Output assembler code to FILE to increment profiler label # LABELNO |
| 617 |
for profiling a function entry. */ |
| 618 |
#undef FUNCTION_PROFILER |
| 619 |
#define FUNCTION_PROFILER(FILE, LABELNO) \ |
| 620 |
do \ |
| 621 |
{ \ |
| 622 |
if (flag_pic) \ |
| 623 |
{ \ |
| 624 |
fprintf (FILE, "\tld24 r14,#mcount\n"); \ |
| 625 |
fprintf (FILE, "\tadd r14,r12\n"); \ |
| 626 |
fprintf (FILE, "\tld r14,@r14\n"); \ |
| 627 |
fprintf (FILE, "\tjl r14\n"); \ |
| 628 |
} \ |
| 629 |
else \ |
| 630 |
{ \ |
| 631 |
if (TARGET_ADDR24) \ |
| 632 |
fprintf (FILE, "\tbl mcount\n"); \ |
| 633 |
else \ |
| 634 |
{ \ |
| 635 |
fprintf (FILE, "\tseth r14,#high(mcount)\n"); \ |
| 636 |
fprintf (FILE, "\tor3 r14,r14,#low(mcount)\n"); \ |
| 637 |
fprintf (FILE, "\tjl r14\n"); \ |
| 638 |
} \ |
| 639 |
} \ |
| 640 |
fprintf (FILE, "\taddi sp,#4\n"); \ |
| 641 |
} \ |
| 642 |
while (0) |
| 643 |
|
| 644 |
/* Trampolines. */ |
| 645 |
|
| 646 |
/* On the M32R, the trampoline is: |
| 647 |
|
| 648 |
mv r7, lr -> bl L1 ; 178e 7e01 |
| 649 |
L1: add3 r6, lr, #L2-L1 ; 86ae 000c (L2 - L1 = 12) |
| 650 |
mv lr, r7 -> ld r7,@r6+ ; 1e87 27e6 |
| 651 |
ld r6, @r6 -> jmp r6 ; 26c6 1fc6 |
| 652 |
L2: .word STATIC |
| 653 |
.word FUNCTION */ |
| 654 |
|
| 655 |
#ifndef CACHE_FLUSH_FUNC |
| 656 |
#define CACHE_FLUSH_FUNC "_flush_cache" |
| 657 |
#endif |
| 658 |
#ifndef CACHE_FLUSH_TRAP |
| 659 |
#define CACHE_FLUSH_TRAP 12 |
| 660 |
#endif |
| 661 |
|
| 662 |
/* Length in bytes of the trampoline for entering a nested function. */ |
| 663 |
#define TRAMPOLINE_SIZE 24 |
| 664 |
|
| 665 |
|
| 666 |
#define RETURN_ADDR_RTX(COUNT, FRAME) m32r_return_addr (COUNT) |
| 667 |
|
| 668 |
#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, RETURN_ADDR_REGNUM) |
| 669 |
|
| 670 |
/* Addressing modes, and classification of registers for them. */ |
| 671 |
|
| 672 |
/* Maximum number of registers that can appear in a valid memory address. */ |
| 673 |
#define MAX_REGS_PER_ADDRESS 1 |
| 674 |
|
| 675 |
/* We have post-inc load and pre-dec,pre-inc store, |
| 676 |
but only for 4 byte vals. */ |
| 677 |
#define HAVE_PRE_DECREMENT 1 |
| 678 |
#define HAVE_PRE_INCREMENT 1 |
| 679 |
#define HAVE_POST_INCREMENT 1 |
| 680 |
|
| 681 |
/* Recognize any constant value that is a valid address. */ |
| 682 |
#define CONSTANT_ADDRESS_P(X) \ |
| 683 |
( GET_CODE (X) == LABEL_REF \ |
| 684 |
|| GET_CODE (X) == SYMBOL_REF \ |
| 685 |
|| CONST_INT_P (X) \ |
| 686 |
|| (GET_CODE (X) == CONST \ |
| 687 |
&& ! (flag_pic && ! m32r_legitimate_pic_operand_p (X)))) |
| 688 |
|
| 689 |
/* Condition code usage. */ |
| 690 |
|
| 691 |
/* Return nonzero if SELECT_CC_MODE will never return MODE for a |
| 692 |
floating point inequality comparison. */ |
| 693 |
#define REVERSIBLE_CC_MODE(MODE) 1 /*???*/ |
| 694 |
|
| 695 |
/* Costs. */ |
| 696 |
|
| 697 |
/* The cost of a branch insn. */ |
| 698 |
/* A value of 2 here causes GCC to avoid using branches in comparisons like |
| 699 |
while (a < N && a). Branches aren't that expensive on the M32R so |
| 700 |
we define this as 1. Defining it as 2 had a heavy hit in fp-bit.c. */ |
| 701 |
#define BRANCH_COST(speed_p, predictable_p) ((TARGET_BRANCH_COST) ? 2 : 1) |
| 702 |
|
| 703 |
/* Nonzero if access to memory by bytes is slow and undesirable. |
| 704 |
For RISC chips, it means that access to memory by bytes is no |
| 705 |
better than access by words when possible, so grab a whole word |
| 706 |
and maybe make use of that. */ |
| 707 |
#define SLOW_BYTE_ACCESS 1 |
| 708 |
|
| 709 |
/* Define this macro if it is as good or better to call a constant |
| 710 |
function address than to call an address kept in a register. */ |
| 711 |
#define NO_FUNCTION_CSE 1 |
| 712 |
|
| 713 |
/* Section selection. */ |
| 714 |
|
| 715 |
#define TEXT_SECTION_ASM_OP "\t.section .text" |
| 716 |
#define DATA_SECTION_ASM_OP "\t.section .data" |
| 717 |
#define BSS_SECTION_ASM_OP "\t.section .bss" |
| 718 |
|
| 719 |
/* Define this macro if jump tables (for tablejump insns) should be |
| 720 |
output in the text section, along with the assembler instructions. |
| 721 |
Otherwise, the readonly data section is used. |
| 722 |
This macro is irrelevant if there is no separate readonly data section. */ |
| 723 |
#define JUMP_TABLES_IN_TEXT_SECTION (flag_pic) |
| 724 |
|
| 725 |
/* Position Independent Code. */ |
| 726 |
|
| 727 |
/* The register number of the register used to address a table of static |
| 728 |
data addresses in memory. In some cases this register is defined by a |
| 729 |
processor's ``application binary interface'' (ABI). When this macro |
| 730 |
is defined, RTL is generated for this register once, as with the stack |
| 731 |
pointer and frame pointer registers. If this macro is not defined, it |
| 732 |
is up to the machine-dependent files to allocate such a register (if |
| 733 |
necessary). */ |
| 734 |
#define PIC_OFFSET_TABLE_REGNUM 12 |
| 735 |
|
| 736 |
/* Define this macro if the register defined by PIC_OFFSET_TABLE_REGNUM is |
| 737 |
clobbered by calls. Do not define this macro if PIC_OFFSET_TABLE_REGNUM |
| 738 |
is not defined. */ |
| 739 |
/* This register is call-saved on the M32R. */ |
| 740 |
/*#define PIC_OFFSET_TABLE_REG_CALL_CLOBBERED*/ |
| 741 |
|
| 742 |
/* A C expression that is nonzero if X is a legitimate immediate |
| 743 |
operand on the target machine when generating position independent code. |
| 744 |
You can assume that X satisfies CONSTANT_P, so you need not |
| 745 |
check this. You can also assume `flag_pic' is true, so you need not |
| 746 |
check it either. You need not define this macro if all constants |
| 747 |
(including SYMBOL_REF) can be immediate operands when generating |
| 748 |
position independent code. */ |
| 749 |
#define LEGITIMATE_PIC_OPERAND_P(X) m32r_legitimate_pic_operand_p (X) |
| 750 |
|
| 751 |
/* Control the assembler format that we output. */ |
| 752 |
|
| 753 |
/* A C string constant describing how to begin a comment in the target |
| 754 |
assembler language. The compiler assumes that the comment will |
| 755 |
end at the end of the line. */ |
| 756 |
#define ASM_COMMENT_START ";" |
| 757 |
|
| 758 |
/* Output to assembler file text saying following lines |
| 759 |
may contain character constants, extra white space, comments, etc. */ |
| 760 |
#define ASM_APP_ON "" |
| 761 |
|
| 762 |
/* Output to assembler file text saying following lines |
| 763 |
no longer contain unusual constructs. */ |
| 764 |
#define ASM_APP_OFF "" |
| 765 |
|
| 766 |
/* Globalizing directive for a label. */ |
| 767 |
#define GLOBAL_ASM_OP "\t.global\t" |
| 768 |
|
| 769 |
/* How to refer to registers in assembler output. |
| 770 |
This sequence is indexed by compiler's hard-register-number (see above). */ |
| 771 |
#ifndef SUBTARGET_REGISTER_NAMES |
| 772 |
#define SUBTARGET_REGISTER_NAMES |
| 773 |
#endif |
| 774 |
|
| 775 |
#define REGISTER_NAMES \ |
| 776 |
{ \ |
| 777 |
"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \ |
| 778 |
"r8", "r9", "r10", "r11", "r12", "fp", "lr", "sp", \ |
| 779 |
"ap", "cbit", "a0" \ |
| 780 |
SUBTARGET_REGISTER_NAMES \ |
| 781 |
} |
| 782 |
|
| 783 |
/* If defined, a C initializer for an array of structures containing |
| 784 |
a name and a register number. This macro defines additional names |
| 785 |
for hard registers, thus allowing the `asm' option in declarations |
| 786 |
to refer to registers using alternate names. */ |
| 787 |
#ifndef SUBTARGET_ADDITIONAL_REGISTER_NAMES |
| 788 |
#define SUBTARGET_ADDITIONAL_REGISTER_NAMES |
| 789 |
#endif |
| 790 |
|
| 791 |
#define ADDITIONAL_REGISTER_NAMES \ |
| 792 |
{ \ |
| 793 |
/*{ "gp", GP_REGNUM },*/ \ |
| 794 |
{ "r13", FRAME_POINTER_REGNUM }, \ |
| 795 |
{ "r14", RETURN_ADDR_REGNUM }, \ |
| 796 |
{ "r15", STACK_POINTER_REGNUM }, \ |
| 797 |
SUBTARGET_ADDITIONAL_REGISTER_NAMES \ |
| 798 |
} |
| 799 |
|
| 800 |
/* If defined, C string expressions to be used for the `%R', `%L', |
| 801 |
`%U', and `%I' options of `asm_fprintf' (see `final.cc'). These |
| 802 |
are useful when a single `md' file must support multiple assembler |
| 803 |
formats. In that case, the various `tm.h' files can define these |
| 804 |
macros differently. */ |
| 805 |
#define REGISTER_PREFIX "" |
| 806 |
#define LOCAL_LABEL_PREFIX ".L" |
| 807 |
#define USER_LABEL_PREFIX "" |
| 808 |
#define IMMEDIATE_PREFIX "#" |
| 809 |
|
| 810 |
/* This is how to output an element of a case-vector that is absolute. */ |
| 811 |
#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ |
| 812 |
do \ |
| 813 |
{ \ |
| 814 |
char label[30]; \ |
| 815 |
ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE); \ |
| 816 |
fprintf (FILE, "\t.word\t"); \ |
| 817 |
assemble_name (FILE, label); \ |
| 818 |
fprintf (FILE, "\n"); \ |
| 819 |
} \ |
| 820 |
while (0) |
| 821 |
|
| 822 |
/* This is how to output an element of a case-vector that is relative. */ |
| 823 |
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL)\ |
| 824 |
do \ |
| 825 |
{ \ |
| 826 |
char label[30]; \ |
| 827 |
ASM_GENERATE_INTERNAL_LABEL (label, "L", VALUE); \ |
| 828 |
fprintf (FILE, "\t.word\t"); \ |
| 829 |
assemble_name (FILE, label); \ |
| 830 |
fprintf (FILE, "-"); \ |
| 831 |
ASM_GENERATE_INTERNAL_LABEL (label, "L", REL); \ |
| 832 |
assemble_name (FILE, label); \ |
| 833 |
fprintf (FILE, "\n"); \ |
| 834 |
} \ |
| 835 |
while (0) |
| 836 |
|
| 837 |
/* The desired alignment for the location counter at the beginning |
| 838 |
of a loop. */ |
| 839 |
/* On the M32R, align loops to 32 byte boundaries (cache line size) |
| 840 |
if -malign-loops. */ |
| 841 |
#define LOOP_ALIGN(LABEL) ((TARGET_ALIGN_LOOPS \ |
| 842 |
? align_flags (5) : align_flags ())) |
| 843 |
|
| 844 |
/* Define this to be the maximum number of insns to move around when moving |
| 845 |
a loop test from the top of a loop to the bottom |
| 846 |
and seeing whether to duplicate it. The default is thirty. |
| 847 |
|
| 848 |
Loop unrolling currently doesn't like this optimization, so |
| 849 |
disable doing if we are unrolling loops and saving space. */ |
| 850 |
#define LOOP_TEST_THRESHOLD (optimize_size \ |
| 851 |
&& !flag_unroll_loops \ |
| 852 |
&& !flag_unroll_all_loops ? 2 : 30) |
| 853 |
|
| 854 |
/* This is how to output an assembler line |
| 855 |
that says to advance the location counter |
| 856 |
to a multiple of 2**LOG bytes. */ |
| 857 |
/* .balign is used to avoid confusion. */ |
| 858 |
#define ASM_OUTPUT_ALIGN(FILE,LOG) \ |
| 859 |
do \ |
| 860 |
{ \ |
| 861 |
if ((LOG) != 0) \ |
| 862 |
fprintf (FILE, "\t.balign %d\n", 1 << (LOG)); \ |
| 863 |
} \ |
| 864 |
while (0) |
| 865 |
|
| 866 |
/* Like `ASM_OUTPUT_COMMON' except takes the required alignment as a |
| 867 |
separate, explicit argument. If you define this macro, it is used in |
| 868 |
place of `ASM_OUTPUT_COMMON', and gives you more flexibility in |
| 869 |
handling the required alignment of the variable. The alignment is |
| 870 |
specified as the number of bits. */ |
| 871 |
|
| 872 |
#define SCOMMON_ASM_OP "\t.scomm\t" |
| 873 |
|
| 874 |
#undef ASM_OUTPUT_ALIGNED_COMMON |
| 875 |
#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ |
| 876 |
do \ |
| 877 |
{ \ |
| 878 |
if (! TARGET_SDATA_NONE \ |
| 879 |
&& (SIZE) > 0 \ |
| 880 |
&& (SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value) \ |
| 881 |
fprintf ((FILE), "%s", SCOMMON_ASM_OP); \ |
| 882 |
else \ |
| 883 |
fprintf ((FILE), "%s", COMMON_ASM_OP); \ |
| 884 |
assemble_name ((FILE), (NAME)); \ |
| 885 |
fprintf ((FILE), ",%u,%u\n", (int)(SIZE), (ALIGN) / BITS_PER_UNIT);\ |
| 886 |
} \ |
| 887 |
while (0) |
| 888 |
|
| 889 |
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ |
| 890 |
do \ |
| 891 |
{ \ |
| 892 |
if (! TARGET_SDATA_NONE \ |
| 893 |
&& (SIZE) > 0 \ |
| 894 |
&& (SIZE) <= (unsigned HOST_WIDE_INT) g_switch_value) \ |
| 895 |
switch_to_section (get_named_section (NULL, ".sbss", 0)); \ |
| 896 |
else \ |
| 897 |
switch_to_section (bss_section); \ |
| 898 |
ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT)); \ |
| 899 |
last_assemble_variable_decl = DECL; \ |
| 900 |
ASM_DECLARE_OBJECT_NAME (FILE, NAME, DECL); \ |
| 901 |
ASM_OUTPUT_SKIP (FILE, SIZE ? SIZE : 1); \ |
| 902 |
} \ |
| 903 |
while (0) |
| 904 |
|
| 905 |
/* Debugging information. */ |
| 906 |
|
| 907 |
/* Generate DWARF debugging information. */ |
| 908 |
#define DWARF2_DEBUGGING_INFO 1 |
| 909 |
|
| 910 |
/* Use DWARF2 debugging info by default. */ |
| 911 |
#undef PREFERRED_DEBUGGING_TYPE |
| 912 |
#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG |
| 913 |
|
| 914 |
|
| 915 |
/* Miscellaneous. */ |
| 916 |
|
| 917 |
/* Specify the machine mode that this machine uses |
| 918 |
for the index in the tablejump instruction. */ |
| 919 |
#define CASE_VECTOR_MODE (flag_pic ? SImode : Pmode) |
| 920 |
|
| 921 |
/* Define if operations between registers always perform the operation |
| 922 |
on the full register even if a narrower mode is specified. */ |
| 923 |
#define WORD_REGISTER_OPERATIONS 1 |
| 924 |
|
| 925 |
/* Define if loading in MODE, an integral mode narrower than BITS_PER_WORD |
| 926 |
will either zero-extend or sign-extend. The value of this macro should |
| 927 |
be the code that says which one of the two operations is implicitly |
| 928 |
done, UNKNOWN if none. */ |
| 929 |
#define LOAD_EXTEND_OP(MODE) ZERO_EXTEND |
| 930 |
|
| 931 |
/* Max number of bytes we can move from memory |
| 932 |
to memory in one reasonably fast instruction. */ |
| 933 |
#define MOVE_MAX 4 |
| 934 |
|
| 935 |
/* Define this to be nonzero if shift instructions ignore all but the low-order |
| 936 |
few bits. */ |
| 937 |
#define SHIFT_COUNT_TRUNCATED 1 |
| 938 |
|
| 939 |
/* Specify the machine mode that pointers have. |
| 940 |
After generation of rtl, the compiler makes no further distinction |
| 941 |
between pointers and any other objects of this machine mode. */ |
| 942 |
/* ??? The M32R doesn't have full 32-bit pointers, but making this PSImode has |
| 943 |
its own problems (you have to add extendpsisi2 and truncsipsi2). |
| 944 |
Try to avoid it. */ |
| 945 |
#define Pmode SImode |
| 946 |
|
| 947 |
/* A function address in a call instruction. */ |
| 948 |
#define FUNCTION_MODE SImode |
| 949 |
|
| 950 |
/* M32R function types. */ |
| 951 |
enum m32r_function_type |
| 952 |
{ |
| 953 |
M32R_FUNCTION_UNKNOWN, M32R_FUNCTION_NORMAL, M32R_FUNCTION_INTERRUPT |
| 954 |
}; |
| 955 |
|
| 956 |
#define M32R_INTERRUPT_P(TYPE) ((TYPE) == M32R_FUNCTION_INTERRUPT) |
| 957 |
|
| 958 |
/* The maximum number of bytes to copy using pairs of load/store instructions. |
| 959 |
If a block is larger than this then a loop will be generated to copy |
| 960 |
MAX_MOVE_BYTES chunks at a time. The value of 32 is a semi-arbitrary choice. |
| 961 |
A customer uses Dhrystome as their benchmark, and Dhrystone has a 31 byte |
| 962 |
string copy in it. */ |
| 963 |
#define MAX_MOVE_BYTES 32 |