OSDN Git Service

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