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