1 /* Definitions of target machine for Visium. 2 Copyright (C) 2002-2015 Free Software Foundation, Inc. 3 Contributed by C.Nettleton, J.P.Parkes and P.Garbett. 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 22 /* Controlling the Compilation Driver, `gcc' */ 23 24 /* Pass -mtune=* options to the assembler */ 25 #undef ASM_SPEC 26 #define ASM_SPEC "%{mcpu=gr6:-mtune=gr6; :-mtune=mcm}" 27 28 /* Define symbols for the preprocessor. */ 29 #define CPP_SPEC "%{mcpu=gr6:-D__gr6__; :-D__gr5__}" 30 31 /* Targets of a link */ 32 #define LIB_SPEC \ 33 "--start-group -lc %{msim:-lsim; mdebug:-ldebug; :-lserial} --end-group" 34 35 #define ENDFILE_SPEC "crtend.o%s crtn.o%s" 36 #define STARTFILE_SPEC "crti.o%s crtbegin.o%s crt0.o%s" 37 38 /* Run-time Target Specification */ 39 40 /* TARGET_CPU_CPP_BUILTINS() This function-like macro expands to a 41 block of code that defines built-in preprocessor macros and 42 assertions for the target cpu, using the functions builtin_define, 43 builtin_define_std and builtin_assert. When the front end calls 44 this macro it provides a trailing semicolon, and since it has 45 finished command line option processing your code can use those 46 results freely. builtin_assert takes a string in the form you pass 47 to the command-line option -A, such as cpu=mips, and creates the 48 assertion. builtin_define takes a string in the form accepted by 49 option -D and unconditionally defines the macro. 50 51 builtin_define_std takes a string representing the name of an 52 object-like macro. If it doesn't lie in the user's namespace, 53 builtin_define_std defines it unconditionally. Otherwise, it 54 defines a version with two leading underscores, and another version 55 with two leading and trailing underscores, and defines the original 56 only if an ISO standard was not requested on the command line. For 57 example, passing unix defines __unix, __unix__ and possibly unix; 58 passing _mips defines __mips, __mips__ and possibly _mips, and 59 passing _ABI64 defines only _ABI64. 60 61 You can also test for the C dialect being compiled. The variable 62 c_language is set to one of clk_c, clk_cplusplus or 63 clk_objective_c. Note that if we are preprocessing assembler, this 64 variable will be clk_c but the function-like macro 65 preprocessing_asm_p() will return true, so you might want to check 66 for that first. If you need to check for strict ANSI, the variable 67 flag_iso can be used. The function-like macro 68 preprocessing_trad_p() can be used to check for traditional 69 preprocessing. */ 70 #define TARGET_CPU_CPP_BUILTINS() \ 71 do \ 72 { \ 73 builtin_define ("__VISIUM__"); \ 74 if (TARGET_MCM) \ 75 builtin_define ("__VISIUM_ARCH_MCM__"); \ 76 if (TARGET_BMI) \ 77 builtin_define ("__VISIUM_ARCH_BMI__"); \ 78 if (TARGET_FPU_IEEE) \ 79 builtin_define ("__VISIUM_ARCH_FPU_IEEE__"); \ 80 } \ 81 while (0) 82 83 /* Recast the cpu class to be the cpu attribute. 84 Every file includes us, but not every file includes insn-attr.h. */ 85 #define visium_cpu_attr ((enum attr_cpu) visium_cpu) 86 87 /* Defining data structures for per-function information. 88 89 If the target needs to store information on a per-function basis, 90 GCC provides a macro and a couple of variables to allow this. Note, 91 just using statics to store the information is a bad idea, since 92 GCC supports nested functions, so you can be halfway through 93 encoding one function when another one comes along. 94 95 GCC defines a data structure called struct function which contains 96 all of the data specific to an individual function. This structure 97 contains a field called machine whose type is struct 98 machine_function *, which can be used by targets to point to their 99 own specific data. 100 101 If a target needs per-function specific data it should define the 102 type struct machine_function and also the macro 103 INIT_EXPANDERS. This macro should be used to initialize the 104 function pointer init_machine_status. This pointer is explained 105 below. 106 107 One typical use of per-function, target specific data is to create 108 an RTX to hold the register containing the function's return 109 address. This RTX can then be used to implement the 110 __builtin_return_address function, for level 0. 111 112 Note--earlier implementations of GCC used a single data area to 113 hold all of the per-function information. Thus when processing of a 114 nested function began the old per-function data had to be pushed 115 onto a stack, and when the processing was finished, it had to be 116 popped off the stack. GCC used to provide function pointers called 117 save_machine_status and restore_machine_status to handle the saving 118 and restoring of the target specific information. Since the single 119 data area approach is no longer used, these pointers are no longer 120 supported. 121 122 The macro and function pointers are described below. 123 124 INIT_EXPANDERS: 125 126 Macro called to initialize any target specific information. This 127 macro is called once per function, before generation of any RTL has 128 begun. The intention of this macro is to allow the initialization 129 of the function pointers below. 130 131 init_machine_status: 132 This is a void (*)(struct function *) function pointer. If this 133 pointer is non-NULL it will be called once per function, before 134 function compilation starts, in order to allow the target to 135 perform any target specific initialization of the struct function 136 structure. It is intended that this would be used to initialize the 137 machine of that structure. struct machine_function structures are 138 expected to be freed by GC. Generally, any memory that they 139 reference must be allocated by using ggc_alloc, including the 140 structure itself. */ 141 142 #define INIT_EXPANDERS visium_init_expanders () 143 144 /* Storage Layout 145 146 Note that the definitions of the macros in this table which are 147 sizes or alignments measured in bits do not need to be constant. 148 They can be C expressions that refer to static variables, such as 149 the `target_flags'. 150 151 `BITS_BIG_ENDIAN' 152 153 Define this macro to have the value 1 if the most significant bit 154 in a byte has the lowest number; otherwise define it to have the 155 value zero. This means that bit-field instructions count from the 156 most significant bit. If the machine has no bit-field 157 instructions, then this must still be defined, but it doesn't 158 matter which value it is defined to. This macro need not be a 159 constant. 160 161 This macro does not affect the way structure fields are packed into 162 bytes or words; that is controlled by `BYTES_BIG_ENDIAN'. */ 163 #define BITS_BIG_ENDIAN 1 164 165 /* `BYTES_BIG_ENDIAN' 166 167 Define this macro to have the value 1 if the most significant byte 168 in a word has the lowest number. This macro need not be a 169 constant.*/ 170 #define BYTES_BIG_ENDIAN 1 171 172 /* `WORDS_BIG_ENDIAN' 173 174 Define this macro to have the value 1 if, in a multiword object, 175 the most significant word has the lowest number. This applies to 176 both memory locations and registers; GNU CC fundamentally assumes 177 that the order of words in memory is the same as the order in 178 registers. This macro need not be a constant. */ 179 #define WORDS_BIG_ENDIAN 1 180 181 /* `BITS_PER_WORD' 182 183 Number of bits in a word; normally 32. */ 184 #define BITS_PER_WORD 32 185 186 /* `UNITS_PER_WORD' 187 188 Number of storage units in a word; normally 4. */ 189 #define UNITS_PER_WORD 4 190 191 /* `POINTER_SIZE' 192 193 Width of a pointer, in bits. You must specify a value no wider 194 than the width of `Pmode'. If it is not equal to the width of 195 `Pmode', you must define `POINTERS_EXTEND_UNSIGNED'. */ 196 #define POINTER_SIZE 32 197 198 /* `PARM_BOUNDARY' 199 200 Normal alignment required for function parameters on the stack, in 201 bits. All stack parameters receive at least this much alignment 202 regardless of data type. On most machines, this is the same as the 203 size of an integer. */ 204 #define PARM_BOUNDARY 32 205 206 /* `STACK_BOUNDARY' 207 208 Define this macro if you wish to preserve a certain alignment for 209 the stack pointer. The definition is a C expression for the 210 desired alignment (measured in bits). 211 212 If `PUSH_ROUNDING' is not defined, the stack will always be aligned 213 to the specified boundary. If `PUSH_ROUNDING' is defined and 214 specifies a less strict alignment than `STACK_BOUNDARY', the stack 215 may be momentarily unaligned while pushing arguments. */ 216 #define STACK_BOUNDARY 32 217 218 #define VISIUM_STACK_ALIGN(LOC) (((LOC) + 3) & ~3) 219 220 /* `FUNCTION_BOUNDARY' 221 222 Alignment required for a function entry point, in bits. */ 223 #define FUNCTION_BOUNDARY 32 224 225 /* `BIGGEST_ALIGNMENT' 226 227 Biggest alignment that any data type can require on this machine, 228 in bits. */ 229 #define BIGGEST_ALIGNMENT 32 230 231 /* `DATA_ALIGNMENT (TYPE, BASIC-ALIGN)` 232 233 If defined, a C expression to compute the alignment for a variable 234 in the static store. TYPE is the data type, and BASIC-ALIGN is 235 the alignment that the object would ordinarily have. The value of 236 this macro is used instead of that alignment to align the object. */ 237 #define DATA_ALIGNMENT(TYPE,ALIGN) visium_data_alignment (TYPE, ALIGN) 238 239 /* `CONSTANT_ALIGNMENT (CONSTANT, BASIC-ALIGN)` 240 241 If defined, a C expression to compute the alignment given to a 242 constant that is being placed in memory. CONSTANT is the constant 243 and BASIC-ALIGN is the alignment that the object would ordinarily 244 have. The value of this macro is used instead of that alignment to 245 align the object. */ 246 #define CONSTANT_ALIGNMENT(EXP,ALIGN) \ 247 visium_data_alignment (TREE_TYPE (EXP), ALIGN) 248 249 /* `LOCAL_ALIGNMENT (TYPE, BASIC-ALIGN)` 250 251 If defined, a C expression to compute the alignment for a variable 252 in the local store. TYPE is the data type, and BASIC-ALIGN is the 253 alignment that the object would ordinarily have. The value of this 254 macro is used instead of that alignment to align the object. */ 255 #define LOCAL_ALIGNMENT(TYPE,ALIGN) visium_data_alignment (TYPE, ALIGN) 256 257 /* `EMPTY_FIELD_BOUNDARY' 258 259 Alignment in bits to be given to a structure bit field that follows 260 an empty field such as `int : 0;'. 261 262 Note that `PCC_BITFIELD_TYPE_MATTERS' also affects the alignment 263 that results from an empty field. */ 264 #define EMPTY_FIELD_BOUNDARY 32 265 266 /* `STRICT_ALIGNMENT' 267 268 Define this macro to be the value 1 if instructions will fail to 269 work if given data not on the nominal alignment. If instructions 270 will merely go slower in that case, define this macro as 0. */ 271 #define STRICT_ALIGNMENT 1 272 273 /* `TARGET_FLOAT_FORMAT' 274 275 A code distinguishing the floating point format of the target 276 machine. There are three defined values: 277 278 `IEEE_FLOAT_FORMAT' 279 This code indicates IEEE floating point. It is the default; 280 there is no need to define this macro when the format is IEEE. 281 282 `VAX_FLOAT_FORMAT' 283 This code indicates the peculiar format used on the Vax. 284 285 `UNKNOWN_FLOAT_FORMAT' 286 This code indicates any other format. 287 288 The value of this macro is compared with `HOST_FLOAT_FORMAT' to 289 determine whether the target machine has the same format as the 290 host machine. If any other formats are actually in use on 291 supported machines, new codes should be defined for them. 292 293 The ordering of the component words of floating point values 294 stored in memory is controlled by `FLOAT_WORDS_BIG_ENDIAN' for the 295 target machine and `HOST_FLOAT_WORDS_BIG_ENDIAN' for the host. */ 296 #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT 297 #define UNITS_PER_HWFPVALUE 4 298 299 /* Layout of Source Language Data Types 300 301 These macros define the sizes and other characteristics of the 302 standard basic data types used in programs being compiled. Unlike 303 the macros in the previous section, these apply to specific 304 features of C and related languages, rather than to fundamental 305 aspects of storage layout. */ 306 307 /* `INT_TYPE_SIZE' 308 309 A C expression for the size in bits of the type `int' on the target 310 machine. If you don't define this, the default is one word. */ 311 #define INT_TYPE_SIZE 32 312 313 /* `SHORT_TYPE_SIZE' 314 315 A C expression for the size in bits of the type `short' on the 316 target machine. If you don't define this, the default is half a 317 word. (If this would be less than one storage unit, it is rounded 318 up to one unit.) */ 319 #define SHORT_TYPE_SIZE 16 320 321 /* `LONG_TYPE_SIZE' 322 323 A C expression for the size in bits of the type `long' on the 324 target machine. If you don't define this, the default is one word. */ 325 #define LONG_TYPE_SIZE 32 326 327 /* `LONG_LONG_TYPE_SIZE' 328 329 A C expression for the size in bits of the type `long long' on the 330 target machine. If you don't define this, the default is two 331 words. If you want to support GNU Ada on your machine, the value 332 of macro must be at least 64. */ 333 #define LONG_LONG_TYPE_SIZE 64 334 335 /* `CHAR_TYPE_SIZE' 336 337 A C expression for the size in bits of the type `char' on the 338 target machine. If you don't define this, the default is one 339 quarter of a word. (If this would be less than one storage unit, 340 it is rounded up to one unit.) */ 341 #define CHAR_TYPE_SIZE 8 342 343 /* `FLOAT_TYPE_SIZE' 344 345 A C expression for the size in bits of the type `float' on the 346 target machine. If you don't define this, the default is one word. */ 347 #define FLOAT_TYPE_SIZE 32 348 349 /* `DOUBLE_TYPE_SIZE' 350 351 A C expression for the size in bits of the type `double' on the 352 target machine. If you don't define this, the default is two 353 words. */ 354 #define DOUBLE_TYPE_SIZE 64 355 356 /* `LONG_DOUBLE_TYPE_SIZE' 357 358 A C expression for the size in bits of the type `long double' on 359 the target machine. If you don't define this, the default is two 360 words. */ 361 #define LONG_DOUBLE_TYPE_SIZE DOUBLE_TYPE_SIZE 362 363 /* `WIDEST_HARDWARE_FP_SIZE' 364 365 A C expression for the size in bits of the widest floating-point 366 format supported by the hardware. If you define this macro, you 367 must specify a value less than or equal to the value of 368 `LONG_DOUBLE_TYPE_SIZE'. If you do not define this macro, the 369 value of `LONG_DOUBLE_TYPE_SIZE' is the default. */ 370 371 /* `DEFAULT_SIGNED_CHAR' 372 373 An expression whose value is 1 or 0, according to whether the type 374 `char' should be signed or unsigned by default. The user can 375 always override this default with the options `-fsigned-char' and 376 `-funsigned-char'. */ 377 #define DEFAULT_SIGNED_CHAR 0 378 379 /* `SIZE_TYPE' 380 381 A C expression for a string describing the name of the data type to 382 use for size values. The typedef name `size_t' is defined using 383 the contents of the string. 384 385 The string can contain more than one keyword. If so, separate them 386 with spaces, and write first any length keyword, then `unsigned' if 387 appropriate, and finally `int'. The string must exactly match one 388 of the data type names defined in the function 389 `init_decl_processing' in the file `c-decl.c'. You may not omit 390 `int' or change the order--that would cause the compiler to crash 391 on startup. 392 393 If you don't define this macro, the default is `"long unsigned 394 int"'. */ 395 #define SIZE_TYPE "unsigned int" 396 397 /* `PTRDIFF_TYPE' 398 399 A C expression for a string describing the name of the data type to 400 use for the result of subtracting two pointers. The typedef name 401 `ptrdiff_t' is defined using the contents of the string. See 402 `SIZE_TYPE' above for more information. 403 404 If you don't define this macro, the default is `"long int"'. */ 405 #define PTRDIFF_TYPE "long int" 406 407 /* Newlib uses the unsigned type corresponding to ptrdiff_t for 408 uintptr_t; this is the same as size_t for most newlib-using 409 targets, but not for us. */ 410 #define UINTPTR_TYPE "long unsigned int" 411 412 /* `WCHAR_TYPE' 413 414 A C expression for a string describing the name of the data type to 415 use for wide characters. The typedef name `wchar_t' is defined 416 using the contents of the string. See `SIZE_TYPE' above for more 417 information. 418 419 If you don't define this macro, the default is `"int"'. */ 420 #define WCHAR_TYPE "short int" 421 422 /* `WCHAR_TYPE_SIZE' 423 424 A C expression for the size in bits of the data type for wide 425 characters. This is used in `cpp', which cannot make use of 426 `WCHAR_TYPE'. */ 427 #define WCHAR_TYPE_SIZE 16 428 429 /* Register Usage 430 431 This section explains how to describe what registers the target 432 machine has, and how (in general) they can be used. */ 433 434 /* `FIRST_PSEUDO_REGISTER' 435 436 Number of actual hardware registers. 437 The hardware registers are assigned numbers for the compiler 438 from 0 to just below FIRST_PSEUDO_REGISTER. 439 All registers that the compiler knows about must be given numbers, 440 even those that are not normally considered general registers. 441 442 Register 51 is used as the argument pointer register. 443 Register 52 is used as the soft frame pointer register. */ 444 #define FIRST_PSEUDO_REGISTER 53 445 446 #define RETURN_REGNUM 1 447 #define PROLOGUE_TMP_REGNUM 9 448 #define LINK_REGNUM 21 449 #define GP_LAST_REGNUM 31 450 #define GP_REGISTER_P(REGNO) \ 451 (((unsigned) (REGNO)) <= GP_LAST_REGNUM) 452 453 #define MDB_REGNUM 32 454 #define MDC_REGNUM 33 455 456 #define FP_FIRST_REGNUM 34 457 #define FP_LAST_REGNUM 49 458 #define FP_RETURN_REGNUM (FP_FIRST_REGNUM + 1) 459 #define FP_REGISTER_P(REGNO) \ 460 (FP_FIRST_REGNUM <= (REGNO) && (REGNO) <= FP_LAST_REGNUM) 461 462 #define FLAGS_REGNUM 50 463 464 /* `FIXED_REGISTERS' 465 466 An initializer that says which registers are used for fixed 467 purposes all throughout the compiled code and are therefore not 468 available for general allocation. These would include the stack 469 pointer, the frame pointer (except on machines where that can be 470 used as a general register when no frame pointer is needed), the 471 program counter on machines where that is considered one of the 472 addressable registers, and any other numbered register with a 473 standard use. 474 475 This information is expressed as a sequence of numbers, separated 476 by commas and surrounded by braces. The Nth number is 1 if 477 register N is fixed, 0 otherwise. 478 479 The table initialized from this macro, and the table initialized by 480 the following one, may be overridden at run time either 481 automatically, by the actions of the macro 482 `CONDITIONAL_REGISTER_USAGE', or by the user with the command 483 options `-ffixed-REG', `-fcall-used-REG' and `-fcall-saved-REG'. 484 485 r0 and f0 are immutable registers hardwired to 0. 486 r21 is the link register used for procedure linkage. 487 r23 is the stack pointer register. 488 r29 and r30 hold the interrupt context. 489 mdc is a read-only register because the writemdc instruction 490 terminates all the operations of the EAM on the GR6. */ 491 #define FIXED_REGISTERS \ 492 { 1, 0, 0, 0, 0, 0, 0, 0, /* r0 .. r7 */ \ 493 0, 0, 0, 0, 0, 0, 0, 0, /* r8 .. r15 */ \ 494 0, 0, 0, 0, 0, 1, 0, 1, /* r16 .. r23 */ \ 495 0, 0, 0, 0, 0, 1, 1, 0, /* r24 .. r31 */ \ 496 0, 1, /* mdb, mdc */ \ 497 1, 0, 0, 0, 0, 0, 0, 0, /* f0 .. f7 */ \ 498 0, 0, 0, 0, 0, 0, 0, 0, /* f8 .. f15 */ \ 499 1, 1, 1 } /* flags, arg, frame */ 500 501 /* `CALL_USED_REGISTERS' 502 503 Like `FIXED_REGISTERS' but has 1 for each register that is 504 clobbered (in general) by function calls as well as for fixed 505 registers. This macro therefore identifies the registers that are 506 not available for general allocation of values that must live 507 across function calls. 508 509 If a register has 0 in `CALL_USED_REGISTERS', the compiler 510 automatically saves it on function entry and restores it on 511 function exit, if the register is used within the function. */ 512 #define CALL_USED_REGISTERS \ 513 { 1, 1, 1, 1, 1, 1, 1, 1, /* r0 .. r7 */ \ 514 1, 1, 1, 0, 0, 0, 0, 0, /* r8 .. r15 */ \ 515 0, 0, 0, 0, 1, 1, 0, 1, /* r16 .. r23 */ \ 516 1, 1, 1, 1, 1, 1, 1, 1, /* r24 .. r31 */ \ 517 1, 1, /* mdb, mdc */ \ 518 1, 1, 1, 1, 1, 1, 1, 1, /* f0 .. f7 */ \ 519 1, 0, 0, 0, 0, 0, 0, 0, /* f8 .. f15 */ \ 520 1, 1, 1 } /* flags, arg, frame */ 521 522 /* Like `CALL_USED_REGISTERS' except this macro doesn't require that 523 the entire set of `FIXED_REGISTERS' be included. 524 (`CALL_USED_REGISTERS' must be a superset of `FIXED_REGISTERS'). 525 This macro is optional. If not specified, it defaults to the value 526 of `CALL_USED_REGISTERS'. */ 527 #define CALL_REALLY_USED_REGISTERS \ 528 { 0, 1, 1, 1, 1, 1, 1, 1, /* r0 .. r7 */ \ 529 1, 1, 1, 0, 0, 0, 0, 0, /* r8 .. r15 */ \ 530 0, 0, 0, 0, 1, 0, 0, 0, /* r16 .. r23 */ \ 531 1, 1, 1, 1, 1, 0, 0, 1, /* r24 .. r31 */ \ 532 1, 1, /* mdb, mdc */ \ 533 1, 1, 1, 1, 1, 1, 1, 1, /* f0 .. f7 */ \ 534 1, 0, 0, 0, 0, 0, 0, 0, /* f8 .. f15 */ \ 535 1, 0, 0 } /* flags, arg, frame */ 536 537 /* `REG_ALLOC_ORDER' 538 539 If defined, an initializer for a vector of integers, containing the 540 numbers of hard registers in the order in which GCC should prefer 541 to use them (from most preferred to least). 542 543 If this macro is not defined, registers are used lowest numbered 544 first (all else being equal). */ 545 #define REG_ALLOC_ORDER \ 546 { 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, /* r10 .. r1 */ \ 547 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, /* r11 .. r20 */ \ 548 22, /* fp */ \ 549 24, 25, 26, 27, 28, /* r24 .. r28 */ \ 550 31, /* r31 */ \ 551 32, 33, /* mdb, mdc */ \ 552 42, 41, 40, 39, 38, 37, 36, 35, /* f8 .. f1 */ \ 553 43, 44, 45, 46, 47, 48, 49, /* f9 .. f15 */ \ 554 21, 23, /* lr, sp */ \ 555 29, 30, /* r29, r30 */ \ 556 50, 51, 52, /* flags, arg, frame */ \ 557 0, 34 } /* r0, f0 */ 558 559 /* `HARD_REGNO_NREGS (REGNO, MODE)' 560 561 A C expression for the number of consecutive hard registers, 562 starting at register number REGNO, required to hold a value of mode 563 MODE. */ 564 #define HARD_REGNO_NREGS(REGNO, MODE) \ 565 ((REGNO) == MDB_REGNUM ? \ 566 ((GET_MODE_SIZE (MODE) + 2 * UNITS_PER_WORD - 1) / (2 * UNITS_PER_WORD)) \ 567 : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) 568 569 /* `HARD_REGNO_RENAME_OK (OLD_REG, NEW_REG)' 570 571 A C expression which is nonzero if hard register NEW_REG can be 572 considered for use as a rename register for hard register OLD_REG. */ 573 #define HARD_REGNO_RENAME_OK(OLD_REG, NEW_REG) \ 574 visium_hard_regno_rename_ok (OLD_REG, NEW_REG) 575 576 /* `HARD_REGNO_MODE_OK (REGNO, MODE)' 577 578 A C expression that is nonzero if it is permissible to store a 579 value of mode MODE in hard register number REGNO (or in several 580 registers starting with that one). 581 582 Modes with sizes which cross from the one register class to the 583 other cannot be allowed. Only single floats are allowed in the 584 floating point registers, and only fixed point values in the EAM 585 registers. */ 586 #define HARD_REGNO_MODE_OK(REGNO, MODE) \ 587 (GP_REGISTER_P (REGNO) ? \ 588 GP_REGISTER_P (REGNO + HARD_REGNO_NREGS (REGNO, MODE) - 1) \ 589 : FP_REGISTER_P (REGNO) ? \ 590 (MODE) == SFmode || ((MODE) == SImode && TARGET_FPU_IEEE) \ 591 : GET_MODE_CLASS (MODE) == MODE_INT \ 592 && HARD_REGNO_NREGS (REGNO, MODE) == 1) 593 594 /* `MODES_TIEABLE_P (MODE1, MODE2)' 595 596 A C expression that is nonzero if a value of mode MODE1 is 597 accessible in mode MODE2 without copying. 598 599 If `HARD_REGNO_MODE_OK (R, MODE1)' and `HARD_REGNO_MODE_OK (R, 600 MODE2)' are always the same for any R, then `MODES_TIEABLE_P 601 (MODE1, MODE2)' should be nonzero. If they differ for any R, you 602 should define this macro to return zero unless some other mechanism 603 ensures the accessibility of the value in a narrower mode. 604 605 You should define this macro to return nonzero in as many cases as 606 possible since doing so will allow GNU CC to perform better 607 register allocation. */ 608 #define MODES_TIEABLE_P(MODE1, MODE2) \ 609 ((GET_MODE_CLASS (MODE1) == MODE_INT) \ 610 && (GET_MODE_CLASS (MODE2) == MODE_INT)) 611 612 /* Register Classes 613 614 On many machines, the numbered registers are not all equivalent. 615 For example, certain registers may not be allowed for indexed 616 addressing; certain registers may not be allowed in some 617 instructions. These machine restrictions are described to the 618 compiler using "register classes". 619 620 `enum reg_class' 621 622 An enumeral type that must be defined with all the register class 623 names as enumeral values. `NO_REGS' must be first. `ALL_REGS' 624 must be the last register class, followed by one more enumeral 625 value, `LIM_REG_CLASSES', which is not a register class but rather 626 tells how many classes there are. 627 628 Each register class has a number, which is the value of casting the 629 class name to type `int'. The number serves as an index in many of 630 the tables described below. */ 631 632 enum reg_class 633 { 634 NO_REGS, 635 MDB, 636 MDC, 637 FP_REGS, 638 FLAGS, 639 R1, 640 R2, 641 R3, 642 SIBCALL_REGS, 643 LOW_REGS, 644 GENERAL_REGS, 645 ALL_REGS, 646 LIM_REG_CLASSES 647 }; 648 649 /* `N_REG_CLASSES' 650 651 The number of distinct register classes, defined as follows. */ 652 #define N_REG_CLASSES (int) LIM_REG_CLASSES 653 654 /* `REG_CLASS_NAMES' 655 656 An initializer containing the names of the register classes as C 657 string constants. These names are used in writing some of the 658 debugging dumps. */ 659 #define REG_CLASS_NAMES \ 660 {"NO_REGS", "MDB", "MDC", "FP_REGS", "FLAGS", "R1", "R2", "R3", \ 661 "SIBCALL_REGS", "LOW_REGS", "GENERAL_REGS", "ALL_REGS"} 662 663 /* `REG_CLASS_CONTENTS' 664 665 An initializer containing the contents of the register classes, as 666 integers which are bit masks. The Nth integer specifies the 667 contents of class N. The way the integer MASK is interpreted is 668 that register R is in the class if `MASK & (1 << R)' is 1. 669 670 When the machine has more than 32 registers, an integer does not 671 suffice. Then the integers are replaced by sub-initializers, 672 braced groupings containing several integers. Each sub-initializer 673 must be suitable as an initializer for the type `HARD_REG_SET' 674 which is defined in `hard-reg-set.h'. */ 675 #define REG_CLASS_CONTENTS { \ 676 {0x00000000, 0x00000000}, /* NO_REGS */ \ 677 {0x00000000, 0x00000001}, /* MDB */ \ 678 {0x00000000, 0x00000002}, /* MDC */ \ 679 {0x00000000, 0x0003fffc}, /* FP_REGS */ \ 680 {0x00000000, 0x00040000}, /* FLAGS */ \ 681 {0x00000002, 0x00000000}, /* R1 */ \ 682 {0x00000004, 0x00000000}, /* R2 */ \ 683 {0x00000008, 0x00000000}, /* R3 */ \ 684 {0x000005ff, 0x00000000}, /* SIBCALL_REGS */ \ 685 {0x1fffffff, 0x00000000}, /* LOW_REGS */ \ 686 {0xffffffff, 0x00180000}, /* GENERAL_REGS */ \ 687 {0xffffffff, 0x001fffff}} /* ALL_REGS */ 688 689 /* `REGNO_REG_CLASS (REGNO)' 690 691 A C expression whose value is a register class containing hard 692 register REGNO. In general there is more than one such class; 693 choose a class which is "minimal", meaning that no smaller class 694 also contains the register. */ 695 #define REGNO_REG_CLASS(REGNO) \ 696 ((REGNO) == MDB_REGNUM ? MDB : \ 697 (REGNO) == MDC_REGNUM ? MDC : \ 698 FP_REGISTER_P (REGNO) ? FP_REGS : \ 699 (REGNO) == FLAGS_REGNUM ? FLAGS : \ 700 (REGNO) == 1 ? R1 : \ 701 (REGNO) == 2 ? R2 : \ 702 (REGNO) == 3 ? R3 : \ 703 (REGNO) <= 8 || (REGNO) == 10 ? SIBCALL_REGS : \ 704 (REGNO) <= 28 ? LOW_REGS : \ 705 GENERAL_REGS) 706 707 /* `BASE_REG_CLASS' 708 709 A macro whose definition is the name of the class to which a valid 710 base register must belong. A base register is one used in an 711 address which is the register value plus a displacement. */ 712 #define BASE_REG_CLASS GENERAL_REGS 713 714 #define BASE_REGISTER_P(REGNO) \ 715 (GP_REGISTER_P (REGNO) \ 716 || (REGNO) == ARG_POINTER_REGNUM \ 717 || (REGNO) == FRAME_POINTER_REGNUM) 718 719 /* `INDEX_REG_CLASS' 720 721 A macro whose definition is the name of the class to which a valid 722 index register must belong. An index register is one used in an 723 address where its value is either multiplied by a scale factor or 724 added to another register (as well as added to a displacement). */ 725 #define INDEX_REG_CLASS NO_REGS 726 727 /* `REGNO_OK_FOR_BASE_P (NUM)' 728 729 A C expression which is nonzero if register number NUM is suitable 730 for use as a base register in operand addresses. It may be either 731 a suitable hard register or a pseudo register that has been 732 allocated such a hard register. */ 733 #define REGNO_OK_FOR_BASE_P(REGNO) \ 734 (BASE_REGISTER_P (REGNO) || BASE_REGISTER_P ((unsigned)reg_renumber[REGNO])) 735 736 /* `REGNO_OK_FOR_INDEX_P (NUM)' 737 738 A C expression which is nonzero if register number NUM is suitable 739 for use as an index register in operand addresses. It may be 740 either a suitable hard register or a pseudo register that has been 741 allocated such a hard register. 742 743 The difference between an index register and a base register is 744 that the index register may be scaled. If an address involves the 745 sum of two registers, neither one of them scaled, then either one 746 may be labeled the "base" and the other the "index"; but whichever 747 labeling is used must fit the machine's constraints of which 748 registers may serve in each capacity. The compiler will try both 749 labelings, looking for one that is valid, and will reload one or 750 both registers only if neither labeling works. */ 751 #define REGNO_OK_FOR_INDEX_P(REGNO) 0 752 753 /* `PREFERRED_RELOAD_CLASS (X, CLASS)' 754 755 A C expression that places additional restrictions on the register 756 class to use when it is necessary to copy value X into a register 757 in class CLASS. The value is a register class; perhaps CLASS, or 758 perhaps another, smaller class. 759 760 Sometimes returning a more restrictive class makes better code. 761 For example, on the 68000, when X is an integer constant that is in 762 range for a `moveq' instruction, the value of this macro is always 763 `DATA_REGS' as long as CLASS includes the data registers. 764 Requiring a data register guarantees that a `moveq' will be used. 765 766 If X is a `const_double', by returning `NO_REGS' you can force X 767 into a memory constant. This is useful on certain machines where 768 immediate floating values cannot be loaded into certain kinds of 769 registers. */ 770 #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS 771 772 /* `CANNOT_CHANGE_MODE_CLASS (from, to, class) 773 774 If defined, a C expression that returns nonzero for a `class' for 775 which a change from mode `from' to mode `to' is invalid. 776 777 It's not obvious from the above that MDB cannot change mode. However 778 difficulties arise from expressions of the form 779 780 (subreg:SI (reg:DI R_MDB) 0) 781 782 There is no way to convert that reference to a single machine 783 register and, without the following definition, reload will quietly 784 convert it to 785 786 (reg:SI R_MDB) */ 787 #define CANNOT_CHANGE_MODE_CLASS(FROM,TO,CLASS) \ 788 (CLASS == MDB ? (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO)) : 0) 789 790 /* `CLASS_MAX_NREGS (CLASS, MODE)' 791 792 A C expression for the maximum number of consecutive registers of 793 class CLASS needed to hold a value of mode MODE. 794 795 This is closely related to the macro `HARD_REGNO_NREGS'. In fact, 796 the value of the macro `CLASS_MAX_NREGS (CLASS, MODE)' should be 797 the maximum value of `HARD_REGNO_NREGS (REGNO, MODE)' for all REGNO 798 values in the class CLASS. 799 800 This macro helps control the handling of multiple-word values in 801 the reload pass. */ 802 #define CLASS_MAX_NREGS(CLASS, MODE) \ 803 ((CLASS) == MDB ? \ 804 ((GET_MODE_SIZE (MODE) + 2 * UNITS_PER_WORD - 1) / (2 * UNITS_PER_WORD)) \ 805 : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) 806 807 /* Stack Layout and Calling Conventions 808 809 Basic Stack Layout 810 811 `STACK_GROWS_DOWNWARD' 812 Define this macro if pushing a word onto the stack moves the stack 813 pointer to a smaller address. */ 814 #define STACK_GROWS_DOWNWARD 1 815 816 /* `STARTING_FRAME_OFFSET' 817 818 Offset from the frame pointer to the first local variable slot to 819 be allocated. 820 821 If `FRAME_GROWS_DOWNWARD', find the next slot's offset by 822 subtracting the first slot's length from `STARTING_FRAME_OFFSET'. 823 Otherwise, it is found by adding the length of the first slot to 824 the value `STARTING_FRAME_OFFSET'. */ 825 #define STARTING_FRAME_OFFSET 0 826 827 /* `FIRST_PARM_OFFSET (FUNDECL)' 828 829 Offset from the argument pointer register to the first argument's 830 address. On some machines it may depend on the data type of the 831 function. 832 833 If `ARGS_GROW_DOWNWARD', this is the offset to the location above 834 the first argument's address. */ 835 #define FIRST_PARM_OFFSET(FNDECL) 0 836 837 /* `DYNAMIC_CHAIN_ADDRESS (FRAMEADDR)' 838 839 A C expression whose value is RTL representing the address in a 840 stack frame where the pointer to the caller's frame is stored. 841 Assume that FRAMEADDR is an RTL expression for the address of the 842 stack frame itself. 843 844 If you don't define this macro, the default is to return the value 845 of FRAMEADDR--that is, the stack frame address is also the address 846 of the stack word that points to the previous frame. */ 847 #define DYNAMIC_CHAIN_ADDRESS(FRAMEADDR) \ 848 visium_dynamic_chain_address (FRAMEADDR) 849 850 /* `RETURN_ADDR_RTX (COUNT, FRAMEADDR)' 851 852 A C expression whose value is RTL representing the value of the 853 return address for the frame COUNT steps up from the current frame, 854 after the prologue. FRAMEADDR is the frame pointer of the COUNT 855 frame, or the frame pointer of the COUNT - 1 frame if 856 `RETURN_ADDR_IN_PREVIOUS_FRAME' is defined. 857 858 The value of the expression must always be the correct address when 859 COUNT is zero, but may be `NULL_RTX' if there is not way to 860 determine the return address of other frames. */ 861 #define RETURN_ADDR_RTX(COUNT,FRAMEADDR) \ 862 visium_return_addr_rtx (COUNT, FRAMEADDR) 863 864 /* Exception Handling 865 866 `EH_RETURN_DATA_REGNO' 867 868 A C expression whose value is the Nth register number used for data 869 by exception handlers or INVALID_REGNUM if fewer than N registers 870 are available. 871 872 The exception handling library routines communicate with the 873 exception handlers via a set of agreed upon registers. */ 874 #define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + 11 : INVALID_REGNUM) 875 #define EH_RETURN_STACKADJ_RTX gen_rtx_REG (SImode, 8) 876 #define EH_RETURN_HANDLER_RTX visium_eh_return_handler_rtx () 877 878 /* Registers That Address the Stack Frame 879 880 This discusses registers that address the stack frame. 881 882 `STACK_POINTER_REGNUM' 883 884 The register number of the stack pointer register, which must also 885 be a fixed register according to `FIXED_REGISTERS'. On most 886 machines, the hardware determines which register this is. */ 887 #define STACK_POINTER_REGNUM 23 888 889 /* `FRAME_POINTER_REGNUM' 890 891 The register number of the frame pointer register, which is used to 892 access automatic variables in the stack frame. On some machines, 893 the hardware determines which register this is. On other machines, 894 you can choose any register you wish for this purpose. */ 895 #define FRAME_POINTER_REGNUM 52 896 897 /* `HARD_FRAME_POINTER_REGNUM' 898 899 On some machines the offset between the frame pointer and starting 900 offset of the automatic variables is not known until after register 901 allocation has been done (for example, because the saved registers 902 are between these two locations). On those machines, define 903 `FRAME_POINTER_REGNUM' the number of a special, fixed register to 904 be used internally until the offset is known, and define 905 `HARD_FRAME_POINTER_REGNUM' to be the actual hard register number 906 used for the frame pointer. */ 907 #define HARD_FRAME_POINTER_REGNUM 22 908 909 /* `ARG_POINTER_REGNUM' 910 911 The register number of the arg pointer register, which is used to 912 access the function's argument list. On some machines, this is the 913 same as the frame pointer register. On some machines, the hardware 914 determines which register this is. On other machines, you can 915 choose any register you wish for this purpose. If this is not the 916 same register as the frame pointer register, then you must mark it 917 as a fixed register according to `FIXED_REGISTERS', or arrange to 918 be able to eliminate it (*note Elimination::.). */ 919 #define ARG_POINTER_REGNUM 51 920 921 /* `STATIC_CHAIN_REGNUM' 922 `STATIC_CHAIN_INCOMING_REGNUM' 923 924 Register numbers used for passing a function's static chain 925 pointer. If register windows are used, the register number as seen 926 by the called function is `STATIC_CHAIN_INCOMING_REGNUM', while the 927 register number as seen by the calling function is 928 `STATIC_CHAIN_REGNUM'. If these registers are the same, 929 `STATIC_CHAIN_INCOMING_REGNUM' need not be defined. 930 931 The static chain register need not be a fixed register. 932 933 If the static chain is passed in memory, these macros should not be 934 defined; instead, the next two macros should be defined. */ 935 #define STATIC_CHAIN_REGNUM 20 936 937 /* `ELIMINABLE_REGS' 938 939 If defined, this macro specifies a table of register pairs used to 940 eliminate unneeded registers that point into the stack frame. If 941 it is not defined, the only elimination attempted by the compiler 942 is to replace references to the frame pointer with references to 943 the stack pointer. 944 945 The definition of this macro is a list of structure 946 initializations, each of which specifies an original and 947 replacement register. 948 949 On some machines, the position of the argument pointer is not known 950 until the compilation is completed. In such a case, a separate 951 hard register must be used for the argument pointer. This register 952 can be eliminated by replacing it with either the frame pointer or 953 the argument pointer, depending on whether or not the frame pointer 954 has been eliminated. 955 956 Note that the elimination of the argument pointer with the stack 957 pointer is specified first since that is the preferred elimination. */ 958 #define ELIMINABLE_REGS \ 959 {{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ 960 { ARG_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}, \ 961 { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ 962 { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}} 963 964 /* `INITIAL_ELIMINATION_OFFSET (FROM-REG, TO-REG, OFFSET-VAR)' 965 966 This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'. It 967 specifies the initial difference between the specified pair of 968 registers. This macro must be defined if `ELIMINABLE_REGS' is 969 defined. */ 970 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ 971 (OFFSET = visium_initial_elimination_offset (FROM, TO)) 972 973 /* Passing Function Arguments on the Stack 974 975 The macros in this section control how arguments are passed on the 976 stack. See the following section for other macros that control 977 passing certain arguments in registers. 978 979 Passing Arguments in Registers 980 981 This section describes the macros which let you control how various 982 types of arguments are passed in registers or how they are arranged 983 in the stack. 984 985 Define the general purpose, and floating point registers used for 986 passing arguments */ 987 #define MAX_ARGS_IN_GP_REGISTERS 8 988 #define GP_ARG_FIRST 1 989 #define GP_ARG_LAST (GP_ARG_FIRST + MAX_ARGS_IN_GP_REGISTERS - 1) 990 #define MAX_ARGS_IN_FP_REGISTERS 8 991 #define FP_ARG_FIRST (FP_FIRST_REGNUM + 1) 992 #define FP_ARG_LAST (FP_ARG_FIRST + MAX_ARGS_IN_FP_REGISTERS - 1) 993 994 /* Define a data type for recording info about an argument list during the 995 processing of that argument list. */ 996 997 struct visium_args 998 { 999 /* The count of general registers used */ 1000 int grcount; 1001 /* The count of floating registers used */ 1002 int frcount; 1003 /* The number of stack words used by named arguments */ 1004 int stack_words; 1005 }; 1006 1007 /* `CUMULATIVE_ARGS' 1008 1009 A C type for declaring a variable that is used as the first 1010 argument of `FUNCTION_ARG' and other related values. For some 1011 target machines, the type `int' suffices and can hold the number of 1012 bytes of argument so far. 1013 1014 There is no need to record in `CUMULATIVE_ARGS' anything about the 1015 arguments that have been passed on the stack. The compiler has 1016 other variables to keep track of that. For target machines on 1017 which all arguments are passed on the stack, there is no need to 1018 store anything in `CUMULATIVE_ARGS'; however, the data structure 1019 must exist and should not be empty, so use `int'. */ 1020 #define CUMULATIVE_ARGS struct visium_args 1021 1022 #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,FNDECL,N_NAMED_ARGS) \ 1023 do { \ 1024 (CUM).grcount = 0; \ 1025 (CUM).frcount = 0; \ 1026 (CUM).stack_words = 0; \ 1027 } while (0) 1028 1029 /* `FUNCTION_ARG_REGNO_P (REGNO)' 1030 1031 A C expression that is nonzero if REGNO is the number of a hard 1032 register in which function arguments are sometimes passed. This 1033 does *not* include implicit arguments such as the static chain and 1034 the structure-value address. On many machines, no registers can be 1035 used for this purpose since all function arguments are pushed on 1036 the stack. */ 1037 #define FUNCTION_ARG_REGNO_P(N) \ 1038 ((GP_ARG_FIRST <= (N) && (N) <= GP_ARG_LAST) \ 1039 || (TARGET_FPU && FP_ARG_FIRST <= (N) && (N) <= FP_ARG_LAST)) 1040 1041 /* `FUNCTION_VALUE_REGNO_P (REGNO)' 1042 1043 A C expression that is nonzero if REGNO is the number of a hard 1044 register in which the values of called function may come back. 1045 1046 A register whose use for returning values is limited to serving as 1047 the second of a pair (for a value of type `double', say) need not 1048 be recognized by this macro. If the machine has register windows, 1049 so that the caller and the called function use different registers 1050 for the return value, this macro should recognize only the caller's 1051 register numbers. */ 1052 #define FUNCTION_VALUE_REGNO_P(N) \ 1053 ((N) == RETURN_REGNUM || (TARGET_FPU && (N) == FP_RETURN_REGNUM)) 1054 1055 /* How Large Values Are Returned 1056 1057 When a function value's mode is `BLKmode' (and in some other 1058 cases), the value is not returned according to `FUNCTION_VALUE'. 1059 Instead, the caller passes the address of a block of memory in 1060 which the value should be stored. This address is called the 1061 "structure value address". 1062 1063 This section describes how to control returning structure values in 1064 memory. 1065 1066 `DEFAULT_PCC_STRUCT_RETURN' 1067 1068 Define this macro to be 1 if all structure and union return values 1069 must be in memory. Since this results in slower code, this should 1070 be defined only if needed for compatibility with other compilers or 1071 with an ABI. If you define this macro to be 0, then the 1072 conventions used for structure and union return values are decided 1073 by the `RETURN_IN_MEMORY' macro. 1074 1075 If not defined, this defaults to the value 1. */ 1076 #define DEFAULT_PCC_STRUCT_RETURN 0 1077 1078 /* `STRUCT_VALUE' 1079 1080 If the structure value address is not passed in a register, define 1081 `STRUCT_VALUE' as an expression returning an RTX for the place 1082 where the address is passed. If it returns 0, the address is 1083 passed as an "invisible" first argument. */ 1084 #define STRUCT_VALUE 0 1085 1086 /* Caller-Saves Register Allocation 1087 1088 If you enable it, GNU CC can save registers around function calls. 1089 This makes it possible to use call-clobbered registers to hold 1090 variables that must live across calls. 1091 1092 Function Entry and Exit 1093 1094 This section describes the macros that output function entry 1095 ("prologue") and exit ("epilogue") code. 1096 1097 `EXIT_IGNORE_STACK' 1098 1099 Define this macro as a C expression that is nonzero if the return 1100 instruction or the function epilogue ignores the value of the stack 1101 pointer; in other words, if it is safe to delete an instruction to 1102 adjust the stack pointer before a return from the function. 1103 1104 Note that this macro's value is relevant only for functions for 1105 which frame pointers are maintained. It is never safe to delete a 1106 final stack adjustment in a function that has no frame pointer, and 1107 the compiler knows this regardless of `EXIT_IGNORE_STACK'. */ 1108 #define EXIT_IGNORE_STACK 1 1109 1110 /* `EPILOGUE_USES (REGNO)' 1111 1112 Define this macro as a C expression that is nonzero for registers 1113 are used by the epilogue or the `return' pattern. The stack and 1114 frame pointer registers are already be assumed to be used as 1115 needed. */ 1116 #define EPILOGUE_USES(REGNO) visium_epilogue_uses (REGNO) 1117 1118 /* Generating Code for Profiling 1119 1120 These macros will help you generate code for profiling. */ 1121 1122 #define PROFILE_HOOK(LABEL) visium_profile_hook () 1123 #define FUNCTION_PROFILER(FILE, LABELNO) do {} while (0) 1124 #define NO_PROFILE_COUNTERS 1 1125 1126 /* Trampolines for Nested Functions 1127 1128 A trampoline is a small piece of code that is created at run time 1129 when the address of a nested function is taken. It normally resides 1130 on the stack, in the stack frame of the containing function. These 1131 macros tell GCC how to generate code to allocate and initialize a 1132 trampoline. 1133 1134 The instructions in the trampoline must do two things: load a 1135 constant address into the static chain register, and jump to the 1136 real address of the nested function. On CISC machines such as the 1137 m68k, this requires two instructions, a move immediate and a 1138 jump. Then the two addresses exist in the trampoline as word-long 1139 immediate operands. On RISC machines, it is often necessary to load 1140 each address into a register in two parts. Then pieces of each 1141 address form separate immediate operands. 1142 1143 The code generated to initialize the trampoline must store the 1144 variable parts--the static chain value and the function 1145 address--into the immediate operands of the instructions. On a CISC 1146 machine, this is simply a matter of copying each address to a 1147 memory reference at the proper offset from the start of the 1148 trampoline. On a RISC machine, it may be necessary to take out 1149 pieces of the address and store them separately. 1150 1151 On the Visium, the trampoline is 1152 1153 moviu r9,%u FUNCTION 1154 movil r9,%l FUNCTION 1155 moviu r20,%u STATIC 1156 bra tr,r9,r0 1157 movil r20,%l STATIC 1158 1159 A difficulty is setting the correct instruction parity at run time. 1160 1161 1162 TRAMPOLINE_SIZE 1163 A C expression for the size in bytes of the trampoline, as an integer. */ 1164 #define TRAMPOLINE_SIZE 20 1165 1166 /* Implicit calls to library routines 1167 1168 Avoid calling library routines (sqrtf) just to set `errno' to EDOM */ 1169 #define TARGET_EDOM 33 1170 1171 /* Addressing Modes 1172 1173 `MAX_REGS_PER_ADDRESS' 1174 1175 A number, the maximum number of registers that can appear in a 1176 valid memory address. Note that it is up to you to specify a value 1177 equal to the maximum number that `TARGET_LEGITIMATE_ADDRESS_P' would 1178 ever accept. */ 1179 #define MAX_REGS_PER_ADDRESS 1 1180 1181 /* `LEGITIMIZE_RELOAD_ADDRESS (X, MODE, OPNUM, TYPE, IND_LEVELS, WIN)' 1182 1183 A C compound statement that attempts to replace X, which is an 1184 address that needs reloading, with a valid memory address for an 1185 operand of mode MODE. WIN will be a C statement label elsewhere 1186 in the code. It is not necessary to define this macro, but it 1187 might be useful for performance reasons. */ 1188 #define LEGITIMIZE_RELOAD_ADDRESS(AD, MODE, OPNUM, TYPE, IND, WIN) \ 1189 do \ 1190 { \ 1191 rtx new_x = visium_legitimize_reload_address ((AD), (MODE), (OPNUM), \ 1192 (int) (TYPE), (IND)); \ 1193 if (new_x) \ 1194 { \ 1195 (AD) = new_x; \ 1196 goto WIN; \ 1197 } \ 1198 } while (0) 1199 1200 /* Given a comparison code (EQ, NE, etc.) and the operands of a COMPARE, 1201 return the mode to be used for the comparison. */ 1202 #define SELECT_CC_MODE(OP,X,Y) visium_select_cc_mode ((OP), (X), (Y)) 1203 1204 /* Return nonzero if MODE implies a floating point inequality can be 1205 reversed. For Visium this is always true because we have a full 1206 compliment of ordered and unordered comparisons, but until generic 1207 code knows how to reverse it correctly we keep the old definition. */ 1208 #define REVERSIBLE_CC_MODE(MODE) ((MODE) != CCFPEmode && (MODE) != CCFPmode) 1209 1210 /* `BRANCH_COST' 1211 1212 A C expression for the cost of a branch instruction. A value of 1 1213 is the default; other values are interpreted relative to that. */ 1214 #define BRANCH_COST(A,B) 10 1215 1216 /* Override BRANCH_COST heuristics for complex logical ops. */ 1217 #define LOGICAL_OP_NON_SHORT_CIRCUIT 0 1218 1219 /* `SLOW_BYTE_ACCESS' 1220 1221 Define this macro as a C expression which is nonzero if accessing 1222 less than a word of memory (i.e. a `char' or a `short') is no 1223 faster than accessing a word of memory, i.e., if such access 1224 require more than one instruction or if there is no difference in 1225 cost between byte and (aligned) word loads. 1226 1227 When this macro is not defined, the compiler will access a field by 1228 finding the smallest containing object; when it is defined, a 1229 fullword load will be used if alignment permits. Unless bytes 1230 accesses are faster than word accesses, using word accesses is 1231 preferable since it may eliminate subsequent memory access if 1232 subsequent accesses occur to other fields in the same word of the 1233 structure, but to different bytes. */ 1234 #define SLOW_BYTE_ACCESS 0 1235 1236 /* `MOVE_RATIO (SPEED)` 1237 1238 The threshold of number of scalar memory-to-memory move insns, 1239 _below_ which a sequence of insns should be generated instead of a 1240 string move insn or a library call. Increasing the value will 1241 always make code faster, but eventually incurs high cost in 1242 increased code size. 1243 1244 Since we have a movmemsi pattern, the default MOVE_RATIO is 2, which 1245 is too low given that movmemsi will invoke a libcall. */ 1246 #define MOVE_RATIO(speed) ((speed) ? 9 : 3) 1247 1248 /* `CLEAR_RATIO (SPEED)` 1249 1250 The threshold of number of scalar move insns, _below_ which a 1251 sequence of insns should be generated to clear memory instead of a 1252 string clear insn or a library call. Increasing the value will 1253 always make code faster, but eventually incurs high cost in 1254 increased code size. 1255 1256 Since we have a setmemsi pattern, the default CLEAR_RATIO is 2, which 1257 is too low given that setmemsi will invoke a libcall. */ 1258 #define CLEAR_RATIO(speed) ((speed) ? 13 : 5) 1259 1260 /* `MOVE_MAX' 1261 1262 The maximum number of bytes that a single instruction can move 1263 quickly between memory and registers or between two memory 1264 locations. */ 1265 #define MOVE_MAX 4 1266 1267 /* `MAX_MOVE_MAX' 1268 1269 The maximum number of bytes that a single instruction can move 1270 quickly between memory and registers or between two memory 1271 locations. If this is undefined, the default is `MOVE_MAX'. 1272 Otherwise, it is the constant value that is the largest value that 1273 `MOVE_MAX' can have at run-time. */ 1274 #define MAX_MOVE_MAX 4 1275 1276 /* `SHIFT_COUNT_TRUNCATED' 1277 1278 A C expression that is nonzero if on this machine the number of 1279 bits actually used for the count of a shift operation is equal to 1280 the number of bits needed to represent the size of the object being 1281 shifted. When this macro is non-zero, the compiler will assume 1282 that it is safe to omit a sign-extend, zero-extend, and certain 1283 bitwise `and' instructions that truncates the count of a shift 1284 operation. On machines that have instructions that act on 1285 bitfields at variable positions, which may include `bit test' 1286 instructions, a nonzero `SHIFT_COUNT_TRUNCATED' also enables 1287 deletion of truncations of the values that serve as arguments to 1288 bitfield instructions. */ 1289 #define SHIFT_COUNT_TRUNCATED 0 1290 1291 /* `TRULY_NOOP_TRUNCATION (OUTPREC, INPREC)' 1292 1293 A C expression which is nonzero if on this machine it is safe to 1294 "convert" an integer of INPREC bits to one of OUTPREC bits (where 1295 OUTPREC is smaller than INPREC) by merely operating on it as if it 1296 had only OUTPREC bits. 1297 1298 On many machines, this expression can be 1. 1299 1300 When `TRULY_NOOP_TRUNCATION' returns 1 for a pair of sizes for 1301 modes for which `MODES_TIEABLE_P' is 0, suboptimal code can result. 1302 If this is the case, making `TRULY_NOOP_TRUNCATION' return 0 in 1303 such cases may improve things. */ 1304 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1 1305 1306 /* `STORE_FLAG_VALUE' 1307 1308 A C expression describing the value returned by a comparison 1309 operator with an integral mode and stored by a store-flag 1310 instruction (`sCOND') when the condition is true. This description 1311 must apply to *all* the `sCOND' patterns and all the comparison 1312 operators whose results have a `MODE_INT' mode. */ 1313 #define STORE_FLAG_VALUE 1 1314 1315 /* `Pmode' 1316 1317 An alias for the machine mode for pointers. On most machines, 1318 define this to be the integer mode corresponding to the width of a 1319 hardware pointer; `SImode' on 32-bit machine or `DImode' on 64-bit 1320 machines. On some machines you must define this to be one of the 1321 partial integer modes, such as `PSImode'. 1322 1323 The width of `Pmode' must be at least as large as the value of 1324 `POINTER_SIZE'. If it is not equal, you must define the macro 1325 `POINTERS_EXTEND_UNSIGNED' to specify how pointers are extended to 1326 `Pmode'. */ 1327 #define Pmode SImode 1328 1329 /* `FUNCTION_MODE' 1330 1331 An alias for the machine mode used for memory references to 1332 functions being called, in `call' RTL expressions. On most 1333 machines this should be `QImode'. */ 1334 #define FUNCTION_MODE SImode 1335 1336 /* `NO_IMPLICIT_EXTERN_C' 1337 1338 Define this macro if the system header files support C++ as well as 1339 C. This macro inhibits the usual method of using system header 1340 files in C++, which is to pretend that the file's contents are 1341 enclosed in `extern "C" {...}'. */ 1342 #define NO_IMPLICIT_EXTERN_C 1343 1344 /* Dividing the Output into Sections (Texts, Data, ...) 1345 1346 An object file is divided into sections containing different types 1347 of data. In the most common case, there are three sections: the 1348 "text section", which holds instructions and read-only data; the 1349 "data section", which holds initialized writable data; and the "bss 1350 section", which holds uninitialized data. Some systems have other 1351 kinds of sections. 1352 1353 `TEXT_SECTION_ASM_OP' 1354 1355 A C expression whose value is a string containing the assembler 1356 operation that should precede instructions and read-only data. 1357 Normally `".text"' is right. */ 1358 #define TEXT_SECTION_ASM_OP "\t.text" 1359 1360 /* `DATA_SECTION_ASM_OP' 1361 1362 A C expression whose value is a string containing the assembler 1363 operation to identify the following data as writable initialized 1364 data. Normally `".data"' is right. */ 1365 #define DATA_SECTION_ASM_OP "\t.data" 1366 1367 /* `BSS_SECTION_ASM_OP' 1368 1369 If defined, a C expression whose value is a string containing the 1370 assembler operation to identify the following data as uninitialized 1371 global data. If not defined, and neither `ASM_OUTPUT_BSS' nor 1372 `ASM_OUTPUT_ALIGNED_BSS' are defined, uninitialized global data 1373 will be output in the data section if `-fno-common' is passed, 1374 otherwise `ASM_OUTPUT_COMMON' will be used. 1375 1376 `EXTRA_SECTIONS' 1377 1378 A list of names for sections other than the standard two, which are 1379 `in_text' and `in_data'. You need not define this macro on a 1380 system with no other sections (that GCC needs to use). 1381 1382 `EXTRA_SECTION_FUNCTIONS' 1383 1384 One or more functions to be defined in `varasm.c'. These functions 1385 should do jobs analogous to those of `text_section' and 1386 `data_section', for your additional sections. Do not define this 1387 macro if you do not define `EXTRA_SECTIONS'. 1388 1389 `JUMP_TABLES_IN_TEXT_SECTION' Define this macro if jump tables (for 1390 `tablejump' insns) should be output in the text section, along with 1391 the assembler instructions. Otherwise, the readonly data section 1392 is used. 1393 1394 This macro is irrelevant if there is no separate readonly data 1395 section. */ 1396 #undef JUMP_TABLES_IN_TEXT_SECTION 1397 1398 1399 /* The Overall Framework of an Assembler File 1400 1401 This describes the overall framework of an assembler file. 1402 1403 `ASM_COMMENT_START' 1404 1405 A C string constant describing how to begin a comment in the target 1406 assembler language. The compiler assumes that the comment will end 1407 at the end of the line. */ 1408 #define ASM_COMMENT_START ";" 1409 1410 /* `ASM_APP_ON' 1411 1412 A C string constant for text to be output before each `asm' 1413 statement or group of consecutive ones. Normally this is `"#APP"', 1414 which is a comment that has no effect on most assemblers but tells 1415 the GNU assembler that it must check the lines that follow for all 1416 valid assembler constructs. */ 1417 #define ASM_APP_ON "#APP\n" 1418 1419 /* `ASM_APP_OFF' 1420 1421 A C string constant for text to be output after each `asm' 1422 statement or group of consecutive ones. Normally this is 1423 `"#NO_APP"', which tells the GNU assembler to resume making the 1424 time-saving assumptions that are valid for ordinary compiler 1425 output. */ 1426 #define ASM_APP_OFF "#NO_APP\n" 1427 1428 /* Output of Data 1429 1430 This describes data output. 1431 1432 Output and Generation of Labels 1433 1434 This is about outputting labels. 1435 1436 `ASM_OUTPUT_LABEL (STREAM, NAME)' 1437 1438 A C statement (sans semicolon) to output to the stdio stream STREAM 1439 the assembler definition of a label named NAME. Use the expression 1440 `assemble_name (STREAM, NAME)' to output the name itself; before 1441 and after that, output the additional assembler syntax for defining 1442 the name, and a newline. */ 1443 #define ASM_OUTPUT_LABEL(STREAM,NAME) \ 1444 do { assemble_name (STREAM, NAME); fputs (":\n", STREAM); } while (0) 1445 1446 /* Globalizing directive for a label */ 1447 #define GLOBAL_ASM_OP "\t.global " 1448 1449 /* `ASM_OUTPUT_LABELREF (STREAM, NAME)' 1450 1451 A C statement (sans semicolon) to output to the stdio stream STREAM 1452 a reference in assembler syntax to a label named NAME. This should 1453 add `_' to the front of the name, if that is customary on your 1454 operating system, as it is in most Berkeley Unix systems. This 1455 macro is used in `assemble_name'. */ 1456 #define ASM_OUTPUT_LABELREF(STREAM,NAME) \ 1457 asm_fprintf (STREAM, "%U%s", NAME) 1458 1459 /* Output of Assembler Instructions 1460 1461 This describes assembler instruction output. 1462 1463 `REGISTER_NAMES' 1464 1465 A C initializer containing the assembler's names for the machine 1466 registers, each one as a C string constant. This is what 1467 translates register numbers in the compiler into assembler 1468 language. */ 1469 #define REGISTER_NAMES \ 1470 {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \ 1471 "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \ 1472 "r16", "r17", "r18", "r19", "r20", "r21", "fp", "sp", \ 1473 "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31", \ 1474 "mdb", "mdc", \ 1475 "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \ 1476 "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \ 1477 "flags","argp","sfp" } 1478 1479 /* `ADDITIONAL_REGISTER_NAMES` 1480 1481 If defined, a C initializer for an array of structures containing 1482 a name and a register number. This macro defines additional names 1483 for hard registers, thus allowing the `asm' option in declarations 1484 to refer to registers using alternate names. */ 1485 #define ADDITIONAL_REGISTER_NAMES \ 1486 {{"r22", HARD_FRAME_POINTER_REGNUM}, {"r23", STACK_POINTER_REGNUM}} 1487 1488 /* `PRINT_OPERAND (STREAM, X, CODE)' 1489 1490 A C compound statement to output to stdio stream STREAM the 1491 assembler syntax for an instruction operand X. X is an RTL 1492 expression. 1493 1494 CODE is a value that can be used to specify one of several ways of 1495 printing the operand. It is used when identical operands must be 1496 printed differently depending on the context. CODE comes from the 1497 `%' specification that was used to request printing of the operand. 1498 If the specification was just `%DIGIT' then CODE is 0; if the 1499 specification was `%LTR DIGIT' then CODE is the ASCII code for LTR. 1500 1501 If X is a register, this macro should print the register's name. 1502 The names can be found in an array `reg_names' whose type is `char 1503 *[]'. `reg_names' is initialized from `REGISTER_NAMES'. 1504 1505 When the machine description has a specification `%PUNCT' (a `%' 1506 followed by a punctuation character), this macro is called with a 1507 null pointer for X and the punctuation character for CODE. */ 1508 #define PRINT_OPERAND(STREAM, X, CODE) print_operand (STREAM, X, CODE) 1509 1510 /* `PRINT_OPERAND_PUNCT_VALID_P (CODE)' 1511 1512 A C expression which evaluates to true if CODE is a valid 1513 punctuation character for use in the `PRINT_OPERAND' macro. If 1514 `PRINT_OPERAND_PUNCT_VALID_P' is not defined, it means that no 1515 punctuation characters (except for the standard one, `%') are used */ 1516 #define PRINT_OPERAND_PUNCT_VALID_P(CODE) ((CODE) == '#') 1517 1518 /* `PRINT_OPERAND_ADDRESS (STREAM, X)' 1519 1520 A C compound statement to output to stdio stream STREAM the 1521 assembler syntax for an instruction operand that is a memory 1522 reference whose address is X. X is an RTL expression. 1523 1524 On some machines, the syntax for a symbolic address depends on the 1525 section that the address refers to. On these machines, define the 1526 macro `ENCODE_SECTION_INFO' to store the information into the 1527 `symbol_ref', and then check for it here. */ 1528 #define PRINT_OPERAND_ADDRESS(STREAM, ADDR) \ 1529 print_operand_address (STREAM, ADDR) 1530 1531 /* `REGISTER_PREFIX' 1532 `LOCAL_LABEL_PREFIX' 1533 `USER_LABEL_PREFIX' 1534 `IMMEDIATE_PREFIX' 1535 1536 If defined, C string expressions to be used for the `%R', `%L', 1537 `%U', and `%I' options of `asm_fprintf' (see `final.c'). These are 1538 useful when a single `md' file must support multiple assembler 1539 formats. In that case, the various `tm.h' files can define these 1540 macros differently. */ 1541 #define REGISTER_PREFIX "" 1542 #define LOCAL_LABEL_PREFIX "." 1543 #define IMMEDIATE_PREFIX "#" 1544 1545 /* `ASM_OUTPUT_REG_PUSH (STREAM, REGNO)' 1546 1547 A C expression to output to STREAM some assembler code which will 1548 push hard register number REGNO onto the stack. The code need not 1549 be optimal, since this macro is used only when profiling. */ 1550 #define ASM_OUTPUT_REG_PUSH(STREAM,REGNO) \ 1551 asm_fprintf (STREAM, "\tsubi sp,4\n\twrite.l (sp),%s\n", \ 1552 reg_names[REGNO]) 1553 1554 /* `ASM_OUTPUT_REG_POP (STREAM, REGNO)' 1555 1556 A C expression to output to STREAM some assembler code which will 1557 pop hard register number REGNO off of the stack. The code need not 1558 be optimal, since this macro is used only when profiling. */ 1559 #define ASM_OUTPUT_REG_POP(STREAM,REGNO) \ 1560 asm_fprintf (STREAM, "\tread.l %s,(sp)\n\taddi sp,4\n", \ 1561 reg_names[REGNO]) 1562 1563 1564 /* Output of Dispatch Tables 1565 1566 This concerns dispatch tables. 1567 1568 `ASM_OUTPUT_ADDR_DIFF_ELT (STREAM, VALUE, REL)' 1569 1570 A C statement to output to the stdio stream STREAM an assembler 1571 pseudo-instruction to generate a difference between two labels. 1572 VALUE and REL are the numbers of two internal labels. The 1573 definitions of these labels are output using 1574 `ASM_OUTPUT_INTERNAL_LABEL', and they must be printed in the same 1575 way here. 1576 1577 You must provide this macro on machines where the addresses in a 1578 dispatch table are relative to the table's own address. If 1579 defined, GNU CC will also use this macro on all machines when 1580 producing PIC. */ 1581 #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM,BODY,VALUE,REL) \ 1582 switch (GET_MODE (BODY)) \ 1583 { \ 1584 case SImode: \ 1585 asm_fprintf ((STREAM), "\t.long\t%LL%d-%LL%d\n", (VALUE),(REL)); \ 1586 break; \ 1587 case HImode: \ 1588 asm_fprintf ((STREAM), "\t.word\t%LL%d-%LL%d\n", (VALUE),(REL)); \ 1589 break; \ 1590 case QImode: \ 1591 asm_fprintf ((STREAM), "\t.byte\t%LL%d-%LL%d\n", (VALUE),(REL)); \ 1592 break; \ 1593 default: \ 1594 break; \ 1595 } 1596 1597 /* `ASM_OUTPUT_ADDR_VEC_ELT (STREAM, VALUE)' 1598 1599 This macro should be provided on machines where the addresses in a 1600 dispatch table are absolute. 1601 1602 The definition should be a C statement to output to the stdio 1603 stream STREAM an assembler pseudo-instruction to generate a 1604 reference to a label. VALUE is the number of an internal label 1605 whose definition is output using `ASM_OUTPUT_INTERNAL_LABEL'. */ 1606 #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE) \ 1607 asm_fprintf (STREAM, "\t.long %LL%d\n", VALUE) 1608 1609 /* `ASM_OUTPUT_CASE_END (STREAM, NUM, TABLE)' 1610 1611 Define this if something special must be output at the end of a 1612 jump-table. The definition should be a C statement to be executed 1613 after the assembler code for the table is written. It should write 1614 the appropriate code to stdio stream STREAM. The argument TABLE is 1615 the jump-table insn, and NUM is the label-number of the preceding 1616 label. 1617 1618 If this macro is not defined, nothing special is output at the end 1619 of a jump table. 1620 1621 Here we output a word of zero so that jump-tables can be seperated 1622 in reverse assembly. */ 1623 #define ASM_OUTPUT_CASE_END(STREAM, NUM, TABLE) \ 1624 asm_fprintf (STREAM, "\t.long 0\n"); 1625 1626 /* Assembler Commands for Alignment 1627 1628 This describes commands for alignment. 1629 1630 `ASM_OUTPUT_ALIGN_CODE (STREAM)' 1631 1632 A C expression to output text to align the location counter in the 1633 way that is desirable at a point in the code that is reached only 1634 by jumping. 1635 1636 This macro need not be defined if you don't want any special 1637 alignment to be done at such a time. Most machine descriptions do 1638 not currently define the macro. */ 1639 #undef ASM_OUTPUT_ALIGN_CODE 1640 1641 /* `ASM_OUTPUT_LOOP_ALIGN (STREAM)' 1642 1643 A C expression to output text to align the location counter in the 1644 way that is desirable at the beginning of a loop. 1645 1646 This macro need not be defined if you don't want any special 1647 alignment to be done at such a time. Most machine descriptions do 1648 not currently define the macro. */ 1649 #undef ASM_OUTPUT_LOOP_ALIGN 1650 1651 /* `ASM_OUTPUT_ALIGN (STREAM, POWER)' 1652 1653 A C statement to output to the stdio stream STREAM an assembler 1654 command to advance the location counter to a multiple of 2 to the 1655 POWER bytes. POWER will be a C expression of type `int'. */ 1656 #define ASM_OUTPUT_ALIGN(STREAM,LOG) \ 1657 if ((LOG) != 0) \ 1658 fprintf (STREAM, "\t.align %d\n", (1<<(LOG))) 1659 1660 /* `ASM_OUTPUT_MAX_SKIP_ALIGN (STREAM, POWER, MAX_SKIP)` 1661 1662 A C statement to output to the stdio stream STREAM an assembler 1663 command to advance the location counter to a multiple of 2 to the 1664 POWER bytes, but only if MAX_SKIP or fewer bytes are needed to 1665 satisfy the alignment request. POWER and MAX_SKIP will be a C 1666 expression of type `int'. */ 1667 #define ASM_OUTPUT_MAX_SKIP_ALIGN(STREAM,LOG,MAX_SKIP) \ 1668 if ((LOG) != 0) { \ 1669 if ((MAX_SKIP) == 0) fprintf ((STREAM), "\t.p2align %d\n", (LOG)); \ 1670 else { \ 1671 fprintf ((STREAM), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ 1672 /* Make sure that we have at least 8-byte alignment if > 8-byte \ 1673 alignment is preferred. */ \ 1674 if ((LOG) > 3 \ 1675 && (1 << (LOG)) > ((MAX_SKIP) + 1) \ 1676 && (MAX_SKIP) >= 7) \ 1677 fputs ("\t.p2align 3\n", (STREAM)); \ 1678 } \ 1679 } 1680 1681 /* Controlling Debugging Information Format 1682 1683 This describes how to specify debugging information. 1684 1685 mda is known to GDB, but not to GCC. */ 1686 #define DBX_REGISTER_NUMBER(REGNO) \ 1687 ((REGNO) > MDB_REGNUM ? (REGNO) + 1 : (REGNO)) 1688 1689 /* `DEBUGGER_AUTO_OFFSET (X)' 1690 1691 A C expression that returns the integer offset value for an 1692 automatic variable having address X (an RTL expression). The 1693 default computation assumes that X is based on the frame-pointer 1694 and gives the offset from the frame-pointer. This is required for 1695 targets that produce debugging output for DBX or COFF-style 1696 debugging output for SDB and allow the frame-pointer to be 1697 eliminated when the `-g' options is used. */ 1698 #define DEBUGGER_AUTO_OFFSET(X) \ 1699 (GET_CODE (X) == PLUS ? INTVAL (XEXP (X, 1)) : 0) 1700 1701 /* Miscellaneous Parameters 1702 1703 `CASE_VECTOR_MODE' 1704 1705 An alias for a machine mode name. This is the machine mode that 1706 elements of a jump-table should have. */ 1707 #define CASE_VECTOR_MODE SImode 1708 1709 /* `CASE_VECTOR_PC_RELATIVE' 1710 Define this macro if jump-tables should contain relative addresses. */ 1711 #undef CASE_VECTOR_PC_RELATIVE 1712 1713 /* This says how to output assembler code to declare an 1714 unitialised external linkage data object. */ 1715 #define ASM_OUTPUT_COMMON(STREAM, NAME, SIZE, ROUNDED) \ 1716 ( fputs ("\n\t.comm ", (STREAM)), \ 1717 assemble_name ((STREAM), (NAME)), \ 1718 fprintf ((STREAM), ","HOST_WIDE_INT_PRINT_UNSIGNED"\n", ROUNDED)) 1719 1720 /* This says how to output assembler code to declare an 1721 unitialised internal linkage data object. */ 1722 #define ASM_OUTPUT_LOCAL(STREAM, NAME, SIZE, ROUNDED) \ 1723 ( fputs ("\n\t.lcomm ", (STREAM)), \ 1724 assemble_name ((STREAM), (NAME)), \ 1725 fprintf ((STREAM), ","HOST_WIDE_INT_PRINT_UNSIGNED"\n", ROUNDED)) 1726 1727 /* Prettify the assembly. */ 1728 extern int visium_indent_opcode; 1729 1730 #define ASM_OUTPUT_OPCODE(FILE, PTR) \ 1731 do { \ 1732 if (visium_indent_opcode) \ 1733 { \ 1734 putc (' ', FILE); \ 1735 visium_indent_opcode = 0; \ 1736 } \ 1737 } while (0) 1738