update copyrights in config dir.
[official-gcc.git] / gcc / config / m88k / m88k.h
blobd043f23a2dfda657e20b4a05480f9277edcf8786
1 /* Definitions of target machine for GNU compiler for
2 Motorola m88100 in an 88open OCS/BCS environment.
3 Copyright (C) 1988, 92-99, 2000 Free Software Foundation, Inc.
4 Contributed by Michael Tiemann (tiemann@cygnus.com).
5 Currently maintained by (gcc@dg-rtp.dg.com)
7 This file is part of GNU CC.
9 GNU CC is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2, or (at your option)
12 any later version.
14 GNU CC is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with GNU CC; see the file COPYING. If not, write to
21 the Free Software Foundation, 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA. */
24 /* The m88100 port of GNU CC adheres to the various standards from 88open.
25 These documents are available by writing:
27 88open Consortium Ltd.
28 100 Homeland Court, Suite 800
29 San Jose, CA 95112
30 (408) 436-6600
32 In brief, the current standards are:
34 Binary Compatibility Standard, Release 1.1A, May 1991
35 This provides for portability of application-level software at the
36 executable level for AT&T System V Release 3.2.
38 Object Compatibility Standard, Release 1.1A, May 1991
39 This provides for portability of application-level software at the
40 object file and library level for C, Fortran, and Cobol, and again,
41 largely for SVR3.
43 Under development are standards for AT&T System V Release 4, based on the
44 [generic] System V Application Binary Interface from AT&T. These include:
46 System V Application Binary Interface, Motorola 88000 Processor Supplement
47 Another document from AT&T for SVR4 specific to the m88100.
48 Available from Prentice Hall.
50 System V Application Binary Interface, Motorola 88000 Processor Supplement,
51 Release 1.1, Draft H, May 6, 1991
52 A proposed update to the AT&T document from 88open.
54 System V ABI Implementation Guide for the M88000 Processor,
55 Release 1.0, January 1991
56 A companion ABI document from 88open. */
58 /* Other *.h files in config/m88k include this one and override certain items.
59 Currently these are sysv3.h, sysv4.h, dgux.h, dolph.h, tekXD88.h, and luna.h.
60 Additionally, sysv4.h and dgux.h include svr4.h first. All other
61 m88k targets except luna.h are based on svr3.h. */
63 /* Choose SVR3 as the default. */
64 #if !defined(DBX_DEBUGGING_INFO) && !defined(DWARF_DEBUGGING_INFO)
65 #include "svr3.h"
66 #endif
68 /* External types used. */
70 /* What instructions are needed to manufacture an integer constant. */
71 enum m88k_instruction {
72 m88k_zero,
73 m88k_or,
74 m88k_subu,
75 m88k_or_lo16,
76 m88k_or_lo8,
77 m88k_set,
78 m88k_oru_hi16,
79 m88k_oru_or
82 /* Which processor to schedule for. The elements of the enumeration
83 must match exactly the cpu attribute in the m88k.md machine description. */
85 enum processor_type {
86 PROCESSOR_M88100,
87 PROCESSOR_M88110,
88 PROCESSOR_M88000,
91 /* Recast the cpu class to be the cpu attribute. */
92 #define m88k_cpu_attr ((enum attr_cpu)m88k_cpu)
94 /* External variables/functions defined in m88k.c. */
96 extern const char *m88k_pound_sign;
97 extern const char *m88k_short_data;
98 extern const char *m88k_version;
99 extern char m88k_volatile_code;
101 extern unsigned m88k_gp_threshold;
102 extern int m88k_prologue_done;
103 extern int m88k_function_number;
104 extern int m88k_fp_offset;
105 extern int m88k_stack_size;
106 extern int m88k_case_index;
108 extern struct rtx_def *m88k_compare_reg;
109 extern struct rtx_def *m88k_compare_op0;
110 extern struct rtx_def *m88k_compare_op1;
112 extern enum processor_type m88k_cpu;
114 /* external variables defined elsewhere in the compiler */
116 extern int target_flags; /* -m compiler switches */
117 extern int frame_pointer_needed; /* current function has a FP */
118 extern int flag_delayed_branch; /* -fdelayed-branch */
119 extern int flag_pic; /* -fpic */
121 /* Specify the default monitors. The meaning of these values can
122 be obtained by doing "grep MONITOR_GCC *m88k*". Generally, the
123 values downward from 0x8000 are tests that will soon go away.
124 values upward from 0x1 are generally useful tests that will remain. */
126 #ifndef MONITOR_GCC
127 #define MONITOR_GCC 0
128 #endif
130 /*** Controlling the Compilation Driver, `gcc' ***/
131 /* Show we can debug even without a frame pointer. */
132 #define CAN_DEBUG_WITHOUT_FP
134 /* If -m88100 is in effect, add -D__m88100__; similarly for -m88110.
135 Here, the CPU_DEFAULT is assumed to be -m88100. */
136 #undef CPP_SPEC
137 #define CPP_SPEC "%{!m88000:%{!m88100:%{m88110:-D__m88110__}}} \
138 %{!m88000:%{!m88110:-D__m88100__}}"
140 /* LIB_SPEC, LINK_SPEC, and STARTFILE_SPEC defined in svr3.h.
141 ASM_SPEC, ASM_FINAL_SPEC, LIB_SPEC, LINK_SPEC, and STARTFILE_SPEC redefined
142 in svr4.h.
143 CPP_SPEC, ASM_SPEC, ASM_FINAL_SPEC, LIB_SPEC, LINK_SPEC, and
144 STARTFILE_SPEC redefined in dgux.h. */
146 /*** Run-time Target Specification ***/
148 /* Names to predefine in the preprocessor for this target machine.
149 Redefined in sysv3.h, sysv4.h, dgux.h, and luna.h. */
150 #define CPP_PREDEFINES "-Dm88000 -Dm88k -Dunix -D__CLASSIFY_TYPE__=2"
152 #define TARGET_VERSION fprintf (stderr, " (%s)", VERSION_INFO1)
154 #ifndef VERSION_INFO1
155 #define VERSION_INFO1 "m88k"
156 #endif
158 /* Run-time compilation parameters selecting different hardware subsets. */
160 /* Macro to define tables used to set the flags.
161 This is a list in braces of pairs in braces,
162 each pair being { "NAME", VALUE }
163 where VALUE is the bits to set or minus the bits to clear.
164 An empty string NAME is used to identify the default VALUE. */
166 #define MASK_88100 0x00000001 /* Target m88100 */
167 #define MASK_88110 0x00000002 /* Target m88110 */
168 #define MASK_88000 (MASK_88100 | MASK_88110)
170 #define MASK_OCS_DEBUG_INFO 0x00000004 /* Emit .tdesc info */
171 #define MASK_OCS_FRAME_POSITION 0x00000008 /* Debug frame = CFA, not r30 */
172 #define MASK_SVR4 0x00000010 /* Target is AT&T System V.4 */
173 #define MASK_SVR3 0x00000020 /* Target is AT&T System V.3 */
174 #define MASK_NO_UNDERSCORES 0x00000040 /* Don't emit a leading `_' */
175 #define MASK_BIG_PIC 0x00000080 /* PIC with large got-rel's -fPIC */
176 #define MASK_TRAP_LARGE_SHIFT 0x00000100 /* Trap if shift not <= 31 */
177 #define MASK_HANDLE_LARGE_SHIFT 0x00000200 /* Handle shift count >= 32 */
178 #define MASK_CHECK_ZERO_DIV 0x00000400 /* Check for int div. by 0 */
179 #define MASK_USE_DIV 0x00000800 /* No signed div. checks */
180 #define MASK_IDENTIFY_REVISION 0x00001000 /* Emit ident, with GCC rev */
181 #define MASK_WARN_PASS_STRUCT 0x00002000 /* Warn about passed structs */
182 #define MASK_OPTIMIZE_ARG_AREA 0x00004000 /* Save stack space */
183 #define MASK_NO_SERIALIZE_VOLATILE 0x00008000 /* Serialize volatile refs */
184 #define MASK_EITHER_LARGE_SHIFT (MASK_TRAP_LARGE_SHIFT | \
185 MASK_HANDLE_LARGE_SHIFT)
186 #define MASK_OMIT_LEAF_FRAME_POINTER 0x00020000 /* omit leaf frame pointers */
189 #define TARGET_88100 ((target_flags & MASK_88000) == MASK_88100)
190 #define TARGET_88110 ((target_flags & MASK_88000) == MASK_88110)
191 #define TARGET_88000 ((target_flags & MASK_88000) == MASK_88000)
193 #define TARGET_OCS_DEBUG_INFO (target_flags & MASK_OCS_DEBUG_INFO)
194 #define TARGET_OCS_FRAME_POSITION (target_flags & MASK_OCS_FRAME_POSITION)
195 #define TARGET_SVR4 (target_flags & MASK_SVR4)
196 #define TARGET_SVR3 (target_flags & MASK_SVR3)
197 #define TARGET_NO_UNDERSCORES (target_flags & MASK_NO_UNDERSCORES)
198 #define TARGET_BIG_PIC (target_flags & MASK_BIG_PIC)
199 #define TARGET_TRAP_LARGE_SHIFT (target_flags & MASK_TRAP_LARGE_SHIFT)
200 #define TARGET_HANDLE_LARGE_SHIFT (target_flags & MASK_HANDLE_LARGE_SHIFT)
201 #define TARGET_CHECK_ZERO_DIV (target_flags & MASK_CHECK_ZERO_DIV)
202 #define TARGET_USE_DIV (target_flags & MASK_USE_DIV)
203 #define TARGET_IDENTIFY_REVISION (target_flags & MASK_IDENTIFY_REVISION)
204 #define TARGET_WARN_PASS_STRUCT (target_flags & MASK_WARN_PASS_STRUCT)
205 #define TARGET_OPTIMIZE_ARG_AREA (target_flags & MASK_OPTIMIZE_ARG_AREA)
206 #define TARGET_SERIALIZE_VOLATILE (!(target_flags & MASK_NO_SERIALIZE_VOLATILE))
208 #define TARGET_EITHER_LARGE_SHIFT (target_flags & MASK_EITHER_LARGE_SHIFT)
209 #define TARGET_OMIT_LEAF_FRAME_POINTER (target_flags & MASK_OMIT_LEAF_FRAME_POINTER)
211 /* Redefined in sysv3.h, sysv4.h, and dgux.h. */
212 #define TARGET_DEFAULT (MASK_CHECK_ZERO_DIV)
213 #define CPU_DEFAULT MASK_88100
215 #define TARGET_SWITCHES \
217 { "88110", MASK_88110 }, \
218 { "88100", MASK_88100 }, \
219 { "88000", MASK_88000 }, \
220 { "ocs-debug-info", MASK_OCS_DEBUG_INFO }, \
221 { "no-ocs-debug-info", -MASK_OCS_DEBUG_INFO }, \
222 { "ocs-frame-position", MASK_OCS_FRAME_POSITION }, \
223 { "no-ocs-frame-position", -MASK_OCS_FRAME_POSITION }, \
224 { "svr4", MASK_SVR4 }, \
225 { "svr3", -MASK_SVR4 }, \
226 { "no-underscores", MASK_NO_UNDERSCORES }, \
227 { "big-pic", MASK_BIG_PIC }, \
228 { "trap-large-shift", MASK_TRAP_LARGE_SHIFT }, \
229 { "handle-large-shift", MASK_HANDLE_LARGE_SHIFT }, \
230 { "check-zero-division", MASK_CHECK_ZERO_DIV }, \
231 { "no-check-zero-division", -MASK_CHECK_ZERO_DIV }, \
232 { "use-div-instruction", MASK_USE_DIV }, \
233 { "identify-revision", MASK_IDENTIFY_REVISION }, \
234 { "warn-passed-structs", MASK_WARN_PASS_STRUCT }, \
235 { "optimize-arg-area", MASK_OPTIMIZE_ARG_AREA }, \
236 { "no-optimize-arg-area", -MASK_OPTIMIZE_ARG_AREA }, \
237 { "no-serialize-volatile", MASK_NO_SERIALIZE_VOLATILE }, \
238 { "serialize-volatile", -MASK_NO_SERIALIZE_VOLATILE }, \
239 { "omit-leaf-frame-pointer", MASK_OMIT_LEAF_FRAME_POINTER }, \
240 { "no-omit-leaf-frame-pointer", -MASK_OMIT_LEAF_FRAME_POINTER }, \
241 SUBTARGET_SWITCHES \
242 /* Default switches */ \
243 { "", TARGET_DEFAULT }, \
246 /* Redefined in dgux.h. */
247 #define SUBTARGET_SWITCHES
249 /* Macro to define table for command options with values. */
251 #define TARGET_OPTIONS { { "short-data-", &m88k_short_data }, \
252 { "version-", &m88k_version } }
254 /* Do any checking or such that is needed after processing the -m switches. */
256 #define OVERRIDE_OPTIONS \
257 do { \
258 register int i; \
260 if ((target_flags & MASK_88000) == 0) \
261 target_flags |= CPU_DEFAULT; \
263 if (TARGET_88110) \
265 target_flags |= MASK_USE_DIV; \
266 target_flags &= ~MASK_CHECK_ZERO_DIV; \
269 m88k_cpu = (TARGET_88000 ? PROCESSOR_M88000 \
270 : (TARGET_88100 ? PROCESSOR_M88100 : PROCESSOR_M88110)); \
272 if (TARGET_BIG_PIC) \
273 flag_pic = 2; \
275 if ((target_flags & MASK_EITHER_LARGE_SHIFT) == MASK_EITHER_LARGE_SHIFT) \
276 error ("-mtrap-large-shift and -mhandle-large-shift are incompatible");\
278 if (TARGET_SVR4) \
280 for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) \
281 reg_names[i]--; \
282 m88k_pound_sign = "#"; \
284 else \
286 target_flags |= MASK_SVR3; \
287 target_flags &= ~MASK_SVR4; \
290 if (m88k_short_data) \
292 const char *p = m88k_short_data; \
293 while (*p) \
294 if (*p >= '0' && *p <= '9') \
295 p++; \
296 else \
298 error ("Invalid option `-mshort-data-%s'", m88k_short_data); \
299 break; \
301 m88k_gp_threshold = atoi (m88k_short_data); \
302 if (m88k_gp_threshold > 0x7fffffff) \
303 error ("-mshort-data-%s is too large ", m88k_short_data); \
304 if (flag_pic) \
305 error ("-mshort-data-%s and PIC are incompatible", m88k_short_data); \
307 if (TARGET_OMIT_LEAF_FRAME_POINTER) /* keep nonleaf frame pointers */ \
308 flag_omit_frame_pointer = 1; \
309 } while (0)
311 /*** Storage Layout ***/
313 /* Sizes in bits of the various types. */
314 #define CHAR_TYPE_SIZE 8
315 #define SHORT_TYPE_SIZE 16
316 #define INT_TYPE_SIZE 32
317 #define LONG_TYPE_SIZE 32
318 #define LONG_LONG_TYPE_SIZE 64
319 #define FLOAT_TYPE_SIZE 32
320 #define DOUBLE_TYPE_SIZE 64
321 #define LONG_DOUBLE_TYPE_SIZE 64
323 /* Define this if most significant bit is lowest numbered
324 in instructions that operate on numbered bit-fields.
325 Somewhat arbitrary. It matches the bit field patterns. */
326 #define BITS_BIG_ENDIAN 1
328 /* Define this if most significant byte of a word is the lowest numbered.
329 That is true on the m88000. */
330 #define BYTES_BIG_ENDIAN 1
332 /* Define this if most significant word of a multiword number is the lowest
333 numbered.
334 For the m88000 we can decide arbitrarily since there are no machine
335 instructions for them. */
336 #define WORDS_BIG_ENDIAN 1
338 /* Number of bits in an addressable storage unit */
339 #define BITS_PER_UNIT 8
341 /* Width in bits of a "word", which is the contents of a machine register.
342 Note that this is not necessarily the width of data type `int';
343 if using 16-bit ints on a 68000, this would still be 32.
344 But on a machine with 16-bit registers, this would be 16. */
345 #define BITS_PER_WORD 32
347 /* Width of a word, in units (bytes). */
348 #define UNITS_PER_WORD 4
350 /* Width in bits of a pointer.
351 See also the macro `Pmode' defined below. */
352 #define POINTER_SIZE 32
354 /* Allocation boundary (in *bits*) for storing arguments in argument list. */
355 #define PARM_BOUNDARY 32
357 /* Largest alignment for stack parameters (if greater than PARM_BOUNDARY). */
358 #define MAX_PARM_BOUNDARY 64
360 /* Boundary (in *bits*) on which stack pointer should be aligned. */
361 #define STACK_BOUNDARY 128
363 /* Allocation boundary (in *bits*) for the code of a function. On the
364 m88100, it is desirable to align to a cache line. However, SVR3 targets
365 only provided 8 byte alignment. The m88110 cache is small, so align
366 to an 8 byte boundary. Pack code tightly when compiling crtstuff.c. */
367 #define FUNCTION_BOUNDARY (flag_inhibit_size_directive ? 32 : \
368 (TARGET_88100 && TARGET_SVR4 ? 128 : 64))
370 /* No data type wants to be aligned rounder than this. */
371 #define BIGGEST_ALIGNMENT 64
373 /* The best alignment to use in cases where we have a choice. */
374 #define FASTEST_ALIGNMENT (TARGET_88100 ? 32 : 64)
376 /* Make strings 4/8 byte aligned so strcpy from constants will be faster. */
377 #define CONSTANT_ALIGNMENT(EXP, ALIGN) \
378 ((TREE_CODE (EXP) == STRING_CST \
379 && (ALIGN) < FASTEST_ALIGNMENT) \
380 ? FASTEST_ALIGNMENT : (ALIGN))
382 /* Make arrays of chars 4/8 byte aligned for the same reasons. */
383 #define DATA_ALIGNMENT(TYPE, ALIGN) \
384 (TREE_CODE (TYPE) == ARRAY_TYPE \
385 && TYPE_MODE (TREE_TYPE (TYPE)) == QImode \
386 && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
388 /* Alignment of field after `int : 0' in a structure.
389 Ignored with PCC_BITFIELD_TYPE_MATTERS. */
390 /* #define EMPTY_FIELD_BOUNDARY 8 */
392 /* Every structure's size must be a multiple of this. */
393 #define STRUCTURE_SIZE_BOUNDARY 8
395 /* Set this nonzero if move instructions will actually fail to work
396 when given unaligned data. */
397 #define STRICT_ALIGNMENT 1
399 /* A bitfield declared as `int' forces `int' alignment for the struct. */
400 #define PCC_BITFIELD_TYPE_MATTERS 1
402 /* Maximum size (in bits) to use for the largest integral type that
403 replaces a BLKmode type. */
404 /* #define MAX_FIXED_MODE_SIZE 0 */
406 /* Check a `double' value for validity for a particular machine mode.
407 This is defined to avoid crashes outputting certain constants.
408 Since we output the number in hex, the assembler won't choke on it. */
409 /* #define CHECK_FLOAT_VALUE(MODE,VALUE) */
411 /* A code distinguishing the floating point format of the target machine. */
412 /* #define TARGET_FLOAT_FORMAT IEEE_FLOAT_FORMAT */
414 /*** Register Usage ***/
416 /* Number of actual hardware registers.
417 The hardware registers are assigned numbers for the compiler
418 from 0 to just below FIRST_PSEUDO_REGISTER.
419 All registers that the compiler knows about must be given numbers,
420 even those that are not normally considered general registers.
422 The m88100 has a General Register File (GRF) of 32 32-bit registers.
423 The m88110 adds an Extended Register File (XRF) of 32 80-bit registers. */
424 #define FIRST_PSEUDO_REGISTER 64
425 #define FIRST_EXTENDED_REGISTER 32
427 /* General notes on extended registers, their use and misuse.
429 Possible good uses:
431 spill area instead of memory.
432 -waste if only used once
434 floating point calculations
435 -probably a waste unless we have run out of general purpose registers
437 freeing up general purpose registers
438 -e.g. may be able to have more loop invariants if floating
439 point is moved into extended registers.
442 I've noticed wasteful moves into and out of extended registers; e.g. a load
443 into x21, then inside a loop a move into r24, then r24 used as input to
444 an fadd. Why not just load into r24 to begin with? Maybe the new cse.c
445 will address this. This wastes a move, but the load,store and move could
446 have been saved had extended registers been used throughout.
447 E.g. in the code following code, if z and xz are placed in extended
448 registers, there is no need to save preserve registers.
450 long c=1,d=1,e=1,f=1,g=1,h=1,i=1,j=1,k;
452 double z=0,xz=4.5;
454 foo(a,b)
455 long a,b;
457 while (a < b)
459 k = b + c + d + e + f + g + h + a + i + j++;
460 z += xz;
461 a++;
463 printf("k= %d; z=%f;\n", k, z);
466 I've found that it is possible to change the constraints (putting * before
467 the 'r' constraints int the fadd.ddd instruction) and get the entire
468 addition and store to go into extended registers. However, this also
469 forces simple addition and return of floating point arguments to a
470 function into extended registers. Not the correct solution.
472 Found the following note in local-alloc.c which may explain why I can't
473 get both registers to be in extended registers since two are allocated in
474 local-alloc and one in global-alloc. Doesn't explain (I don't believe)
475 why an extended register is used instead of just using the preserve
476 register.
478 from local-alloc.c:
479 We have provision to exempt registers, even when they are contained
480 within the block, that can be tied to others that are not contained in it.
481 This is so that global_alloc could process them both and tie them then.
482 But this is currently disabled since tying in global_alloc is not
483 yet implemented.
485 The explanation of why the preserved register is not used is as follows,
486 I believe. The registers are being allocated in order. Tying is not
487 done so efficiently, so when it comes time to do the first allocation,
488 there are no registers left to use without spilling except extended
489 registers. Then when the next pseudo register needs a hard reg, there
490 are still no registers to be had for free, but this one must be a GRF
491 reg instead of an extended reg, so a preserve register is spilled. Thus
492 the move from extended to GRF is necessitated. I do not believe this can
493 be 'fixed' through the files in config/m88k.
495 gcc seems to sometimes make worse use of register allocation -- not counting
496 moves -- whenever extended registers are present. For example in the
497 whetstone, the simple for loop (slightly modified)
498 for(i = 1; i <= n1; i++)
500 x1 = (x1 + x2 + x3 - x4) * t;
501 x2 = (x1 + x2 - x3 + x4) * t;
502 x3 = (x1 - x2 + x3 + x4) * t;
503 x4 = (x1 + x2 + x3 + x4) * t;
505 in general loads the high bits of the addresses of x2-x4 and i into registers
506 outside the loop. Whenever extended registers are used, it loads all of
507 these inside the loop. My conjecture is that since the 88110 has so many
508 registers, and gcc makes no distinction at this point -- just that they are
509 not fixed, that in loop.c it believes it can expect a number of registers
510 to be available. Then it allocates 'too many' in local-alloc which causes
511 problems later. 'Too many' are allocated because a large portion of the
512 registers are extended registers and cannot be used for certain purposes
513 ( e.g. hold the address of a variable). When this loop is compiled on its
514 own, the problem does not occur. I don't know the solution yet, though it
515 is probably in the base sources. Possibly a different way to calculate
516 "threshold". */
518 /* 1 for registers that have pervasive standard uses and are not available
519 for the register allocator. Registers r14-r25 and x22-x29 are expected
520 to be preserved across function calls.
522 On the 88000, the standard uses of the General Register File (GRF) are:
523 Reg 0 = Pseudo argument pointer (hardware fixed to 0).
524 Reg 1 = Subroutine return pointer (hardware).
525 Reg 2-9 = Parameter registers (OCS).
526 Reg 10 = OCS reserved temporary.
527 Reg 11 = Static link if needed [OCS reserved temporary].
528 Reg 12 = Address of structure return (OCS).
529 Reg 13 = OCS reserved temporary.
530 Reg 14-25 = Preserved register set.
531 Reg 26-29 = Reserved by OCS and ABI.
532 Reg 30 = Frame pointer (Common use).
533 Reg 31 = Stack pointer.
535 The following follows the current 88open UCS specification for the
536 Extended Register File (XRF):
537 Reg 32 = x0 Always equal to zero
538 Reg 33-53 = x1-x21 Temporary registers (Caller Save)
539 Reg 54-61 = x22-x29 Preserver registers (Callee Save)
540 Reg 62-63 = x30-x31 Reserved for future ABI use.
542 Note: The current 88110 extended register mapping is subject to change.
543 The bias towards caller-save registers is based on the
544 presumption that memory traffic can potentially be reduced by
545 allowing the "caller" to save only that part of the register
546 which is actually being used. (i.e. don't do a st.x if a st.d
547 is sufficient). Also, in scientific code (a.k.a. Fortran), the
548 large number of variables defined in common blocks may require
549 that almost all registers be saved across calls anyway. */
551 #define FIXED_REGISTERS \
552 {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
553 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, \
554 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
555 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}
557 /* 1 for registers not available across function calls.
558 These must include the FIXED_REGISTERS and also any
559 registers that can be used without being saved.
560 The latter must include the registers where values are returned
561 and the register where structure-value addresses are passed.
562 Aside from that, you can include as many other registers as you like. */
564 #define CALL_USED_REGISTERS \
565 {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, \
566 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, \
567 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
568 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1}
570 /* Macro to conditionally modify fixed_regs/call_used_regs. */
571 #define CONDITIONAL_REGISTER_USAGE \
573 if (! TARGET_88110) \
575 register int i; \
576 for (i = FIRST_EXTENDED_REGISTER; i < FIRST_PSEUDO_REGISTER; i++) \
578 fixed_regs[i] = 1; \
579 call_used_regs[i] = 1; \
582 if (flag_pic) \
584 /* Current hack to deal with -fpic -O2 problems. */ \
585 fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
586 call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
587 global_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
591 /* True if register is an extended register. */
592 #define XRF_REGNO_P(N) ((N) < FIRST_PSEUDO_REGISTER && (N) >= FIRST_EXTENDED_REGISTER)
594 /* Return number of consecutive hard regs needed starting at reg REGNO
595 to hold something of mode MODE.
596 This is ordinarily the length in words of a value of mode MODE
597 but can be less for certain modes in special long registers.
599 On the m88000, GRF registers hold 32-bits and XRF registers hold 80-bits.
600 An XRF register can hold any mode, but two GRF registers are required
601 for larger modes. */
602 #define HARD_REGNO_NREGS(REGNO, MODE) \
603 (XRF_REGNO_P (REGNO) \
604 ? 1 : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
606 /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
608 For double integers, we never put the value into an odd register so that
609 the operators don't run into the situation where the high part of one of
610 the inputs is the low part of the result register. (It's ok if the output
611 registers are the same as the input registers.) The XRF registers can
612 hold all modes, but only DF and SF modes can be manipulated in these
613 registers. The compiler should be allowed to use these as a fast spill
614 area. */
615 #define HARD_REGNO_MODE_OK(REGNO, MODE) \
616 (XRF_REGNO_P(REGNO) \
617 ? (TARGET_88110 && GET_MODE_CLASS (MODE) == MODE_FLOAT) \
618 : (((MODE) != DImode && (MODE) != DFmode && (MODE) != DCmode) \
619 || ((REGNO) & 1) == 0))
621 /* Value is 1 if it is a good idea to tie two pseudo registers
622 when one has mode MODE1 and one has mode MODE2.
623 If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
624 for any hard reg, then this must be 0 for correct output. */
625 #define MODES_TIEABLE_P(MODE1, MODE2) \
626 (((MODE1) == DFmode || (MODE1) == DCmode || (MODE1) == DImode \
627 || (TARGET_88110 && GET_MODE_CLASS (MODE1) == MODE_FLOAT)) \
628 == ((MODE2) == DFmode || (MODE2) == DCmode || (MODE2) == DImode \
629 || (TARGET_88110 && GET_MODE_CLASS (MODE2) == MODE_FLOAT)))
631 /* Specify the registers used for certain standard purposes.
632 The values of these macros are register numbers. */
634 /* the m88000 pc isn't overloaded on a register that the compiler knows about. */
635 /* #define PC_REGNUM */
637 /* Register to use for pushing function arguments. */
638 #define STACK_POINTER_REGNUM 31
640 /* Base register for access to local variables of the function. */
641 #define FRAME_POINTER_REGNUM 30
643 /* Base register for access to arguments of the function. */
644 #define ARG_POINTER_REGNUM 0
646 /* Register used in cases where a temporary is known to be safe to use. */
647 #define TEMP_REGNUM 10
649 /* Register in which static-chain is passed to a function. */
650 #define STATIC_CHAIN_REGNUM 11
652 /* Register in which address to store a structure value
653 is passed to a function. */
654 #define STRUCT_VALUE_REGNUM 12
656 /* Register to hold the addressing base for position independent
657 code access to data items. */
658 #define PIC_OFFSET_TABLE_REGNUM 25
660 /* Order in which registers are preferred (most to least). Use temp
661 registers, then param registers top down. Preserve registers are
662 top down to maximize use of double memory ops for register save.
663 The 88open reserved registers (r26-r29 and x30-x31) may commonly be used
664 in most environments with the -fcall-used- or -fcall-saved- options. */
665 #define REG_ALLOC_ORDER \
667 13, 12, 11, 10, 29, 28, 27, 26, \
668 62, 63, 9, 8, 7, 6, 5, 4, \
669 3, 2, 1, 53, 52, 51, 50, 49, \
670 48, 47, 46, 45, 44, 43, 42, 41, \
671 40, 39, 38, 37, 36, 35, 34, 33, \
672 25, 24, 23, 22, 21, 20, 19, 18, \
673 17, 16, 15, 14, 61, 60, 59, 58, \
674 57, 56, 55, 54, 30, 31, 0, 32}
676 /* Order for leaf functions. */
677 #define REG_LEAF_ALLOC_ORDER \
679 9, 8, 7, 6, 13, 12, 11, 10, \
680 29, 28, 27, 26, 62, 63, 5, 4, \
681 3, 2, 0, 53, 52, 51, 50, 49, \
682 48, 47, 46, 45, 44, 43, 42, 41, \
683 40, 39, 38, 37, 36, 35, 34, 33, \
684 25, 24, 23, 22, 21, 20, 19, 18, \
685 17, 16, 15, 14, 61, 60, 59, 58, \
686 57, 56, 55, 54, 30, 31, 1, 32}
688 /* Switch between the leaf and non-leaf orderings. The purpose is to avoid
689 write-over scoreboard delays between caller and callee. */
690 #define ORDER_REGS_FOR_LOCAL_ALLOC \
692 static int leaf[] = REG_LEAF_ALLOC_ORDER; \
693 static int nonleaf[] = REG_ALLOC_ORDER; \
695 bcopy (regs_ever_live[1] ? nonleaf : leaf, reg_alloc_order, \
696 FIRST_PSEUDO_REGISTER * sizeof (int)); \
699 /*** Register Classes ***/
701 /* Define the classes of registers for register constraints in the
702 machine description. Also define ranges of constants.
704 One of the classes must always be named ALL_REGS and include all hard regs.
705 If there is more than one class, another class must be named NO_REGS
706 and contain no registers.
708 The name GENERAL_REGS must be the name of a class (or an alias for
709 another name such as ALL_REGS). This is the class of registers
710 that is allowed by "g" or "r" in a register constraint.
711 Also, registers outside this class are allocated only when
712 instructions express preferences for them.
714 The classes must be numbered in nondecreasing order; that is,
715 a larger-numbered class must never be contained completely
716 in a smaller-numbered class.
718 For any two classes, it is very desirable that there be another
719 class that represents their union. */
721 /* The m88000 hardware has two kinds of registers. In addition, we denote
722 the arg pointer as a separate class. */
724 enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
725 XGRF_REGS, ALL_REGS, LIM_REG_CLASSES };
727 #define N_REG_CLASSES (int) LIM_REG_CLASSES
729 /* Give names of register classes as strings for dump file. */
730 #define REG_CLASS_NAMES {"NO_REGS", "AP_REG", "XRF_REGS", "GENERAL_REGS", \
731 "AGRF_REGS", "XGRF_REGS", "ALL_REGS" }
733 /* Define which registers fit in which classes.
734 This is an initializer for a vector of HARD_REG_SET
735 of length N_REG_CLASSES. */
736 #define REG_CLASS_CONTENTS {{0x00000000, 0x00000000}, \
737 {0x00000001, 0x00000000}, \
738 {0x00000000, 0xffffffff}, \
739 {0xfffffffe, 0x00000000}, \
740 {0xffffffff, 0x00000000}, \
741 {0xfffffffe, 0xffffffff}, \
742 {0xffffffff, 0xffffffff}}
744 /* The same information, inverted:
745 Return the class number of the smallest class containing
746 reg number REGNO. This could be a conditional expression
747 or could index an array. */
748 #define REGNO_REG_CLASS(REGNO) \
749 ((REGNO) ? ((REGNO < 32) ? GENERAL_REGS : XRF_REGS) : AP_REG)
751 /* The class value for index registers, and the one for base regs. */
752 #define BASE_REG_CLASS AGRF_REGS
753 #define INDEX_REG_CLASS GENERAL_REGS
755 /* Get reg_class from a letter such as appears in the machine description.
756 For the 88000, the following class/letter is defined for the XRF:
757 x - Extended register file */
758 #define REG_CLASS_FROM_LETTER(C) \
759 (((C) == 'x') ? XRF_REGS : NO_REGS)
761 /* Macros to check register numbers against specific register classes.
762 These assume that REGNO is a hard or pseudo reg number.
763 They give nonzero only if REGNO is a hard reg of the suitable class
764 or a pseudo reg currently allocated to a suitable hard reg.
765 Since they use reg_renumber, they are safe only once reg_renumber
766 has been allocated, which happens in local-alloc.c. */
767 #define REGNO_OK_FOR_BASE_P(REGNO) \
768 ((REGNO) < FIRST_EXTENDED_REGISTER \
769 || (unsigned) reg_renumber[REGNO] < FIRST_EXTENDED_REGISTER)
770 #define REGNO_OK_FOR_INDEX_P(REGNO) \
771 (((REGNO) && (REGNO) < FIRST_EXTENDED_REGISTER) \
772 || (unsigned) reg_renumber[REGNO] < FIRST_EXTENDED_REGISTER)
774 /* Given an rtx X being reloaded into a reg required to be
775 in class CLASS, return the class of reg to actually use.
776 In general this is just CLASS; but on some machines
777 in some cases it is preferable to use a more restrictive class.
778 Double constants should be in a register iff they can be made cheaply. */
779 #define PREFERRED_RELOAD_CLASS(X,CLASS) \
780 (CONSTANT_P(X) && (CLASS == XRF_REGS) ? NO_REGS : (CLASS))
782 /* Return the register class of a scratch register needed to load IN
783 into a register of class CLASS in MODE. On the m88k, when PIC, we
784 need a temporary when loading some addresses into a register. */
785 #define SECONDARY_INPUT_RELOAD_CLASS(CLASS, MODE, IN) \
786 ((flag_pic \
787 && GET_CODE (IN) == CONST \
788 && GET_CODE (XEXP (IN, 0)) == PLUS \
789 && GET_CODE (XEXP (XEXP (IN, 0), 0)) == CONST_INT \
790 && ! SMALL_INT (XEXP (XEXP (IN, 0), 1))) ? GENERAL_REGS : NO_REGS)
792 /* Return the maximum number of consecutive registers
793 needed to represent mode MODE in a register of class CLASS. */
794 #define CLASS_MAX_NREGS(CLASS, MODE) \
795 ((((CLASS) == XRF_REGS) ? 1 \
796 : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)))
798 /* Letters in the range `I' through `P' in a register constraint string can
799 be used to stand for particular ranges of immediate operands. The C
800 expression is true iff C is a known letter and VALUE is appropriate for
801 that letter.
803 For the m88000, the following constants are used:
804 `I' requires a non-negative 16-bit value.
805 `J' requires a non-positive 16-bit value.
806 `K' requires a non-negative value < 32.
807 `L' requires a constant with only the upper 16-bits set.
808 `M' requires constant values that can be formed with `set'.
809 `N' requires a negative value.
810 `O' requires zero.
811 `P' requires a non-negative value. */
813 /* Quick tests for certain values. */
814 #define SMALL_INT(X) (SMALL_INTVAL (INTVAL (X)))
815 #define SMALL_INTVAL(I) ((unsigned) (I) < 0x10000)
816 #define ADD_INT(X) (ADD_INTVAL (INTVAL (X)))
817 #define ADD_INTVAL(I) ((unsigned) (I) + 0xffff < 0x1ffff)
818 #define POWER_OF_2(I) ((I) && POWER_OF_2_or_0(I))
819 #define POWER_OF_2_or_0(I) (((I) & ((unsigned)(I) - 1)) == 0)
821 #define CONST_OK_FOR_LETTER_P(VALUE, C) \
822 ((C) == 'I' ? SMALL_INTVAL (VALUE) \
823 : (C) == 'J' ? SMALL_INTVAL (-(VALUE)) \
824 : (C) == 'K' ? (unsigned)(VALUE) < 32 \
825 : (C) == 'L' ? ((VALUE) & 0xffff) == 0 \
826 : (C) == 'M' ? integer_ok_for_set (VALUE) \
827 : (C) == 'N' ? (VALUE) < 0 \
828 : (C) == 'O' ? (VALUE) == 0 \
829 : (C) == 'P' ? (VALUE) >= 0 \
830 : 0)
832 /* Similar, but for floating constants, and defining letters G and H.
833 Here VALUE is the CONST_DOUBLE rtx itself. For the m88000, the
834 constraints are: `G' requires zero, and `H' requires one or two. */
835 #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C) \
836 ((C) == 'G' ? (CONST_DOUBLE_HIGH (VALUE) == 0 \
837 && CONST_DOUBLE_LOW (VALUE) == 0) \
838 : 0)
840 /* Letters in the range `Q' through `U' in a register constraint string
841 may be defined in a machine-dependent fashion to stand for arbitrary
842 operand types.
844 For the m88k, `Q' handles addresses in a call context. */
846 #define EXTRA_CONSTRAINT(OP, C) \
847 ((C) == 'Q' ? symbolic_address_p (OP) : 0)
849 /*** Describing Stack Layout ***/
851 /* Define this if pushing a word on the stack moves the stack pointer
852 to a smaller address. */
853 #define STACK_GROWS_DOWNWARD
855 /* Define this if the addresses of local variable slots are at negative
856 offsets from the frame pointer. */
857 /* #define FRAME_GROWS_DOWNWARD */
859 /* Offset from the frame pointer to the first local variable slot to be
860 allocated. For the m88k, the debugger wants the return address (r1)
861 stored at location r30+4, and the previous frame pointer stored at
862 location r30. */
863 #define STARTING_FRAME_OFFSET 8
865 /* If we generate an insn to push BYTES bytes, this says how many the
866 stack pointer really advances by. The m88k has no push instruction. */
867 /* #define PUSH_ROUNDING(BYTES) */
869 /* If defined, the maximum amount of space required for outgoing arguments
870 will be computed and placed into the variable
871 `current_function_outgoing_args_size'. No space will be pushed
872 onto the stack for each call; instead, the function prologue should
873 increase the stack frame size by this amount. */
874 #define ACCUMULATE_OUTGOING_ARGS
876 /* Offset from the stack pointer register to the first location at which
877 outgoing arguments are placed. Use the default value zero. */
878 /* #define STACK_POINTER_OFFSET 0 */
880 /* Offset of first parameter from the argument pointer register value.
881 Using an argument pointer, this is 0 for the m88k. GCC knows
882 how to eliminate the argument pointer references if necessary. */
883 #define FIRST_PARM_OFFSET(FNDECL) 0
885 /* Define this if functions should assume that stack space has been
886 allocated for arguments even when their values are passed in
887 registers.
889 The value of this macro is the size, in bytes, of the area reserved for
890 arguments passed in registers.
892 This space can either be allocated by the caller or be a part of the
893 machine-dependent stack frame: `OUTGOING_REG_PARM_STACK_SPACE'
894 says which. */
895 #define REG_PARM_STACK_SPACE(FNDECL) 32
897 /* Define this macro if REG_PARM_STACK_SPACE is defined but stack
898 parameters don't skip the area specified by REG_PARM_STACK_SPACE.
899 Normally, when a parameter is not passed in registers, it is placed on
900 the stack beyond the REG_PARM_STACK_SPACE area. Defining this macro
901 suppresses this behavior and causes the parameter to be passed on the
902 stack in its natural location. */
903 #define STACK_PARMS_IN_REG_PARM_AREA
905 /* Define this if it is the responsibility of the caller to allocate the
906 area reserved for arguments passed in registers. If
907 `ACCUMULATE_OUTGOING_ARGS' is also defined, the only effect of this
908 macro is to determine whether the space is included in
909 `current_function_outgoing_args_size'. */
910 /* #define OUTGOING_REG_PARM_STACK_SPACE */
912 /* Offset from the stack pointer register to an item dynamically allocated
913 on the stack, e.g., by `alloca'.
915 The default value for this macro is `STACK_POINTER_OFFSET' plus the
916 length of the outgoing arguments. The default is correct for most
917 machines. See `function.c' for details. */
918 /* #define STACK_DYNAMIC_OFFSET(FUNDECL) ... */
920 /* Value is the number of bytes of arguments automatically
921 popped when returning from a subroutine call.
922 FUNDECL is the declaration node of the function (as a tree),
923 FUNTYPE is the data type of the function (as a tree),
924 or for a library call it is an identifier node for the subroutine name.
925 SIZE is the number of bytes of arguments passed on the stack. */
926 #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0
928 /* Define how to find the value returned by a function.
929 VALTYPE is the data type of the value (as a tree).
930 If the precise function being called is known, FUNC is its FUNCTION_DECL;
931 otherwise, FUNC is 0. */
932 #define FUNCTION_VALUE(VALTYPE, FUNC) \
933 gen_rtx_REG (TYPE_MODE (VALTYPE) == BLKmode ? SImode : TYPE_MODE (VALTYPE), \
936 /* Define this if it differs from FUNCTION_VALUE. */
937 /* #define FUNCTION_OUTGOING_VALUE(VALTYPE, FUNC) ... */
939 /* Disable the promotion of some structures and unions to registers. */
940 #define RETURN_IN_MEMORY(TYPE) \
941 (TYPE_MODE (TYPE) == BLKmode \
942 || ((TREE_CODE (TYPE) == RECORD_TYPE || TREE_CODE(TYPE) == UNION_TYPE) \
943 && !(TYPE_MODE (TYPE) == SImode \
944 || (TYPE_MODE (TYPE) == BLKmode \
945 && TYPE_ALIGN (TYPE) == BITS_PER_WORD \
946 && int_size_in_bytes (TYPE) == UNITS_PER_WORD))))
948 /* Don't default to pcc-struct-return, because we have already specified
949 exactly how to return structures in the RETURN_IN_MEMORY macro. */
950 #define DEFAULT_PCC_STRUCT_RETURN 0
952 /* Define how to find the value returned by a library function
953 assuming the value has mode MODE. */
954 #define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, 2)
956 /* True if N is a possible register number for a function value
957 as seen by the caller. */
958 #define FUNCTION_VALUE_REGNO_P(N) ((N) == 2)
960 /* Determine whether a function argument is passed in a register, and
961 which register. See m88k.c. */
962 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
963 m88k_function_arg (CUM, MODE, TYPE, NAMED)
965 /* Define this if it differs from FUNCTION_ARG. */
966 /* #define FUNCTION_INCOMING_ARG(CUM, MODE, TYPE, NAMED) ... */
968 /* A C expression for the number of words, at the beginning of an
969 argument, must be put in registers. The value must be zero for
970 arguments that are passed entirely in registers or that are entirely
971 pushed on the stack. */
972 #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) (0)
974 /* A C expression that indicates when an argument must be passed by
975 reference. If nonzero for an argument, a copy of that argument is
976 made in memory and a pointer to the argument is passed instead of the
977 argument itself. The pointer is passed in whatever way is appropriate
978 for passing a pointer to that type. */
979 #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED) (0)
981 /* A C type for declaring a variable that is used as the first argument
982 of `FUNCTION_ARG' and other related values. It suffices to count
983 the number of words of argument so far. */
984 #define CUMULATIVE_ARGS int
986 /* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to a
987 function whose data type is FNTYPE. For a library call, FNTYPE is 0. */
988 #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT) ((CUM) = 0)
990 /* A C statement (sans semicolon) to update the summarizer variable
991 CUM to advance past an argument in the argument list. The values
992 MODE, TYPE and NAMED describe that argument. Once this is done,
993 the variable CUM is suitable for analyzing the *following* argument
994 with `FUNCTION_ARG', etc. (TYPE is null for libcalls where that
995 information may not be available.) */
996 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED) \
997 do { \
998 enum machine_mode __mode = (TYPE) ? TYPE_MODE (TYPE) : (MODE); \
999 if ((CUM & 1) \
1000 && (__mode == DImode || __mode == DFmode \
1001 || ((TYPE) && TYPE_ALIGN (TYPE) > BITS_PER_WORD))) \
1002 CUM++; \
1003 CUM += (((__mode != BLKmode) \
1004 ? GET_MODE_SIZE (MODE) : int_size_in_bytes (TYPE)) \
1005 + 3) / 4; \
1006 } while (0)
1008 /* True if N is a possible register number for function argument passing.
1009 On the m88000, these are registers 2 through 9. */
1010 #define FUNCTION_ARG_REGNO_P(N) ((N) <= 9 && (N) >= 2)
1012 /* A C expression which determines whether, and in which direction,
1013 to pad out an argument with extra space. The value should be of
1014 type `enum direction': either `upward' to pad above the argument,
1015 `downward' to pad below, or `none' to inhibit padding.
1017 This macro does not control the *amount* of padding; that is always
1018 just enough to reach the next multiple of `FUNCTION_ARG_BOUNDARY'. */
1019 #define FUNCTION_ARG_PADDING(MODE, TYPE) \
1020 ((MODE) == BLKmode \
1021 || ((TYPE) && (TREE_CODE (TYPE) == RECORD_TYPE \
1022 || TREE_CODE (TYPE) == UNION_TYPE)) \
1023 ? upward : GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY ? downward : none)
1025 /* If defined, a C expression that gives the alignment boundary, in bits,
1026 of an argument with the specified mode and type. If it is not defined,
1027 `PARM_BOUNDARY' is used for all arguments. */
1028 #define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \
1029 (((TYPE) ? TYPE_ALIGN (TYPE) : GET_MODE_BITSIZE (MODE)) <= PARM_BOUNDARY \
1030 ? PARM_BOUNDARY : 2 * PARM_BOUNDARY)
1032 /* Generate necessary RTL for __builtin_saveregs().
1033 ARGLIST is the argument list; see expr.c. */
1034 #define EXPAND_BUILTIN_SAVEREGS() m88k_builtin_saveregs ()
1036 /* Define the `__builtin_va_list' type for the ABI. */
1037 #define BUILD_VA_LIST_TYPE(VALIST) \
1038 (VALIST) = m88k_build_va_list ()
1040 /* Implement `va_start' for varargs and stdarg. */
1041 #define EXPAND_BUILTIN_VA_START(stdarg, valist, nextarg) \
1042 m88k_va_start (stdarg, valist, nextarg)
1044 /* Implement `va_arg'. */
1045 #define EXPAND_BUILTIN_VA_ARG(valist, type) \
1046 m88k_va_arg (valist, type)
1048 /* Generate the assembly code for function entry. */
1049 #define FUNCTION_PROLOGUE(FILE, SIZE) m88k_begin_prologue(FILE, SIZE)
1051 /* Perform special actions at the point where the prologue ends. */
1052 #define FUNCTION_END_PROLOGUE(FILE) m88k_end_prologue(FILE)
1054 /* Output assembler code to FILE to increment profiler label # LABELNO
1055 for profiling a function entry. Redefined in sysv3.h, sysv4.h and
1056 dgux.h. */
1057 #define FUNCTION_PROFILER(FILE, LABELNO) \
1058 output_function_profiler (FILE, LABELNO, "mcount", 1)
1060 /* Maximum length in instructions of the code output by FUNCTION_PROFILER. */
1061 #define FUNCTION_PROFILER_LENGTH (5+3+1+5)
1063 /* Output assembler code to FILE to initialize basic-block profiling for
1064 the current module. LABELNO is unique to each instance. */
1065 #define FUNCTION_BLOCK_PROFILER(FILE, LABELNO) \
1066 output_function_block_profiler (FILE, LABELNO)
1068 /* Maximum length in instructions of the code output by
1069 FUNCTION_BLOCK_PROFILER. */
1070 #define FUNCTION_BLOCK_PROFILER_LENGTH (3+5+2+5)
1072 /* Output assembler code to FILE to increment the count associated with
1073 the basic block number BLOCKNO. */
1074 #define BLOCK_PROFILER(FILE, BLOCKNO) output_block_profiler (FILE, BLOCKNO)
1076 /* Maximum length in instructions of the code output by BLOCK_PROFILER. */
1077 #define BLOCK_PROFILER_LENGTH 4
1079 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
1080 the stack pointer does not matter. The value is tested only in
1081 functions that have frame pointers.
1082 No definition is equivalent to always zero. */
1083 #define EXIT_IGNORE_STACK (1)
1085 /* Generate the assembly code for function exit. */
1086 #define FUNCTION_EPILOGUE(FILE, SIZE) m88k_end_epilogue(FILE, SIZE)
1088 /* Perform special actions at the point where the epilogue begins. */
1089 #define FUNCTION_BEGIN_EPILOGUE(FILE) m88k_begin_epilogue(FILE)
1091 /* Value should be nonzero if functions must have frame pointers.
1092 Zero means the frame pointer need not be set up (and parms
1093 may be accessed via the stack pointer) in functions that seem suitable.
1094 This is computed in `reload', in reload1.c. */
1095 #define FRAME_POINTER_REQUIRED \
1096 (current_function_varargs \
1097 || (TARGET_OMIT_LEAF_FRAME_POINTER && !leaf_function_p ()) \
1098 || (write_symbols != NO_DEBUG && !TARGET_OCS_FRAME_POSITION))
1100 /* Definitions for register eliminations.
1102 We have two registers that can be eliminated on the m88k. First, the
1103 frame pointer register can often be eliminated in favor of the stack
1104 pointer register. Secondly, the argument pointer register can always be
1105 eliminated; it is replaced with either the stack or frame pointer. */
1107 /* This is an array of structures. Each structure initializes one pair
1108 of eliminable registers. The "from" register number is given first,
1109 followed by "to". Eliminations of the same "from" register are listed
1110 in order of preference. */
1111 #define ELIMINABLE_REGS \
1112 {{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
1113 { ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \
1114 { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}}
1116 /* Given FROM and TO register numbers, say whether this elimination
1117 is allowed. */
1118 #define CAN_ELIMINATE(FROM, TO) \
1119 (!((FROM) == FRAME_POINTER_REGNUM && FRAME_POINTER_REQUIRED))
1121 /* Define the offset between two registers, one to be eliminated, and the other
1122 its replacement, at the start of a routine. */
1123 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
1124 { m88k_layout_frame (); \
1125 if ((FROM) == FRAME_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM) \
1126 (OFFSET) = m88k_fp_offset; \
1127 else if ((FROM) == ARG_POINTER_REGNUM && (TO) == FRAME_POINTER_REGNUM) \
1128 (OFFSET) = m88k_stack_size - m88k_fp_offset; \
1129 else if ((FROM) == ARG_POINTER_REGNUM && (TO) == STACK_POINTER_REGNUM) \
1130 (OFFSET) = m88k_stack_size; \
1131 else \
1132 abort (); \
1135 /*** Trampolines for Nested Functions ***/
1137 /* Output assembler code for a block containing the constant parts
1138 of a trampoline, leaving space for the variable parts.
1140 This block is placed on the stack and filled in. It is aligned
1141 0 mod 128 and those portions that are executed are constant.
1142 This should work for instruction caches that have cache lines up
1143 to the aligned amount (128 is arbitrary), provided no other code
1144 producer is attempting to play the same game. This of course is
1145 in violation of any number of 88open standards. */
1147 #define TRAMPOLINE_TEMPLATE(FILE) \
1149 char buf[256]; \
1150 static int labelno = 0; \
1151 labelno++; \
1152 ASM_GENERATE_INTERNAL_LABEL (buf, "LTRMP", labelno); \
1153 /* Save the return address (r1) in the static chain reg (r11). */ \
1154 fprintf (FILE, "\tor\t %s,%s,0\n", reg_names[11], reg_names[1]); \
1155 /* Locate this block; transfer to the next instruction. */ \
1156 fprintf (FILE, "\tbsr\t %s\n", &buf[1]); \
1157 ASM_OUTPUT_INTERNAL_LABEL (FILE, "LTRMP", labelno); \
1158 /* Save r10; use it as the relative pointer; restore r1. */ \
1159 fprintf (FILE, "\tst\t %s,%s,24\n", reg_names[10], reg_names[1]); \
1160 fprintf (FILE, "\tor\t %s,%s,0\n", reg_names[10], reg_names[1]); \
1161 fprintf (FILE, "\tor\t %s,%s,0\n", reg_names[1], reg_names[11]); \
1162 /* Load the function's address and go there. */ \
1163 fprintf (FILE, "\tld\t %s,%s,32\n", reg_names[11], reg_names[10]); \
1164 fprintf (FILE, "\tjmp.n\t %s\n", reg_names[11]); \
1165 /* Restore r10 and load the static chain register. */ \
1166 fprintf (FILE, "\tld.d\t %s,%s,24\n", reg_names[10], reg_names[10]); \
1167 /* Storage: r10 save area, static chain, function address. */ \
1168 ASM_OUTPUT_INT (FILE, const0_rtx); \
1169 ASM_OUTPUT_INT (FILE, const0_rtx); \
1170 ASM_OUTPUT_INT (FILE, const0_rtx); \
1173 /* Length in units of the trampoline for entering a nested function.
1174 This is really two components. The first 32 bytes are fixed and
1175 must be copied; the last 12 bytes are just storage that's filled
1176 in later. So for allocation purposes, it's 32+12 bytes, but for
1177 initialization purposes, it's 32 bytes. */
1179 #define TRAMPOLINE_SIZE (32+12)
1181 /* Alignment required for a trampoline. 128 is used to find the
1182 beginning of a line in the instruction cache and to allow for
1183 instruction cache lines of up to 128 bytes. */
1185 #define TRAMPOLINE_ALIGNMENT 128
1187 /* Emit RTL insns to initialize the variable parts of a trampoline.
1188 FNADDR is an RTX for the address of the function's pure code.
1189 CXT is an RTX for the static chain value for the function. */
1191 #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
1193 emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 40)), FNADDR); \
1194 emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 36)), CXT); \
1197 /*** Library Subroutine Names ***/
1199 /* Define this macro if GNU CC should generate calls to the System V
1200 (and ANSI C) library functions `memcpy' and `memset' rather than
1201 the BSD functions `bcopy' and `bzero'. */
1202 #define TARGET_MEM_FUNCTIONS
1204 /*** Addressing Modes ***/
1206 #define EXTRA_CC_MODES CC(CCEVENmode, "CCEVEN")
1208 #define SELECT_CC_MODE(OP,X,Y) CCmode
1210 /* #define HAVE_POST_INCREMENT 0 */
1211 /* #define HAVE_POST_DECREMENT 0 */
1213 /* #define HAVE_PRE_DECREMENT 0 */
1214 /* #define HAVE_PRE_INCREMENT 0 */
1216 /* Recognize any constant value that is a valid address.
1217 When PIC, we do not accept an address that would require a scratch reg
1218 to load into a register. */
1220 #define CONSTANT_ADDRESS_P(X) \
1221 (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF \
1222 || GET_CODE (X) == CONST_INT || GET_CODE (X) == HIGH \
1223 || (GET_CODE (X) == CONST \
1224 && ! (flag_pic && pic_address_needs_scratch (X))))
1227 /* Maximum number of registers that can appear in a valid memory address. */
1228 #define MAX_REGS_PER_ADDRESS 2
1230 /* The condition for memory shift insns. */
1231 #define SCALED_ADDRESS_P(ADDR) \
1232 (GET_CODE (ADDR) == PLUS \
1233 && (GET_CODE (XEXP (ADDR, 0)) == MULT \
1234 || GET_CODE (XEXP (ADDR, 1)) == MULT))
1236 /* Can the reference to X be made short? */
1237 #define SHORT_ADDRESS_P(X,TEMP) \
1238 ((TEMP) = (GET_CODE (X) == CONST ? get_related_value (X) : X), \
1239 ((TEMP) && GET_CODE (TEMP) == SYMBOL_REF && SYMBOL_REF_FLAG (TEMP)))
1241 /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
1242 that is a valid memory address for an instruction.
1243 The MODE argument is the machine mode for the MEM expression
1244 that wants to use this address.
1246 On the m88000, a legitimate address has the form REG, REG+REG,
1247 REG+SMALLINT, REG+(REG*modesize) (REG[REG]), or SMALLINT.
1249 The register elimination process should deal with the argument
1250 pointer and frame pointer changing to REG+SMALLINT. */
1252 #define LEGITIMATE_INDEX_P(X, MODE) \
1253 ((GET_CODE (X) == CONST_INT \
1254 && SMALL_INT (X)) \
1255 || (REG_P (X) \
1256 && REG_OK_FOR_INDEX_P (X)) \
1257 || (GET_CODE (X) == MULT \
1258 && REG_P (XEXP (X, 0)) \
1259 && REG_OK_FOR_INDEX_P (XEXP (X, 0)) \
1260 && GET_CODE (XEXP (X, 1)) == CONST_INT \
1261 && INTVAL (XEXP (X, 1)) == GET_MODE_SIZE (MODE)))
1263 #define RTX_OK_FOR_BASE_P(X) \
1264 ((GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X)) \
1265 || (GET_CODE (X) == SUBREG \
1266 && GET_CODE (SUBREG_REG (X)) == REG \
1267 && REG_OK_FOR_BASE_P (SUBREG_REG (X))))
1269 #define RTX_OK_FOR_INDEX_P(X) \
1270 ((GET_CODE (X) == REG && REG_OK_FOR_INDEX_P (X)) \
1271 || (GET_CODE (X) == SUBREG \
1272 && GET_CODE (SUBREG_REG (X)) == REG \
1273 && REG_OK_FOR_INDEX_P (SUBREG_REG (X))))
1275 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
1277 register rtx _x; \
1278 if (REG_P (X)) \
1280 if (REG_OK_FOR_BASE_P (X)) \
1281 goto ADDR; \
1283 else if (GET_CODE (X) == PLUS) \
1285 register rtx _x0 = XEXP (X, 0); \
1286 register rtx _x1 = XEXP (X, 1); \
1287 if ((flag_pic \
1288 && _x0 == pic_offset_table_rtx \
1289 && (flag_pic == 2 \
1290 ? RTX_OK_FOR_BASE_P (_x1) \
1291 : (GET_CODE (_x1) == SYMBOL_REF \
1292 || GET_CODE (_x1) == LABEL_REF))) \
1293 || (REG_P (_x0) \
1294 && (REG_OK_FOR_BASE_P (_x0) \
1295 && LEGITIMATE_INDEX_P (_x1, MODE))) \
1296 || (REG_P (_x1) \
1297 && (REG_OK_FOR_BASE_P (_x1) \
1298 && LEGITIMATE_INDEX_P (_x0, MODE)))) \
1299 goto ADDR; \
1301 else if (GET_CODE (X) == LO_SUM) \
1303 register rtx _x0 = XEXP (X, 0); \
1304 register rtx _x1 = XEXP (X, 1); \
1305 if (((REG_P (_x0) \
1306 && REG_OK_FOR_BASE_P (_x0)) \
1307 || (GET_CODE (_x0) == SUBREG \
1308 && REG_P (SUBREG_REG (_x0)) \
1309 && REG_OK_FOR_BASE_P (SUBREG_REG (_x0)))) \
1310 && CONSTANT_P (_x1)) \
1311 goto ADDR; \
1313 else if (GET_CODE (X) == CONST_INT \
1314 && SMALL_INT (X)) \
1315 goto ADDR; \
1316 else if (SHORT_ADDRESS_P (X, _x)) \
1317 goto ADDR; \
1320 /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
1321 and check its validity for a certain class.
1322 We have two alternate definitions for each of them.
1323 The usual definition accepts all pseudo regs; the other rejects
1324 them unless they have been allocated suitable hard regs.
1325 The symbol REG_OK_STRICT causes the latter definition to be used.
1327 Most source files want to accept pseudo regs in the hope that
1328 they will get allocated to the class that the insn wants them to be in.
1329 Source files for reload pass need to be strict.
1330 After reload, it makes no difference, since pseudo regs have
1331 been eliminated by then. */
1333 #ifndef REG_OK_STRICT
1335 /* Nonzero if X is a hard reg that can be used as an index
1336 or if it is a pseudo reg. Not the argument pointer. */
1337 #define REG_OK_FOR_INDEX_P(X) \
1338 (!XRF_REGNO_P(REGNO (X)))
1339 /* Nonzero if X is a hard reg that can be used as a base reg
1340 or if it is a pseudo reg. */
1341 #define REG_OK_FOR_BASE_P(X) (REG_OK_FOR_INDEX_P (X))
1343 #else
1345 /* Nonzero if X is a hard reg that can be used as an index. */
1346 #define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X))
1347 /* Nonzero if X is a hard reg that can be used as a base reg. */
1348 #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))
1350 #endif
1352 /* Try machine-dependent ways of modifying an illegitimate address
1353 to be legitimate. If we find one, return the new, valid address.
1354 This macro is used in only one place: `memory_address' in explow.c.
1356 OLDX is the address as it was before break_out_memory_refs was called.
1357 In some cases it is useful to look at this to decide what needs to be done.
1359 MODE and WIN are passed so that this macro can use
1360 GO_IF_LEGITIMATE_ADDRESS.
1362 It is always safe for this macro to do nothing. It exists to recognize
1363 opportunities to optimize the output. */
1365 /* On the m88000, change REG+N into REG+REG, and REG+(X*Y) into REG+REG. */
1367 #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN) \
1369 if (GET_CODE (X) == PLUS && CONSTANT_ADDRESS_P (XEXP (X, 1))) \
1370 (X) = gen_rtx_PLUS (SImode, XEXP (X, 0), \
1371 copy_to_mode_reg (SImode, XEXP (X, 1))); \
1372 if (GET_CODE (X) == PLUS && CONSTANT_ADDRESS_P (XEXP (X, 0))) \
1373 (X) = gen_rtx_PLUS (SImode, XEXP (X, 1), \
1374 copy_to_mode_reg (SImode, XEXP (X, 0))); \
1375 if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 0)) == MULT) \
1376 (X) = gen_rtx_PLUS (SImode, XEXP (X, 1), \
1377 force_operand (XEXP (X, 0), 0)); \
1378 if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 1)) == MULT) \
1379 (X) = gen_rtx_PLUS (SImode, XEXP (X, 0), \
1380 force_operand (XEXP (X, 1), 0)); \
1381 if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 0)) == PLUS) \
1382 (X) = gen_rtx_PLUS (Pmode, force_operand (XEXP (X, 0), NULL_RTX),\
1383 XEXP (X, 1)); \
1384 if (GET_CODE (X) == PLUS && GET_CODE (XEXP (X, 1)) == PLUS) \
1385 (X) = gen_rtx_PLUS (Pmode, XEXP (X, 0), \
1386 force_operand (XEXP (X, 1), NULL_RTX)); \
1387 if (GET_CODE (X) == SYMBOL_REF || GET_CODE (X) == CONST \
1388 || GET_CODE (X) == LABEL_REF) \
1389 (X) = legitimize_address (flag_pic, X, 0, 0); \
1390 if (memory_address_p (MODE, X)) \
1391 goto WIN; }
1393 /* Go to LABEL if ADDR (a legitimate address expression)
1394 has an effect that depends on the machine mode it is used for.
1395 On the m88000 this is never true. */
1397 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)
1399 /* Nonzero if the constant value X is a legitimate general operand.
1400 It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
1401 #define LEGITIMATE_CONSTANT_P(X) (1)
1403 /* Define this, so that when PIC, reload won't try to reload invalid
1404 addresses which require two reload registers. */
1406 #define LEGITIMATE_PIC_OPERAND_P(X) (! pic_address_needs_scratch (X))
1409 /*** Condition Code Information ***/
1411 /* C code for a data type which is used for declaring the `mdep'
1412 component of `cc_status'. It defaults to `int'. */
1413 /* #define CC_STATUS_MDEP int */
1415 /* A C expression to initialize the `mdep' field to "empty". */
1416 /* #define CC_STATUS_MDEP_INIT (cc_status.mdep = 0) */
1418 /* Macro to zap the normal portions of CC_STATUS, but leave the
1419 machine dependent parts (ie, literal synthesis) alone. */
1420 /* #define CC_STATUS_INIT_NO_MDEP \
1421 (cc_status.flags = 0, cc_status.value1 = 0, cc_status.value2 = 0) */
1423 /* When using a register to hold the condition codes, the cc_status
1424 mechanism cannot be used. */
1425 #define NOTICE_UPDATE_CC(EXP, INSN) (0)
1427 /*** Miscellaneous Parameters ***/
1429 /* Define the codes that are matched by predicates in m88k.c. */
1430 #define PREDICATE_CODES \
1431 {"move_operand", {SUBREG, REG, CONST_INT, LO_SUM, MEM}}, \
1432 {"call_address_operand", {SUBREG, REG, SYMBOL_REF, LABEL_REF, CONST}}, \
1433 {"arith_operand", {SUBREG, REG, CONST_INT}}, \
1434 {"arith5_operand", {SUBREG, REG, CONST_INT}}, \
1435 {"arith32_operand", {SUBREG, REG, CONST_INT}}, \
1436 {"arith64_operand", {SUBREG, REG, CONST_INT}}, \
1437 {"int5_operand", {CONST_INT}}, \
1438 {"int32_operand", {CONST_INT}}, \
1439 {"add_operand", {SUBREG, REG, CONST_INT}}, \
1440 {"reg_or_bbx_mask_operand", {SUBREG, REG, CONST_INT}}, \
1441 {"real_or_0_operand", {SUBREG, REG, CONST_DOUBLE}}, \
1442 {"reg_or_0_operand", {SUBREG, REG, CONST_INT}}, \
1443 {"relop", {EQ, NE, LT, LE, GE, GT, LTU, LEU, GEU, GTU}}, \
1444 {"even_relop", {EQ, LT, GT, LTU, GTU}}, \
1445 {"odd_relop", { NE, LE, GE, LEU, GEU}}, \
1446 {"partial_ccmode_register_operand", { SUBREG, REG}}, \
1447 {"relop_no_unsigned", {EQ, NE, LT, LE, GE, GT}}, \
1448 {"equality_op", {EQ, NE}}, \
1449 {"pc_or_label_ref", {PC, LABEL_REF}},
1451 /* A list of predicates that do special things with modes, and so
1452 should not elicit warnings for VOIDmode match_operand. */
1454 #define SPECIAL_MODE_PREDICATES \
1455 "partial_ccmode_register_operand", \
1456 "pc_or_label_ref",
1458 /* The case table contains either words or branch instructions. This says
1459 which. We always claim that the vector is PC-relative. It is position
1460 independent when -fpic is used. */
1461 #define CASE_VECTOR_INSNS (TARGET_88100 || flag_pic)
1463 /* An alias for a machine mode name. This is the machine mode that
1464 elements of a jump-table should have. */
1465 #define CASE_VECTOR_MODE SImode
1467 /* Define as C expression which evaluates to nonzero if the tablejump
1468 instruction expects the table to contain offsets from the address of the
1469 table.
1470 Do not define this if the table should contain absolute addresses. */
1471 #define CASE_VECTOR_PC_RELATIVE 1
1473 /* Define this if control falls through a `case' insn when the index
1474 value is out of range. This means the specified default-label is
1475 actually ignored by the `case' insn proper. */
1476 /* #define CASE_DROPS_THROUGH */
1478 /* Define this to be the smallest number of different values for which it
1479 is best to use a jump-table instead of a tree of conditional branches.
1480 The default is 4 for machines with a casesi instruction and 5 otherwise.
1481 The best 88110 number is around 7, though the exact number isn't yet
1482 known. A third alternative for the 88110 is to use a binary tree of
1483 bb1 instructions on bits 2/1/0 if the range is dense. This may not
1484 win very much though. */
1485 #define CASE_VALUES_THRESHOLD (TARGET_88100 ? 4 : 7)
1487 /* Specify the tree operation to be used to convert reals to integers. */
1488 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
1490 /* This is the kind of divide that is easiest to do in the general case. */
1491 #define EASY_DIV_EXPR TRUNC_DIV_EXPR
1493 /* Define this as 1 if `char' should by default be signed; else as 0. */
1494 #define DEFAULT_SIGNED_CHAR 1
1496 /* The 88open ABI says size_t is unsigned int. */
1497 #define SIZE_TYPE "unsigned int"
1499 /* Allow and ignore #sccs directives */
1500 #define SCCS_DIRECTIVE
1502 /* Handle #pragma pack and sometimes #pragma weak. */
1503 #define HANDLE_SYSV_PRAGMA
1505 /* Tell when to handle #pragma weak. This is only done for V.4. */
1506 #define SUPPORTS_WEAK TARGET_SVR4
1507 #define SUPPORTS_ONE_ONLY TARGET_SVR4
1509 /* Max number of bytes we can move from memory to memory
1510 in one reasonably fast instruction. */
1511 #define MOVE_MAX 8
1513 /* Define if normal loads of shorter-than-word items from memory clears
1514 the rest of the bigs in the register. */
1515 #define BYTE_LOADS_ZERO_EXTEND
1517 /* Zero if access to memory by bytes is faster. */
1518 #define SLOW_BYTE_ACCESS 1
1520 /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
1521 is done just by pretending it is already truncated. */
1522 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
1524 /* Define this if addresses of constant functions
1525 shouldn't be put through pseudo regs where they can be cse'd.
1526 Desirable on machines where ordinary constants are expensive
1527 but a CALL with constant address is cheap. */
1528 #define NO_FUNCTION_CSE
1530 /* Define this macro if an argument declared as `char' or
1531 `short' in a prototype should actually be passed as an
1532 `int'. In addition to avoiding errors in certain cases of
1533 mismatch, it also makes for better code on certain machines. */
1534 #define PROMOTE_PROTOTYPES 1
1536 /* Define this macro if a float function always returns float
1537 (even in traditional mode). Redefined in luna.h. */
1538 #define TRADITIONAL_RETURN_FLOAT
1540 /* We assume that the store-condition-codes instructions store 0 for false
1541 and some other value for true. This is the value stored for true. */
1542 #define STORE_FLAG_VALUE -1
1544 /* Specify the machine mode that pointers have.
1545 After generation of rtl, the compiler makes no further distinction
1546 between pointers and any other objects of this machine mode. */
1547 #define Pmode SImode
1549 /* A function address in a call instruction
1550 is a word address (for indexing purposes)
1551 so give the MEM rtx word mode. */
1552 #define FUNCTION_MODE SImode
1554 /* A barrier will be aligned so account for the possible expansion.
1555 A volatile load may be preceded by a serializing instruction.
1556 Account for profiling code output at NOTE_INSN_PROLOGUE_END.
1557 Account for block profiling code at basic block boundaries. */
1558 #define ADJUST_INSN_LENGTH(RTX, LENGTH) \
1559 if (GET_CODE (RTX) == BARRIER \
1560 || (TARGET_SERIALIZE_VOLATILE \
1561 && GET_CODE (RTX) == INSN \
1562 && GET_CODE (PATTERN (RTX)) == SET \
1563 && ((GET_CODE (SET_SRC (PATTERN (RTX))) == MEM \
1564 && MEM_VOLATILE_P (SET_SRC (PATTERN (RTX))))))) \
1565 LENGTH += 1; \
1566 else if (GET_CODE (RTX) == NOTE \
1567 && NOTE_LINE_NUMBER (RTX) == NOTE_INSN_PROLOGUE_END) \
1569 if (profile_block_flag) \
1570 LENGTH += FUNCTION_BLOCK_PROFILER_LENGTH; \
1571 if (profile_flag) \
1572 LENGTH += (FUNCTION_PROFILER_LENGTH + REG_PUSH_LENGTH \
1573 + REG_POP_LENGTH); \
1575 else if (profile_block_flag \
1576 && (GET_CODE (RTX) == CODE_LABEL \
1577 || GET_CODE (RTX) == JUMP_INSN \
1578 || (GET_CODE (RTX) == INSN \
1579 && GET_CODE (PATTERN (RTX)) == SEQUENCE \
1580 && GET_CODE (XVECEXP (PATTERN (RTX), 0, 0)) == JUMP_INSN)))\
1581 LENGTH += BLOCK_PROFILER_LENGTH;
1583 /* Track the state of the last volatile memory reference. Clear the
1584 state with CC_STATUS_INIT for now. */
1585 #define CC_STATUS_INIT m88k_volatile_code = '\0'
1587 /* Compute the cost of computing a constant rtl expression RTX
1588 whose rtx-code is CODE. The body of this macro is a portion
1589 of a switch statement. If the code is computed here,
1590 return it with a return statement. Otherwise, break from the switch.
1592 We assume that any 16 bit integer can easily be recreated, so we
1593 indicate 0 cost, in an attempt to get GCC not to optimize things
1594 like comparison against a constant.
1596 The cost of CONST_DOUBLE is zero (if it can be placed in an insn, it
1597 is as good as a register; since it can't be placed in any insn, it
1598 won't do anything in cse, but it will cause expand_binop to pass the
1599 constant to the define_expands). */
1600 #define CONST_COSTS(RTX,CODE,OUTER_CODE) \
1601 case CONST_INT: \
1602 if (SMALL_INT (RTX)) \
1603 return 0; \
1604 else if (SMALL_INTVAL (- INTVAL (RTX))) \
1605 return 2; \
1606 else if (classify_integer (SImode, INTVAL (RTX)) != m88k_oru_or) \
1607 return 4; \
1608 return 7; \
1609 case HIGH: \
1610 return 2; \
1611 case CONST: \
1612 case LABEL_REF: \
1613 case SYMBOL_REF: \
1614 if (flag_pic) \
1615 return (flag_pic == 2) ? 11 : 8; \
1616 return 5; \
1617 case CONST_DOUBLE: \
1618 return 0;
1620 /* Provide the costs of an addressing mode that contains ADDR.
1621 If ADDR is not a valid address, its cost is irrelevant.
1622 REG+REG is made slightly more expensive because it might keep
1623 a register live for longer than we might like. */
1624 #define ADDRESS_COST(ADDR) \
1625 (GET_CODE (ADDR) == REG ? 1 : \
1626 GET_CODE (ADDR) == LO_SUM ? 1 : \
1627 GET_CODE (ADDR) == HIGH ? 2 : \
1628 GET_CODE (ADDR) == MULT ? 1 : \
1629 GET_CODE (ADDR) != PLUS ? 4 : \
1630 (REG_P (XEXP (ADDR, 0)) && REG_P (XEXP (ADDR, 1))) ? 2 : 1)
1632 /* Provide the costs of a rtl expression. This is in the body of a
1633 switch on CODE. */
1634 #define RTX_COSTS(X,CODE,OUTER_CODE) \
1635 case MEM: \
1636 return COSTS_N_INSNS (2); \
1637 case MULT: \
1638 return COSTS_N_INSNS (3); \
1639 case DIV: \
1640 case UDIV: \
1641 case MOD: \
1642 case UMOD: \
1643 return COSTS_N_INSNS (38);
1645 /* A C expressions returning the cost of moving data of MODE from a register
1646 to or from memory. This is more costly than between registers. */
1647 #define MEMORY_MOVE_COST(MODE,CLASS,IN) 4
1649 /* Provide the cost of a branch. Exact meaning under development. */
1650 #define BRANCH_COST (TARGET_88100 ? 1 : 2)
1652 /* A C statement (sans semicolon) to update the integer variable COST
1653 based on the relationship between INSN that is dependent on
1654 DEP_INSN through the dependence LINK. The default is to make no
1655 adjustment to COST. On the m88k, ignore the cost of anti- and
1656 output-dependencies. On the m88100, a store can issue two cycles
1657 before the value (not the address) has finished computing. */
1658 #define ADJUST_COST(INSN,LINK,DEP_INSN,COST) \
1659 do { \
1660 if (REG_NOTE_KIND (LINK) != 0) \
1661 (COST) = 0; /* Anti or output dependence. */ \
1662 else if (! TARGET_88100 \
1663 && recog_memoized (INSN) >= 0 \
1664 && get_attr_type (INSN) == TYPE_STORE \
1665 && SET_SRC (PATTERN (INSN)) == SET_DEST (PATTERN (DEP_INSN))) \
1666 (COST) -= 4; /* 88110 store reservation station. */ \
1667 } while (0)
1669 /* Do not break .stabs pseudos into continuations. */
1670 #define DBX_CONTIN_LENGTH 0
1672 /*** Output of Assembler Code ***/
1674 /* Control the assembler format that we output. */
1676 /* A C string constant describing how to begin a comment in the target
1677 assembler language. The compiler assumes that the comment will end at
1678 the end of the line. */
1679 #define ASM_COMMENT_START ";"
1681 /* Allow pseudo-ops to be overridden. Override these in svr[34].h. */
1682 #undef INT_ASM_OP
1683 #undef ASCII_DATA_ASM_OP
1684 #undef CONST_SECTION_ASM_OP
1685 #undef CTORS_SECTION_ASM_OP
1686 #undef DTORS_SECTION_ASM_OP
1687 #undef ASM_OUTPUT_SECTION_NAME
1688 #undef INIT_SECTION_ASM_OP
1689 #undef FINI_SECTION_ASM_OP
1690 #undef TYPE_ASM_OP
1691 #undef SIZE_ASM_OP
1692 #undef SET_ASM_OP
1693 #undef SKIP_ASM_OP
1694 #undef COMMON_ASM_OP
1695 #undef ALIGN_ASM_OP
1696 #undef IDENT_ASM_OP
1698 /* These are used in varasm.c as well. */
1699 #define TEXT_SECTION_ASM_OP "text"
1700 #define DATA_SECTION_ASM_OP "data"
1702 /* Other sections. */
1703 #define CONST_SECTION_ASM_OP (TARGET_SVR4 \
1704 ? "section\t .rodata,\"a\"" \
1705 : "section\t .rodata,\"x\"")
1706 #define TDESC_SECTION_ASM_OP (TARGET_SVR4 \
1707 ? "section\t .tdesc,\"a\"" \
1708 : "section\t .tdesc,\"x\"")
1710 /* These must be constant strings for crtstuff.c. */
1711 #define CTORS_SECTION_ASM_OP "section\t .ctors,\"d\""
1712 #define DTORS_SECTION_ASM_OP "section\t .dtors,\"d\""
1713 #define INIT_SECTION_ASM_OP "section\t .init,\"x\""
1714 #define FINI_SECTION_ASM_OP "section\t .fini,\"x\""
1716 /* These are pretty much common to all assemblers. */
1717 #define IDENT_ASM_OP "ident"
1718 #define FILE_ASM_OP "file"
1719 #define SECTION_ASM_OP "section"
1720 #define SET_ASM_OP "def"
1721 #define GLOBAL_ASM_OP "global"
1722 #define ALIGN_ASM_OP "align"
1723 #define SKIP_ASM_OP "zero"
1724 #define COMMON_ASM_OP "comm"
1725 #define BSS_ASM_OP "bss"
1726 #define FLOAT_ASM_OP "float"
1727 #define DOUBLE_ASM_OP "double"
1728 #define INT_ASM_OP "word"
1729 #define ASM_LONG INT_ASM_OP
1730 #define SHORT_ASM_OP "half"
1731 #define CHAR_ASM_OP "byte"
1732 #define ASCII_DATA_ASM_OP "string"
1734 /* These are particular to the global pool optimization. */
1735 #define SBSS_ASM_OP "sbss"
1736 #define SCOMM_ASM_OP "scomm"
1737 #define SDATA_SECTION_ASM_OP "sdata"
1739 /* These are specific to PIC. */
1740 #define TYPE_ASM_OP "type"
1741 #define SIZE_ASM_OP "size"
1742 #ifndef AS_BUG_POUND_TYPE /* Faulty assemblers require @ rather than #. */
1743 #undef TYPE_OPERAND_FMT
1744 #define TYPE_OPERAND_FMT "#%s"
1745 #endif
1747 /* This is how we tell the assembler that a symbol is weak. */
1749 #undef ASM_WEAKEN_LABEL
1750 #define ASM_WEAKEN_LABEL(FILE,NAME) \
1751 do { fputs ("\tweak\t", FILE); assemble_name (FILE, NAME); \
1752 fputc ('\n', FILE); } while (0)
1754 /* These are specific to version 03.00 assembler syntax. */
1755 #define INTERNAL_ASM_OP "local"
1756 #define VERSION_ASM_OP "version"
1757 #define UNALIGNED_SHORT_ASM_OP "uahalf"
1758 #define UNALIGNED_INT_ASM_OP "uaword"
1759 #define PUSHSECTION_ASM_OP "section"
1760 #define POPSECTION_ASM_OP "previous"
1762 /* These are specific to the version 04.00 assembler syntax. */
1763 #define REQUIRES_88110_ASM_OP "requires_88110"
1765 /* Output any initial stuff to the assembly file. Always put out
1766 a file directive, even if not debugging.
1768 Immediately after putting out the file, put out a "sem.<value>"
1769 declaration. This should be harmless on other systems, and
1770 is used in DG/UX by the debuggers to supplement COFF. The
1771 fields in the integer value are as follows:
1773 Bits Value Meaning
1774 ---- ----- -------
1775 0-1 0 No information about stack locations
1776 1 Auto/param locations are based on r30
1777 2 Auto/param locations are based on CFA
1779 3-2 0 No information on dimension order
1780 1 Array dims in sym table matches source language
1781 2 Array dims in sym table is in reverse order
1783 5-4 0 No information about the case of global names
1784 1 Global names appear in the symbol table as in the source
1785 2 Global names have been converted to lower case
1786 3 Global names have been converted to upper case. */
1788 #ifdef SDB_DEBUGGING_INFO
1789 #define ASM_COFFSEM(FILE) \
1790 if (write_symbols == SDB_DEBUG) \
1792 fprintf (FILE, "\nsem.%x:\t\t; %s\n", \
1793 (((TARGET_OCS_FRAME_POSITION) ? 2 : 1) << 0) + (1 << 2) + (1 << 4),\
1794 (TARGET_OCS_FRAME_POSITION) \
1795 ? "frame is CFA, normal array dims, case unchanged" \
1796 : "frame is r30, normal array dims, case unchanged"); \
1798 #else
1799 #define ASM_COFFSEM(FILE)
1800 #endif
1802 /* Output the first line of the assembly file. Redefined in dgux.h. */
1804 #define ASM_FIRST_LINE(FILE) \
1805 do { \
1806 if (TARGET_SVR4) \
1808 if (TARGET_88110) \
1809 fprintf (FILE, "\t%s\t \"%s\"\n", VERSION_ASM_OP, "04.00"); \
1810 else \
1811 fprintf (FILE, "\t%s\t \"%s\"\n", VERSION_ASM_OP, "03.00"); \
1813 } while (0)
1815 /* Override svr[34].h. */
1816 #undef ASM_FILE_START
1817 #define ASM_FILE_START(FILE) \
1818 output_file_start (FILE, \
1819 (struct m88k_lang_independent_options *) f_options, \
1820 sizeof f_options / sizeof f_options[0], \
1821 (struct m88k_lang_independent_options *) W_options, \
1822 sizeof W_options / sizeof W_options[0])
1824 #undef ASM_FILE_END
1826 #define ASM_OUTPUT_SOURCE_FILENAME(FILE, NAME) \
1827 fprintf (FILE, "\t%s\t \"%s\"\n", FILE_ASM_OP, NAME)
1829 #ifdef SDB_DEBUGGING_INFO
1830 #undef ASM_OUTPUT_SOURCE_LINE
1831 #define ASM_OUTPUT_SOURCE_LINE(FILE, LINE) \
1832 if (m88k_prologue_done) \
1833 fprintf (FILE, "\n\tln\t %d\t\t\t\t; Real source line %d\n",\
1834 LINE - sdb_begin_function_line, LINE)
1835 #endif
1837 /* Code to handle #ident directives. Override svr[34].h definition. */
1838 #undef ASM_OUTPUT_IDENT
1839 #ifdef DBX_DEBUGGING_INFO
1840 #define ASM_OUTPUT_IDENT(FILE, NAME)
1841 #else
1842 #define ASM_OUTPUT_IDENT(FILE, NAME) \
1843 output_ascii (FILE, IDENT_ASM_OP, 4000, NAME, strlen (NAME));
1844 #endif
1846 /* Output to assembler file text saying following lines
1847 may contain character constants, extra white space, comments, etc. */
1848 #define ASM_APP_ON ""
1850 /* Output to assembler file text saying following lines
1851 no longer contain unusual constructs. */
1852 #define ASM_APP_OFF ""
1854 /* Format the assembly opcode so that the arguments are all aligned.
1855 The maximum instruction size is 8 characters (fxxx.xxx), so a tab and a
1856 space will do to align the output. Abandon the output if a `%' is
1857 encountered. */
1858 #define ASM_OUTPUT_OPCODE(STREAM, PTR) \
1860 int ch; \
1861 const char *orig_ptr; \
1863 for (orig_ptr = (PTR); \
1864 (ch = *(PTR)) && ch != ' ' && ch != '\t' && ch != '\n' && ch != '%'; \
1865 (PTR)++) \
1866 putc (ch, STREAM); \
1868 if (ch == ' ' && orig_ptr != (PTR) && (PTR) - orig_ptr < 8) \
1869 putc ('\t', STREAM); \
1872 /* How to refer to registers in assembler output.
1873 This sequence is indexed by compiler's hard-register-number.
1874 Updated by OVERRIDE_OPTIONS to include the # for version 03.00 syntax. */
1876 #define REGISTER_NAMES \
1877 {"#r0"+1, "#r1"+1, "#r2"+1, "#r3"+1, "#r4"+1, "#r5"+1, "#r6"+1, "#r7"+1, \
1878 "#r8"+1, "#r9"+1, "#r10"+1,"#r11"+1,"#r12"+1,"#r13"+1,"#r14"+1,"#r15"+1,\
1879 "#r16"+1,"#r17"+1,"#r18"+1,"#r19"+1,"#r20"+1,"#r21"+1,"#r22"+1,"#r23"+1,\
1880 "#r24"+1,"#r25"+1,"#r26"+1,"#r27"+1,"#r28"+1,"#r29"+1,"#r30"+1,"#r31"+1,\
1881 "#x0"+1, "#x1"+1, "#x2"+1, "#x3"+1, "#x4"+1, "#x5"+1, "#x6"+1, "#x7"+1, \
1882 "#x8"+1, "#x9"+1, "#x10"+1,"#x11"+1,"#x12"+1,"#x13"+1,"#x14"+1,"#x15"+1,\
1883 "#x16"+1,"#x17"+1,"#x18"+1,"#x19"+1,"#x20"+1,"#x21"+1,"#x22"+1,"#x23"+1,\
1884 "#x24"+1,"#x25"+1,"#x26"+1,"#x27"+1,"#x28"+1,"#x29"+1,"#x30"+1,"#x31"+1}
1886 /* Define additional names for use in asm clobbers and asm declarations.
1888 We define the fake Condition Code register as an alias for reg 0 (which
1889 is our `condition code' register), so that condition codes can easily
1890 be clobbered by an asm. The carry bit in the PSR is now used. */
1892 #define ADDITIONAL_REGISTER_NAMES {{"psr", 0}, {"cc", 0}}
1894 /* How to renumber registers for dbx and gdb. */
1895 #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
1897 /* Tell when to declare ASM names. Override svr4.h to provide this hook. */
1898 #undef DECLARE_ASM_NAME
1899 #define DECLARE_ASM_NAME TARGET_SVR4
1901 /* Write the extra assembler code needed to declare a function properly. */
1902 #undef ASM_DECLARE_FUNCTION_NAME
1903 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
1904 do { \
1905 if (DECLARE_ASM_NAME) \
1907 fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
1908 assemble_name (FILE, NAME); \
1909 putc (',', FILE); \
1910 fprintf (FILE, TYPE_OPERAND_FMT, "function"); \
1911 putc ('\n', FILE); \
1913 ASM_OUTPUT_LABEL(FILE, NAME); \
1914 } while (0)
1916 /* Write the extra assembler code needed to declare an object properly. */
1917 #undef ASM_DECLARE_OBJECT_NAME
1918 #define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
1919 do { \
1920 if (DECLARE_ASM_NAME) \
1922 fprintf (FILE, "\t%s\t ", TYPE_ASM_OP); \
1923 assemble_name (FILE, NAME); \
1924 putc (',', FILE); \
1925 fprintf (FILE, TYPE_OPERAND_FMT, "object"); \
1926 putc ('\n', FILE); \
1927 size_directive_output = 0; \
1928 if (!flag_inhibit_size_directive && DECL_SIZE (DECL)) \
1930 size_directive_output = 1; \
1931 fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
1932 assemble_name (FILE, NAME); \
1933 fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
1936 ASM_OUTPUT_LABEL(FILE, NAME); \
1937 } while (0)
1939 /* Output the size directive for a decl in rest_of_decl_compilation
1940 in the case where we did not do so before the initializer.
1941 Once we find the error_mark_node, we know that the value of
1942 size_directive_output was set
1943 by ASM_DECLARE_OBJECT_NAME when it was run for the same decl. */
1945 #undef ASM_FINISH_DECLARE_OBJECT
1946 #define ASM_FINISH_DECLARE_OBJECT(FILE, DECL, TOP_LEVEL, AT_END) \
1947 do { \
1948 const char *name = XSTR (XEXP (DECL_RTL (DECL), 0), 0); \
1949 if (!flag_inhibit_size_directive && DECL_SIZE (DECL) \
1950 && DECLARE_ASM_NAME \
1951 && ! AT_END && TOP_LEVEL \
1952 && DECL_INITIAL (DECL) == error_mark_node \
1953 && !size_directive_output) \
1955 size_directive_output = 1; \
1956 fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
1957 assemble_name (FILE, name); \
1958 fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL))); \
1960 } while (0)
1962 /* This is how to declare the size of a function. */
1963 #undef ASM_DECLARE_FUNCTION_SIZE
1964 #define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL) \
1965 do { \
1966 if (DECLARE_ASM_NAME) \
1968 if (!flag_inhibit_size_directive) \
1970 char label[256]; \
1971 static int labelno = 0; \
1972 labelno++; \
1973 ASM_GENERATE_INTERNAL_LABEL (label, "Lfe", labelno); \
1974 ASM_OUTPUT_INTERNAL_LABEL (FILE, "Lfe", labelno); \
1975 fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
1976 assemble_name (FILE, (FNAME)); \
1977 fprintf (FILE, ",%s-", &label[1]); \
1978 assemble_name (FILE, (FNAME)); \
1979 putc ('\n', FILE); \
1982 } while (0)
1984 /* This is how to output the definition of a user-level label named NAME,
1985 such as the label on a static function or variable NAME. */
1986 #define ASM_OUTPUT_LABEL(FILE,NAME) \
1987 do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
1989 /* This is how to output a command to make the user-level label named NAME
1990 defined for reference from other files. */
1991 #define ASM_GLOBALIZE_LABEL(FILE,NAME) \
1992 do { \
1993 fprintf (FILE, "\t%s\t ", GLOBAL_ASM_OP); \
1994 assemble_name (FILE, NAME); \
1995 putc ('\n', FILE); \
1996 } while (0)
1998 /* The prefix to add to user-visible assembler symbols.
1999 Override svr[34].h. */
2000 #undef USER_LABEL_PREFIX
2001 #define USER_LABEL_PREFIX "_"
2003 /* This is how to output a reference to a user-level label named NAME.
2004 Override svr[34].h. */
2005 #undef ASM_OUTPUT_LABELREF
2006 #define ASM_OUTPUT_LABELREF(FILE,NAME) \
2008 if (!TARGET_NO_UNDERSCORES && !TARGET_SVR4) \
2009 fputc ('_', FILE); \
2010 fputs (NAME, FILE); \
2013 /* This is how to output an internal numbered label where
2014 PREFIX is the class of label and NUM is the number within the class.
2015 For V.4, labels use `.' rather than `@'. */
2017 #undef ASM_OUTPUT_INTERNAL_LABEL
2018 #ifdef AS_BUG_DOT_LABELS /* The assembler requires a declaration of local. */
2019 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
2020 fprintf (FILE, TARGET_SVR4 ? ".%s%d:\n\t%s\t .%s%d\n" : "@%s%d:\n", \
2021 PREFIX, NUM, INTERNAL_ASM_OP, PREFIX, NUM)
2022 #else
2023 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
2024 fprintf (FILE, TARGET_SVR4 ? ".%s%d:\n" : "@%s%d:\n", PREFIX, NUM)
2025 #endif /* AS_BUG_DOT_LABELS */
2027 /* This is how to store into the string LABEL
2028 the symbol_ref name of an internal numbered label where
2029 PREFIX is the class of label and NUM is the number within the class.
2030 This is suitable for output with `assemble_name'. This must agree
2031 with ASM_OUTPUT_INTERNAL_LABEL above, except for being prefixed
2032 with an `*'. */
2034 #undef ASM_GENERATE_INTERNAL_LABEL
2035 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
2036 sprintf (LABEL, TARGET_SVR4 ? "*.%s%d" : "*@%s%d", PREFIX, NUM)
2038 /* Internal macro to get a single precision floating point value into
2039 an int, so we can print its value in hex. */
2040 #define FLOAT_TO_INT_INTERNAL( FVALUE, IVALUE ) \
2041 { union { \
2042 REAL_VALUE_TYPE d; \
2043 struct { \
2044 unsigned sign : 1; \
2045 unsigned exponent1 : 1; \
2046 unsigned exponent2 : 3; \
2047 unsigned exponent3 : 7; \
2048 unsigned mantissa1 : 20; \
2049 unsigned mantissa2 : 3; \
2050 unsigned mantissa3 : 29; \
2051 } s; \
2052 } _u; \
2054 union { \
2055 int i; \
2056 struct { \
2057 unsigned sign : 1; \
2058 unsigned exponent1 : 1; \
2059 unsigned exponent3 : 7; \
2060 unsigned mantissa1 : 20; \
2061 unsigned mantissa2 : 3; \
2062 } s; \
2063 } _u2; \
2065 _u.d = REAL_VALUE_TRUNCATE (SFmode, FVALUE); \
2066 _u2.s.sign = _u.s.sign; \
2067 _u2.s.exponent1 = _u.s.exponent1; \
2068 _u2.s.exponent3 = _u.s.exponent3; \
2069 _u2.s.mantissa1 = _u.s.mantissa1; \
2070 _u2.s.mantissa2 = _u.s.mantissa2; \
2071 IVALUE = _u2.i; \
2074 /* This is how to output an assembler line defining a `double' constant.
2075 Use "word" pseudos to avoid printing NaNs, infinity, etc. */
2076 #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
2077 do { \
2078 union { REAL_VALUE_TYPE d; long l[2]; } x; \
2079 x.d = (VALUE); \
2080 fprintf (FILE, "\t%s\t 0x%.8lx, 0x%.8lx\n", INT_ASM_OP, \
2081 (long) x.l[0], (long) x.l[1]); \
2082 } while (0)
2084 /* This is how to output an assembler line defining a `float' constant. */
2085 #define ASM_OUTPUT_FLOAT(FILE,VALUE) \
2086 do { \
2087 int i; \
2088 FLOAT_TO_INT_INTERNAL (VALUE, i); \
2089 fprintf (FILE, "\t%s\t 0x%.8x\n", INT_ASM_OP, i); \
2090 } while (0)
2092 /* Likewise for `int', `short', and `char' constants. */
2093 #define ASM_OUTPUT_INT(FILE,VALUE) \
2094 ( fprintf (FILE, "\t%s\t ", INT_ASM_OP), \
2095 output_addr_const (FILE, (VALUE)), \
2096 fprintf (FILE, "\n"))
2098 #define ASM_OUTPUT_SHORT(FILE,VALUE) \
2099 ( fprintf (FILE, "\t%s\t ", SHORT_ASM_OP), \
2100 output_addr_const (FILE, (VALUE)), \
2101 fprintf (FILE, "\n"))
2103 #define ASM_OUTPUT_CHAR(FILE,VALUE) \
2104 ( fprintf (FILE, "\t%s\t ", CHAR_ASM_OP), \
2105 output_addr_const (FILE, (VALUE)), \
2106 fprintf (FILE, "\n"))
2108 /* This is how to output an assembler line for a numeric constant byte. */
2109 #define ASM_OUTPUT_BYTE(FILE,VALUE) \
2110 fprintf (FILE, "\t%s\t 0x%x\n", CHAR_ASM_OP, (VALUE))
2112 /* The single-byte pseudo-op is the default. Override svr[34].h. */
2113 #undef ASM_BYTE_OP
2114 #define ASM_BYTE_OP "byte"
2115 #undef ASM_OUTPUT_ASCII
2116 #define ASM_OUTPUT_ASCII(FILE, P, SIZE) \
2117 output_ascii (FILE, ASCII_DATA_ASM_OP, 48, P, SIZE)
2119 /* Override svr4.h. Change to the readonly data section for a table of
2120 addresses. final_scan_insn changes back to the text section. */
2121 #undef ASM_OUTPUT_CASE_LABEL
2122 #define ASM_OUTPUT_CASE_LABEL(FILE, PREFIX, NUM, TABLE) \
2123 do { \
2124 if (! CASE_VECTOR_INSNS) \
2126 readonly_data_section (); \
2127 ASM_OUTPUT_ALIGN (FILE, 2); \
2129 ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM); \
2130 } while (0)
2132 /* Epilogue for case labels. This jump instruction is called by casesi
2133 to transfer to the appropriate branch instruction within the table.
2134 The label `@L<n>e' is coined to mark the end of the table. */
2135 #define ASM_OUTPUT_CASE_END(FILE, NUM, TABLE) \
2136 do { \
2137 if (CASE_VECTOR_INSNS) \
2139 char label[256]; \
2140 ASM_GENERATE_INTERNAL_LABEL (label, "L", NUM); \
2141 fprintf (FILE, "%se:\n", &label[1]); \
2142 if (! flag_delayed_branch) \
2143 fprintf (FILE, "\tlda\t %s,%s[%s]\n", reg_names[1], \
2144 reg_names[1], reg_names[m88k_case_index]); \
2145 fprintf (FILE, "\tjmp\t %s\n", reg_names[1]); \
2147 } while (0)
2149 /* This is how to output an element of a case-vector that is absolute. */
2150 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
2151 do { \
2152 char buffer[256]; \
2153 ASM_GENERATE_INTERNAL_LABEL (buffer, "L", VALUE); \
2154 fprintf (FILE, CASE_VECTOR_INSNS ? "\tbr\t %s\n" : "\tword\t %s\n", \
2155 &buffer[1]); \
2156 } while (0)
2158 /* This is how to output an element of a case-vector that is relative. */
2159 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
2160 ASM_OUTPUT_ADDR_VEC_ELT (FILE, VALUE)
2162 /* This is how to output an assembler line
2163 that says to advance the location counter
2164 to a multiple of 2**LOG bytes. */
2165 #define ASM_OUTPUT_ALIGN(FILE,LOG) \
2166 if ((LOG) != 0) \
2167 fprintf (FILE, "\t%s\t %d\n", ALIGN_ASM_OP, 1<<(LOG))
2169 /* On the m88100, align the text address to half a cache boundary when it
2170 can only be reached by jumping. Pack code tightly when compiling
2171 crtstuff.c. */
2172 #define LABEL_ALIGN_AFTER_BARRIER(LABEL) \
2173 (TARGET_88100 && !flag_inhibit_size_directive ? 3 : 2)
2175 /* Override svr[34].h. */
2176 #undef ASM_OUTPUT_SKIP
2177 #define ASM_OUTPUT_SKIP(FILE,SIZE) \
2178 fprintf (FILE, "\t%s\t %u\n", SKIP_ASM_OP, (SIZE))
2180 /* Override svr4.h. */
2181 #undef ASM_OUTPUT_EXTERNAL_LIBCALL
2183 /* This says how to output an assembler line to define a global common
2184 symbol. Size can be zero for the unusual case of a `struct { int : 0; }'.
2185 Override svr[34].h. */
2186 #undef ASM_OUTPUT_COMMON
2187 #undef ASM_OUTPUT_ALIGNED_COMMON
2188 #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \
2189 ( fprintf ((FILE), "\t%s\t ", \
2190 ((SIZE) ? (SIZE) : 1) <= m88k_gp_threshold ? SCOMM_ASM_OP : COMMON_ASM_OP), \
2191 assemble_name ((FILE), (NAME)), \
2192 fprintf ((FILE), ",%u\n", (SIZE) ? (SIZE) : 1))
2194 /* This says how to output an assembler line to define a local common
2195 symbol. Override svr[34].h. */
2196 #undef ASM_OUTPUT_LOCAL
2197 #undef ASM_OUTPUT_ALIGNED_LOCAL
2198 #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
2199 ( fprintf ((FILE), "\t%s\t ", \
2200 ((SIZE) ? (SIZE) : 1) <= m88k_gp_threshold ? SBSS_ASM_OP : BSS_ASM_OP), \
2201 assemble_name ((FILE), (NAME)), \
2202 fprintf ((FILE), ",%u,%d\n", (SIZE) ? (SIZE) : 1, (SIZE) <= 4 ? 4 : 8))
2204 /* Store in OUTPUT a string (made with alloca) containing
2205 an assembler-name for a local static variable named NAME.
2206 LABELNO is an integer which is different for each call. */
2207 #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO) \
2208 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10), \
2209 sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
2211 /* This is how to output an insn to push a register on the stack.
2212 It need not be very fast code. */
2213 #define ASM_OUTPUT_REG_PUSH(FILE,REGNO) \
2214 fprintf (FILE, "\tsubu\t %s,%s,%d\n\tst\t %s,%s,0\n", \
2215 reg_names[STACK_POINTER_REGNUM], \
2216 reg_names[STACK_POINTER_REGNUM], \
2217 (STACK_BOUNDARY / BITS_PER_UNIT), \
2218 reg_names[REGNO], \
2219 reg_names[STACK_POINTER_REGNUM])
2221 /* Length in instructions of the code output by ASM_OUTPUT_REG_PUSH. */
2222 #define REG_PUSH_LENGTH 2
2224 /* This is how to output an insn to pop a register from the stack. */
2225 #define ASM_OUTPUT_REG_POP(FILE,REGNO) \
2226 fprintf (FILE, "\tld\t %s,%s,0\n\taddu\t %s,%s,%d\n", \
2227 reg_names[REGNO], \
2228 reg_names[STACK_POINTER_REGNUM], \
2229 reg_names[STACK_POINTER_REGNUM], \
2230 reg_names[STACK_POINTER_REGNUM], \
2231 (STACK_BOUNDARY / BITS_PER_UNIT))
2233 /* Length in instructions of the code output by ASM_OUTPUT_REG_POP. */
2234 #define REG_POP_LENGTH 2
2236 /* Define the parentheses used to group arithmetic operations
2237 in assembler code. */
2238 #define ASM_OPEN_PAREN "("
2239 #define ASM_CLOSE_PAREN ")"
2241 /* Define results of standard character escape sequences. */
2242 #define TARGET_BELL 007
2243 #define TARGET_BS 010
2244 #define TARGET_TAB 011
2245 #define TARGET_NEWLINE 012
2246 #define TARGET_VT 013
2247 #define TARGET_FF 014
2248 #define TARGET_CR 015
2250 /* Macros to deal with OCS debug information */
2252 #define OCS_START_PREFIX "Ltb"
2253 #define OCS_END_PREFIX "Lte"
2255 #define PUT_OCS_FUNCTION_START(FILE) \
2256 { ASM_OUTPUT_INTERNAL_LABEL (FILE, OCS_START_PREFIX, m88k_function_number); }
2258 #define PUT_OCS_FUNCTION_END(FILE) \
2259 { ASM_OUTPUT_INTERNAL_LABEL (FILE, OCS_END_PREFIX, m88k_function_number); }
2261 /* Macros for debug information */
2262 #define DEBUGGER_AUTO_OFFSET(X) \
2263 (m88k_debugger_offset (X, 0) \
2264 + (TARGET_OCS_FRAME_POSITION ? 0 : m88k_stack_size - m88k_fp_offset))
2266 #define DEBUGGER_ARG_OFFSET(OFFSET, X) \
2267 (m88k_debugger_offset (X, OFFSET) \
2268 + (TARGET_OCS_FRAME_POSITION ? 0 : m88k_stack_size - m88k_fp_offset))
2270 /* Macros to deal with SDB debug information */
2271 #ifdef SDB_DEBUGGING_INFO
2273 /* Output structure tag names even when it causes a forward reference. */
2274 #define SDB_ALLOW_FORWARD_REFERENCES
2276 /* Print out extra debug information in the assembler file */
2277 #define PUT_SDB_SCL(a) \
2278 do { \
2279 register int s = (a); \
2280 register const char *scl; \
2281 switch (s) \
2283 case C_EFCN: scl = "end of function"; break; \
2284 case C_NULL: scl = "NULL storage class"; break; \
2285 case C_AUTO: scl = "automatic"; break; \
2286 case C_EXT: scl = "external"; break; \
2287 case C_STAT: scl = "static"; break; \
2288 case C_REG: scl = "register"; break; \
2289 case C_EXTDEF: scl = "external definition"; break; \
2290 case C_LABEL: scl = "label"; break; \
2291 case C_ULABEL: scl = "undefined label"; break; \
2292 case C_MOS: scl = "structure member"; break; \
2293 case C_ARG: scl = "argument"; break; \
2294 case C_STRTAG: scl = "structure tag"; break; \
2295 case C_MOU: scl = "union member"; break; \
2296 case C_UNTAG: scl = "union tag"; break; \
2297 case C_TPDEF: scl = "typedef"; break; \
2298 case C_USTATIC: scl = "uninitialized static"; break; \
2299 case C_ENTAG: scl = "enumeration tag"; break; \
2300 case C_MOE: scl = "member of enumeration"; break; \
2301 case C_REGPARM: scl = "register parameter"; break; \
2302 case C_FIELD: scl = "bit field"; break; \
2303 case C_BLOCK: scl = "block start/end"; break; \
2304 case C_FCN: scl = "function start/end"; break; \
2305 case C_EOS: scl = "end of structure"; break; \
2306 case C_FILE: scl = "filename"; break; \
2307 case C_LINE: scl = "line"; break; \
2308 case C_ALIAS: scl = "duplicated tag"; break; \
2309 case C_HIDDEN: scl = "hidden"; break; \
2310 default: scl = "unknown"; break; \
2313 fprintf(asm_out_file, "\tscl\t %d\t\t\t\t; %s\n", s, scl); \
2314 } while (0)
2316 #define PUT_SDB_TYPE(a) \
2317 do { \
2318 register int t = (a); \
2319 static char buffer[100]; \
2320 register char *p = buffer; \
2321 register const char *q; \
2322 register int typ = t; \
2323 register int i; \
2325 for (i = 0; i <= 5; i++) \
2327 switch ((typ >> ((i*N_TSHIFT) + N_BTSHFT)) & 03) \
2329 case DT_PTR: \
2330 strcpy (p, "ptr to "); \
2331 p += sizeof("ptr to"); \
2332 break; \
2334 case DT_ARY: \
2335 strcpy (p, "array of "); \
2336 p += sizeof("array of"); \
2337 break; \
2339 case DT_FCN: \
2340 strcpy (p, "func ret "); \
2341 p += sizeof("func ret"); \
2342 break; \
2346 switch (typ & N_BTMASK) \
2348 case T_NULL: q = "<no type>"; break; \
2349 case T_CHAR: q = "char"; break; \
2350 case T_SHORT: q = "short"; break; \
2351 case T_INT: q = "int"; break; \
2352 case T_LONG: q = "long"; break; \
2353 case T_FLOAT: q = "float"; break; \
2354 case T_DOUBLE: q = "double"; break; \
2355 case T_STRUCT: q = "struct"; break; \
2356 case T_UNION: q = "union"; break; \
2357 case T_ENUM: q = "enum"; break; \
2358 case T_MOE: q = "enum member"; break; \
2359 case T_UCHAR: q = "unsigned char"; break; \
2360 case T_USHORT: q = "unsigned short"; break; \
2361 case T_UINT: q = "unsigned int"; break; \
2362 case T_ULONG: q = "unsigned long"; break; \
2363 default: q = "void"; break; \
2366 strcpy (p, q); \
2367 fprintf(asm_out_file, "\ttype\t %d\t\t\t\t; %s\n", \
2368 t, buffer); \
2369 } while (0)
2371 #define PUT_SDB_INT_VAL(a) \
2372 fprintf (asm_out_file, "\tval\t %d\n", (a))
2374 #define PUT_SDB_VAL(a) \
2375 ( fprintf (asm_out_file, "\tval\t "), \
2376 output_addr_const (asm_out_file, (a)), \
2377 fputc ('\n', asm_out_file))
2379 #define PUT_SDB_DEF(a) \
2380 do { fprintf (asm_out_file, "\tsdef\t "); \
2381 ASM_OUTPUT_LABELREF (asm_out_file, a); \
2382 fputc ('\n', asm_out_file); \
2383 } while (0)
2385 #define PUT_SDB_PLAIN_DEF(a) \
2386 fprintf(asm_out_file,"\tsdef\t .%s\n", a)
2388 /* Simply and endef now. */
2389 #define PUT_SDB_ENDEF \
2390 fputs("\tendef\n\n", asm_out_file)
2392 #define PUT_SDB_SIZE(a) \
2393 fprintf (asm_out_file, "\tsize\t %d\n", (a))
2395 /* Max dimensions to store for debug information (limited by COFF). */
2396 #define SDB_MAX_DIM 6
2398 /* New method for dim operations. */
2399 #define PUT_SDB_START_DIM \
2400 fputs("\tdim\t ", asm_out_file)
2402 /* How to end the DIM sequence. */
2403 #define PUT_SDB_LAST_DIM(a) \
2404 fprintf(asm_out_file, "%d\n", a)
2406 #define PUT_SDB_TAG(a) \
2407 do { \
2408 fprintf (asm_out_file, "\ttag\t "); \
2409 ASM_OUTPUT_LABELREF (asm_out_file, a); \
2410 fputc ('\n', asm_out_file); \
2411 } while( 0 )
2413 #define PUT_SDB_BLOCK_OR_FUNCTION(NAME, SCL, LINE) \
2414 do { \
2415 fprintf (asm_out_file, "\n\tsdef\t %s\n\tval\t .\n", \
2416 NAME); \
2417 PUT_SDB_SCL( SCL ); \
2418 fprintf (asm_out_file, "\tline\t %d\n\tendef\n\n", \
2419 (LINE)); \
2420 } while (0)
2422 #define PUT_SDB_BLOCK_START(LINE) \
2423 PUT_SDB_BLOCK_OR_FUNCTION (".bb", C_BLOCK, (LINE))
2425 #define PUT_SDB_BLOCK_END(LINE) \
2426 PUT_SDB_BLOCK_OR_FUNCTION (".eb", C_BLOCK, (LINE))
2428 #define PUT_SDB_FUNCTION_START(LINE) \
2429 do { \
2430 fprintf (asm_out_file, "\tln\t 1\n"); \
2431 PUT_SDB_BLOCK_OR_FUNCTION (".bf", C_FCN, (LINE)); \
2432 } while (0)
2434 #define PUT_SDB_FUNCTION_END(LINE) \
2435 do { \
2436 PUT_SDB_BLOCK_OR_FUNCTION (".ef", C_FCN, (LINE)); \
2437 } while (0)
2439 #define PUT_SDB_EPILOGUE_END(NAME) \
2440 do { \
2441 text_section (); \
2442 fprintf (asm_out_file, "\n\tsdef\t "); \
2443 ASM_OUTPUT_LABELREF(asm_out_file, (NAME)); \
2444 fputc('\n', asm_out_file); \
2445 PUT_SDB_SCL( C_EFCN ); \
2446 fprintf (asm_out_file, "\tendef\n\n"); \
2447 } while (0)
2449 #define SDB_GENERATE_FAKE(BUFFER, NUMBER) \
2450 sprintf ((BUFFER), ".%dfake", (NUMBER));
2452 #endif /* SDB_DEBUGGING_INFO */
2454 /* Support const and tdesc sections. Generally, a const section will
2455 be distinct from the text section whenever we do V.4-like things
2456 and so follows DECLARE_ASM_NAME. Note that strings go in text
2457 rather than const. Override svr[34].h. */
2459 #undef USE_CONST_SECTION
2460 #undef EXTRA_SECTIONS
2462 #define USE_CONST_SECTION DECLARE_ASM_NAME
2464 #if defined(USING_SVR4_H)
2466 #define EXTRA_SECTIONS in_const, in_tdesc, in_sdata, in_ctors, in_dtors
2467 #define INIT_SECTION_FUNCTION
2468 #define FINI_SECTION_FUNCTION
2470 #else
2471 #if defined(USING_SVR3_H)
2473 #define EXTRA_SECTIONS in_const, in_tdesc, in_sdata, in_ctors, in_dtors, \
2474 in_init, in_fini
2476 #else /* luna or other not based on svr[34].h. */
2478 #undef INIT_SECTION_ASM_OP
2479 #define EXTRA_SECTIONS in_const, in_tdesc, in_sdata
2480 #define CONST_SECTION_FUNCTION \
2481 void \
2482 const_section () \
2484 text_section(); \
2486 #define CTORS_SECTION_FUNCTION
2487 #define DTORS_SECTION_FUNCTION
2488 #define INIT_SECTION_FUNCTION
2489 #define FINI_SECTION_FUNCTION
2491 #endif /* USING_SVR3_H */
2492 #endif /* USING_SVR4_H */
2494 #undef EXTRA_SECTION_FUNCTIONS
2495 #define EXTRA_SECTION_FUNCTIONS \
2496 CONST_SECTION_FUNCTION \
2498 void \
2499 tdesc_section () \
2501 if (in_section != in_tdesc) \
2503 fprintf (asm_out_file, "%s\n", TDESC_SECTION_ASM_OP); \
2504 in_section = in_tdesc; \
2508 void \
2509 sdata_section () \
2511 if (in_section != in_sdata) \
2513 fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP); \
2514 in_section = in_sdata; \
2518 CTORS_SECTION_FUNCTION \
2519 DTORS_SECTION_FUNCTION \
2520 INIT_SECTION_FUNCTION \
2521 FINI_SECTION_FUNCTION
2523 /* A C statement or statements to switch to the appropriate
2524 section for output of DECL. DECL is either a `VAR_DECL' node
2525 or a constant of some sort. RELOC indicates whether forming
2526 the initial value of DECL requires link-time relocations.
2528 For strings, the section is selected before the segment info is encoded. */
2529 #undef SELECT_SECTION
2530 #define SELECT_SECTION(DECL,RELOC) \
2532 if (TREE_CODE (DECL) == STRING_CST) \
2534 if (! flag_writable_strings) \
2535 const_section (); \
2536 else if ( TREE_STRING_LENGTH (DECL) <= m88k_gp_threshold) \
2537 sdata_section (); \
2538 else \
2539 data_section (); \
2541 else if (TREE_CODE (DECL) == VAR_DECL) \
2543 if (SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0))) \
2544 sdata_section (); \
2545 else if ((flag_pic && RELOC) \
2546 || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL) \
2547 || !DECL_INITIAL (DECL) \
2548 || (DECL_INITIAL (DECL) != error_mark_node \
2549 && !TREE_CONSTANT (DECL_INITIAL (DECL)))) \
2550 data_section (); \
2551 else \
2552 const_section (); \
2554 else \
2555 const_section (); \
2558 /* Jump tables consist of branch instructions and should be output in
2559 the text section. When we use a table of addresses, we explicitly
2560 change to the readonly data section. */
2561 #define JUMP_TABLES_IN_TEXT_SECTION 1
2563 /* Define this macro if references to a symbol must be treated differently
2564 depending on something about the variable or function named by the
2565 symbol (such as what section it is in).
2567 The macro definition, if any, is executed immediately after the rtl for
2568 DECL has been created and stored in `DECL_RTL (DECL)'. The value of the
2569 rtl will be a `mem' whose address is a `symbol_ref'.
2571 For the m88k, determine if the item should go in the global pool. */
2572 #define ENCODE_SECTION_INFO(DECL) \
2573 do { \
2574 if (m88k_gp_threshold > 0) \
2576 if (TREE_CODE (DECL) == VAR_DECL) \
2578 if (!TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL)) \
2580 int size = int_size_in_bytes (TREE_TYPE (DECL)); \
2582 if (size > 0 && size <= m88k_gp_threshold) \
2583 SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; \
2586 else if (TREE_CODE (DECL) == STRING_CST \
2587 && flag_writable_strings \
2588 && TREE_STRING_LENGTH (DECL) <= m88k_gp_threshold) \
2589 SYMBOL_REF_FLAG (XEXP (TREE_CST_RTL (DECL), 0)) = 1; \
2591 } while (0)
2593 /* Print operand X (an rtx) in assembler syntax to file FILE.
2594 CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
2595 For `%' followed by punctuation, CODE is the punctuation and X is null. */
2596 #define PRINT_OPERAND_PUNCT_VALID_P(c) \
2597 ((c) == '#' || (c) == '.' || (c) == '!' || (c) == '*' || (c) == ';')
2599 #define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE)
2601 /* Print a memory address as an operand to reference that memory location. */
2602 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)
2604 /* This says not to strength reduce the addr calculations within loops
2605 (otherwise it does not take advantage of m88k scaled loads and stores */
2607 #define DONT_REDUCE_ADDR