OSDN Git Service

* real.c (ereal_to_decimal): Add digits parameter.
[pf3gnuchains/gcc-fork.git] / gcc / config / m68k / m68k.h
1 /* Definitions of target machine for GNU compiler.
2    Sun 68000/68020 version.
3    Copyright (C) 1987, 1988, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4    2000, 2001, 2002 Free Software Foundation, Inc.
5
6 This file is part of GNU CC.
7
8 GNU CC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
12
13 GNU CC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GNU CC; see the file COPYING.  If not, write to
20 the Free Software Foundation, 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA.  */
22
23
24 /* Note that some other tm.h files include this one and then override
25    many of the definitions that relate to assembler syntax.  */
26
27
28 /* Classify the groups of pseudo-ops used to assemble QI, HI and SI
29    quantities.  */
30 #define INT_OP_STANDARD 0       /* .byte, .short, .long */
31 #define INT_OP_DOT_WORD 1       /* .byte, .word, .long */
32 #define INT_OP_NO_DOT   2       /* byte, short, long */
33 #define INT_OP_DC       3       /* dc.b, dc.w, dc.l */
34
35 /* Set the default */
36 #define INT_OP_GROUP INT_OP_DOT_WORD
37
38 /* Names to predefine in the preprocessor for this target machine.  */
39
40 /* See sun3.h, sun2.h, isi.h for different CPP_PREDEFINES.  */
41
42 /* Print subsidiary information on the compiler version in use.  */
43 #ifdef MOTOROLA
44 #define TARGET_VERSION fprintf (stderr, " (68k, Motorola syntax)");
45 #else
46 #define TARGET_VERSION fprintf (stderr, " (68k, MIT syntax)");
47 #endif
48
49 /* Define SUPPORT_SUN_FPA to include support for generating code for
50    the Sun Floating Point Accelerator, an optional product for Sun 3
51    machines.  By default, it is not defined.  Avoid defining it unless
52    you need to output code for the Sun3+FPA architecture, as it has the
53    effect of slowing down the register set operations in hard-reg-set.h
54    (total number of registers will exceed number of bits in a long,
55    if defined, causing the set operations to expand to loops).
56    SUPPORT_SUN_FPA is typically defined in sun3.h.  */
57
58 /* Run-time compilation parameters selecting different hardware subsets.  */
59
60 extern int target_flags;
61
62 /* Macros used in the machine description to test the flags.  */
63
64 /* Compile for a 68020 (not a 68000 or 68010).  */
65 #define MASK_68020      1
66 #define TARGET_68020 (target_flags & MASK_68020)
67
68 /* Compile 68881 insns for floating point (not library calls).  */
69 #define MASK_68881      2
70 #define TARGET_68881 (target_flags & MASK_68881)
71
72 /* Compile using 68020 bitfield insns.  */
73 #define MASK_BITFIELD   4
74 #define TARGET_BITFIELD (target_flags & MASK_BITFIELD)
75
76 /* Compile using rtd insn calling sequence.
77    This will not work unless you use prototypes at least
78    for all functions that can take varying numbers of args.  */
79 #define MASK_RTD        8
80 #define TARGET_RTD (target_flags & MASK_RTD)
81
82 /* Compile passing first two args in regs 0 and 1.
83    This exists only to test compiler features that will
84    be needed for RISC chips.  It is not usable
85    and is not intended to be usable on this cpu.  */
86 #define MASK_REGPARM    16
87 #define TARGET_REGPARM (target_flags & MASK_REGPARM)
88
89 /* Compile with 16-bit `int'.  */
90 #define MASK_SHORT      32
91 #define TARGET_SHORT (target_flags & MASK_SHORT)
92
93 /* Compile with special insns for Sun FPA.  */
94 #define MASK_FPA        64
95 #define TARGET_FPA (target_flags & MASK_FPA)
96
97 /* Compile (actually, link) for Sun SKY board.  */
98 #define MASK_SKY        128
99 #define TARGET_SKY (target_flags & MASK_SKY)
100
101 /* Optimize for 68040, but still allow execution on 68020
102    (-m68020-40 or -m68040).
103    The 68040 will execute all 68030 and 68881/2 instructions, but some
104    of them must be emulated in software by the OS.  When TARGET_68040 is
105    turned on, these instructions won't be used.  This code will still
106    run on a 68030 and 68881/2.  */
107 #define MASK_68040      256
108 #define TARGET_68040 (target_flags & MASK_68040)
109
110 /* Use the 68040-only fp instructions (-m68040 or -m68060).  */
111 #define MASK_68040_ONLY 512
112 #define TARGET_68040_ONLY (target_flags & MASK_68040_ONLY)
113
114 /* Optimize for 68060, but still allow execution on 68020
115    (-m68020-60 or -m68060).
116    The 68060 will execute all 68030 and 68881/2 instructions, but some
117    of them must be emulated in software by the OS.  When TARGET_68060 is
118    turned on, these instructions won't be used.  This code will still
119    run on a 68030 and 68881/2.  */
120 #define MASK_68060      1024
121 #define TARGET_68060 (target_flags & MASK_68060)
122
123 /* Compile for mcf5200 */
124 #define MASK_5200       2048
125 #define TARGET_5200 (target_flags & MASK_5200)
126
127 /* Align ints to a word boundary.  This breaks compatibility with the 
128    published ABI's for structures containing ints, but produces faster
129    code on cpus with 32 bit busses (020, 030, 040, 060, CPU32+, coldfire).
130    It's required for coldfire cpus without a misalignment module.  */
131 #define MASK_ALIGN_INT  4096
132 #define TARGET_ALIGN_INT (target_flags & MASK_ALIGN_INT)
133
134 /* Compile for a CPU32 */
135         /* A 68020 without bitfields is a good heuristic for a CPU32 */
136 #define TARGET_CPU32    (TARGET_68020 && !TARGET_BITFIELD)
137
138 /* Use PC-relative addressing modes (without using a global offset table).
139    The m68000 supports 16-bit PC-relative addressing.
140    The m68020 supports 32-bit PC-relative addressing
141    (using outer displacements).
142
143    Under this model, all SYMBOL_REFs (and CONSTs) and LABEL_REFs are
144    treated as all containing an implicit PC-relative component, and hence
145    cannot be used directly as addresses for memory writes.  See the comments
146    in m68k.c for more information.  */
147 #define MASK_PCREL      8192
148 #define TARGET_PCREL    (target_flags & MASK_PCREL)
149
150 /* Relax strict alignment.  */
151 #define MASK_NO_STRICT_ALIGNMENT 16384
152 #define TARGET_STRICT_ALIGNMENT  (~target_flags & MASK_NO_STRICT_ALIGNMENT)
153
154 /* Macro to define tables used to set the flags.
155    This is a list in braces of pairs in braces,
156    each pair being { "NAME", VALUE }
157    where VALUE is the bits to set or minus the bits to clear.
158    An empty string NAME is used to identify the default VALUE.  */
159
160 #define TARGET_SWITCHES                                                 \
161   { { "68020", - (MASK_5200|MASK_68060|MASK_68040|MASK_68040_ONLY),     \
162       N_("Generate code for a 68020") },                                \
163     { "c68020", - (MASK_5200|MASK_68060|MASK_68040|MASK_68040_ONLY),    \
164       N_("Generate code for a 68020") },                                \
165     { "68020", (MASK_68020|MASK_BITFIELD), "" },                        \
166     { "c68020", (MASK_68020|MASK_BITFIELD), "" },                       \
167     { "68000", - (MASK_5200|MASK_68060|MASK_68040|MASK_68040_ONLY       \
168                 |MASK_68020|MASK_BITFIELD|MASK_68881),                  \
169       N_("Generate code for a 68000") },                                \
170     { "c68000", - (MASK_5200|MASK_68060|MASK_68040|MASK_68040_ONLY      \
171                 |MASK_68020|MASK_BITFIELD|MASK_68881),                  \
172       N_("Generate code for a 68000") },                                \
173     { "bitfield", MASK_BITFIELD,                                        \
174       N_("Use the bit-field instructions") },                           \
175     { "nobitfield", - MASK_BITFIELD,                                    \
176       N_("Do not use the bit-field instructions") },                    \
177     { "rtd", MASK_RTD,                                                  \
178       N_("Use different calling convention using 'rtd'") },             \
179     { "nortd", - MASK_RTD,                                              \
180       N_("Use normal calling convention") },                            \
181     { "short", MASK_SHORT,                                              \
182       N_("Consider type `int' to be 16 bits wide") },                   \
183     { "noshort", - MASK_SHORT,                                          \
184       N_("Consider type `int' to be 32 bits wide") },                   \
185     { "fpa", -(MASK_SKY|MASK_68040_ONLY|MASK_68881),                    \
186       N_("Generate code for a Sun FPA") },                              \
187     { "fpa", MASK_FPA, "" },                                            \
188     { "nofpa", - MASK_FPA,                                              \
189       N_("Do not generate code for a Sun FPA") },                       \
190     { "sky", -(MASK_FPA|MASK_68040_ONLY|MASK_68881),                    \
191       N_("Generate code for a Sun Sky board") },                        \
192     { "sky", MASK_SKY,                                                  \
193       N_("Generate code for a Sun Sky board") },                        \
194     { "nosky", - MASK_SKY,                                              \
195       N_("Do not use Sky linkage convention") },                        \
196     { "68881", - (MASK_FPA|MASK_SKY),                                   \
197       N_("Generate code for a 68881") },                                \
198     { "68881", MASK_68881, "" },                                        \
199     { "soft-float", - (MASK_FPA|MASK_SKY|MASK_68040_ONLY|MASK_68881),   \
200       N_("Generate code with library calls for floating point") },      \
201     { "68020-40", -(MASK_5200|MASK_68060|MASK_68040_ONLY),              \
202       N_("Generate code for a 68040, without any new instructions") },  \
203     { "68020-40", (MASK_BITFIELD|MASK_68881|MASK_68020|MASK_68040), ""},\
204     { "68020-60", -(MASK_5200|MASK_68040_ONLY),                         \
205       N_("Generate code for a 68060, without any new instructions") },  \
206     { "68020-60", (MASK_BITFIELD|MASK_68881|MASK_68020|MASK_68040       \
207                    |MASK_68060), "" },                                  \
208     { "68030", - (MASK_5200|MASK_68060|MASK_68040|MASK_68040_ONLY),     \
209       N_("Generate code for a 68030") },                                \
210     { "68030", (MASK_68020|MASK_BITFIELD), "" },                        \
211     { "68040", - (MASK_5200|MASK_68060),                                \
212       N_("Generate code for a 68040") },                                \
213     { "68040", (MASK_68020|MASK_68881|MASK_BITFIELD                     \
214                 |MASK_68040_ONLY|MASK_68040), "" },                     \
215     { "68060", - (MASK_5200|MASK_68040),                                \
216       N_("Generate code for a 68060") },                                \
217     { "68060", (MASK_68020|MASK_68881|MASK_BITFIELD                     \
218                 |MASK_68040_ONLY|MASK_68060), "" },                     \
219     { "5200", - (MASK_68060|MASK_68040|MASK_68040_ONLY|MASK_68020       \
220                 |MASK_BITFIELD|MASK_68881),                             \
221       N_("Generate code for a 520X") },                                 \
222     { "5200", (MASK_5200), "" },                                        \
223     { "68851", 0,                                                       \
224       N_("Generate code for a 68851") },                                \
225     { "no-68851", 0,                                                    \
226       N_("Do no generate code for a 68851") },                          \
227     { "68302", - (MASK_5200|MASK_68060|MASK_68040|MASK_68040_ONLY       \
228                   |MASK_68020|MASK_BITFIELD|MASK_68881),                \
229       N_("Generate code for a 68302") },                                \
230     { "68332", - (MASK_5200|MASK_68060|MASK_68040|MASK_68040_ONLY       \
231                   |MASK_BITFIELD|MASK_68881),                           \
232       N_("Generate code for a 68332") },                                \
233     { "68332", MASK_68020, "" },                                        \
234     { "cpu32", - (MASK_5200|MASK_68060|MASK_68040|MASK_68040_ONLY       \
235                   |MASK_BITFIELD|MASK_68881),                           \
236       N_("Generate code for a cpu32") },                                \
237     { "cpu32", MASK_68020, "" },                                        \
238     { "align-int", MASK_ALIGN_INT,                                      \
239       N_("Align variables on a 32-bit boundary") },                     \
240     { "no-align-int", -MASK_ALIGN_INT,                                  \
241       N_("Align variables on a 16-bit boundary") },                     \
242     { "pcrel", MASK_PCREL,                                              \
243       N_("Generate pc-relative code") },                                \
244     { "strict-align", -MASK_NO_STRICT_ALIGNMENT,                        \
245       N_("Do not use unaligned memory references") },                   \
246     { "no-strict-align", MASK_NO_STRICT_ALIGNMENT,                      \
247       N_("Use unaligned memory references") },                          \
248     SUBTARGET_SWITCHES                                                  \
249     { "", TARGET_DEFAULT, "" }}
250 /* TARGET_DEFAULT is defined in sun*.h and isi.h, etc.  */
251
252 /* This macro is similar to `TARGET_SWITCHES' but defines names of
253    command options that have values.  Its definition is an
254    initializer with a subgrouping for each command option.
255
256    Each subgrouping contains a string constant, that defines the
257    fixed part of the option name, and the address of a variable.  The
258    variable, type `char *', is set to the variable part of the given
259    option if the fixed part matches.  The actual option name is made
260    by appending `-m' to the specified name.  */
261 #define TARGET_OPTIONS                                                  \
262 { { "align-loops=",     &m68k_align_loops_string,                       \
263     N_("Loop code aligned to this power of 2") },                       \
264   { "align-jumps=",     &m68k_align_jumps_string,                       \
265     N_("Jump targets are aligned to this power of 2") },                \
266   { "align-functions=", &m68k_align_funcs_string,                       \
267     N_("Function starts are aligned to this power of 2") },             \
268   SUBTARGET_OPTIONS                                                     \
269 }
270
271 /* Sometimes certain combinations of command options do not make
272    sense on a particular target machine.  You can define a macro
273    `OVERRIDE_OPTIONS' to take account of this.  This macro, if
274    defined, is executed once just after all the command options have
275    been parsed.
276
277    Don't use this macro to turn on various extra optimizations for
278    `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
279
280 #define OVERRIDE_OPTIONS                \
281 {                                       \
282   override_options();                   \
283   if (! TARGET_68020 && flag_pic == 2)  \
284     error("-fPIC is not currently supported on the 68000 or 68010\n");  \
285   if (TARGET_PCREL && flag_pic == 0)    \
286     flag_pic = 1;                       \
287   SUBTARGET_OVERRIDE_OPTIONS;           \
288 }
289
290 /* These are meant to be redefined in the host dependent files */
291 #define SUBTARGET_SWITCHES
292 #define SUBTARGET_OPTIONS
293 #define SUBTARGET_OVERRIDE_OPTIONS
294 \f
295 /* target machine storage layout */
296
297 /* Define for XFmode extended real floating point support.  */
298 #define LONG_DOUBLE_TYPE_SIZE 96
299
300 /* Set the value of FLT_EVAL_METHOD in float.h.  When using 68040 fp
301    instructions, we get proper intermediate rounding, otherwise we 
302    get extended precision results.  */
303 #define TARGET_FLT_EVAL_METHOD (TARGET_68040_ONLY ? 0 : 2)
304
305 /* Define this if most significant bit is lowest numbered
306    in instructions that operate on numbered bit-fields.
307    This is true for 68020 insns such as bfins and bfexts.
308    We make it true always by avoiding using the single-bit insns
309    except in special cases with constant bit numbers.  */
310 #define BITS_BIG_ENDIAN 1
311
312 /* Define this if most significant byte of a word is the lowest numbered.  */
313 /* That is true on the 68000.  */
314 #define BYTES_BIG_ENDIAN 1
315
316 /* Define this if most significant word of a multiword number is the lowest
317    numbered.  */
318 /* For 68000 we can decide arbitrarily
319    since there are no machine instructions for them.
320    So let's be consistent.  */
321 #define WORDS_BIG_ENDIAN 1
322
323 /* Width of a word, in units (bytes).  */
324 #define UNITS_PER_WORD 4
325
326 /* Allocation boundary (in *bits*) for storing arguments in argument list.  */
327 #define PARM_BOUNDARY (TARGET_SHORT ? 16 : 32)
328
329 /* Boundary (in *bits*) on which stack pointer should be aligned.  */
330 #define STACK_BOUNDARY 16
331
332 /* Allocation boundary (in *bits*) for the code of a function.  */
333 #define FUNCTION_BOUNDARY (1 << (m68k_align_funcs + 3))
334
335 /* Alignment of field after `int : 0' in a structure.  */
336 #define EMPTY_FIELD_BOUNDARY 16
337
338 /* No data type wants to be aligned rounder than this. 
339    Most published ABIs say that ints should be aligned on 16 bit
340    boundaries, but cpus with 32 bit busses get better performance
341    aligned on 32 bit boundaries.  Coldfires without a misalignment
342    module require 32 bit alignment.  */
343 #define BIGGEST_ALIGNMENT (TARGET_ALIGN_INT ? 32 : 16)
344
345 /* Set this nonzero if move instructions will actually fail to work
346    when given unaligned data.  */
347 #define STRICT_ALIGNMENT (TARGET_STRICT_ALIGNMENT)
348
349 /* Maximum power of 2 that code can be aligned to.  */
350 #define MAX_CODE_ALIGN  2                       /* 4 byte alignment */
351
352 /* Align loop starts for optimal branching.  */
353 #define LOOP_ALIGN(LABEL) (m68k_align_loops)
354
355 /* This is how to align an instruction for optimal branching.  */
356 #define LABEL_ALIGN_AFTER_BARRIER(LABEL) (m68k_align_jumps)
357
358 /* Define number of bits in most basic integer type.
359    (If undefined, default is BITS_PER_WORD).  */
360
361 #define INT_TYPE_SIZE (TARGET_SHORT ? 16 : 32)
362
363 /* Define these to avoid dependence on meaning of `int'.  */
364  
365 #define WCHAR_TYPE "long int"
366 #define WCHAR_TYPE_SIZE 32
367 \f
368 /* Standard register usage.  */
369
370 /* Number of actual hardware registers.
371    The hardware registers are assigned numbers for the compiler
372    from 0 to just below FIRST_PSEUDO_REGISTER.
373    All registers that the compiler knows about must be given numbers,
374    even those that are not normally considered general registers.
375    For the 68000, we give the data registers numbers 0-7,
376    the address registers numbers 010-017,
377    and the 68881 floating point registers numbers 020-027.  */
378 #ifndef SUPPORT_SUN_FPA
379 #define FIRST_PSEUDO_REGISTER 24
380 #else
381 #define FIRST_PSEUDO_REGISTER 56
382 #endif
383
384 /* This defines the register which is used to hold the offset table for PIC.  */
385 #define PIC_OFFSET_TABLE_REGNUM (flag_pic ? 13 : INVALID_REGNUM)
386
387 #ifndef SUPPORT_SUN_FPA
388
389 /* 1 for registers that have pervasive standard uses
390    and are not available for the register allocator.
391    On the 68000, only the stack pointer is such.  */
392
393 #define FIXED_REGISTERS        \
394  {/* Data registers.  */       \
395   0, 0, 0, 0, 0, 0, 0, 0,      \
396                                \
397   /* Address registers.  */    \
398   0, 0, 0, 0, 0, 0, 0, 1,      \
399                                \
400   /* Floating point registers  \
401      (if available).  */       \
402   0, 0, 0, 0, 0, 0, 0, 0 }
403
404 /* 1 for registers not available across function calls.
405    These must include the FIXED_REGISTERS and also any
406    registers that can be used without being saved.
407    The latter must include the registers where values are returned
408    and the register where structure-value addresses are passed.
409    Aside from that, you can include as many other registers as you like.  */
410 #define CALL_USED_REGISTERS \
411  {1, 1, 0, 0, 0, 0, 0, 0,   \
412   1, 1, 0, 0, 0, 0, 0, 1,   \
413   1, 1, 0, 0, 0, 0, 0, 0 }
414
415 #else /* SUPPORT_SUN_FPA */
416
417 /* 1 for registers that have pervasive standard uses
418    and are not available for the register allocator.
419    On the 68000, only the stack pointer is such.  */
420
421 /* fpa0 is also reserved so that it can be used to move data back and
422    forth between high fpa regs and everything else.  */
423
424 #define FIXED_REGISTERS        \
425  {/* Data registers.  */       \
426   0, 0, 0, 0, 0, 0, 0, 0,      \
427                                \
428   /* Address registers.  */    \
429   0, 0, 0, 0, 0, 0, 0, 1,      \
430                                \
431   /* Floating point registers  \
432      (if available).  */       \
433   0, 0, 0, 0, 0, 0, 0, 0,      \
434                                \
435   /* Sun3 FPA registers.  */   \
436   1, 0, 0, 0, 0, 0, 0, 0,      \
437   0, 0, 0, 0, 0, 0, 0, 0,      \
438   0, 0, 0, 0, 0, 0, 0, 0,      \
439   0, 0, 0, 0, 0, 0, 0, 0 }
440
441 /* 1 for registers not available across function calls.
442    These must include the FIXED_REGISTERS and also any
443    registers that can be used without being saved.
444    The latter must include the registers where values are returned
445    and the register where structure-value addresses are passed.
446    Aside from that, you can include as many other registers as you like.  */
447 #define CALL_USED_REGISTERS \
448  {1, 1, 0, 0, 0, 0, 0, 0, \
449   1, 1, 0, 0, 0, 0, 0, 1, \
450   1, 1, 0, 0, 0, 0, 0, 0, \
451   /* FPA registers.  */   \
452   1, 1, 1, 1, 0, 0, 0, 0, \
453   0, 0, 0, 0, 0, 0, 0, 0, \
454   0, 0, 0, 0, 0, 0, 0, 0, \
455   0, 0, 0, 0, 0, 0, 0, 0  }
456
457 #endif /* defined SUPPORT_SUN_FPA */
458
459
460 /* Make sure everything's fine if we *don't* have a given processor.
461    This assumes that putting a register in fixed_regs will keep the
462    compiler's mitts completely off it.  We don't bother to zero it out
463    of register classes.  */
464
465 #ifdef SUPPORT_SUN_FPA
466
467 #define CONDITIONAL_REGISTER_USAGE                              \
468 {                                                               \
469   int i;                                                        \
470   HARD_REG_SET x;                                               \
471   if (! TARGET_FPA)                                             \
472     {                                                           \
473       COPY_HARD_REG_SET (x, reg_class_contents[(int)FPA_REGS]); \
474       for (i = 0; i < FIRST_PSEUDO_REGISTER; i++ )              \
475        if (TEST_HARD_REG_BIT (x, i))                            \
476         fixed_regs[i] = call_used_regs[i] = 1;                  \
477     }                                                           \
478   if (! TARGET_68881)                                           \
479     {                                                           \
480       COPY_HARD_REG_SET (x, reg_class_contents[(int)FP_REGS]);  \
481       for (i = 0; i < FIRST_PSEUDO_REGISTER; i++ )              \
482        if (TEST_HARD_REG_BIT (x, i))                            \
483         fixed_regs[i] = call_used_regs[i] = 1;                  \
484     }                                                           \
485   if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM)                \
486     fixed_regs[PIC_OFFSET_TABLE_REGNUM]                         \
487       = call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;            \
488 }
489 #else
490 #define CONDITIONAL_REGISTER_USAGE                              \
491 {                                                               \
492   int i;                                                        \
493   HARD_REG_SET x;                                               \
494   if (! TARGET_68881)                                           \
495     {                                                           \
496       COPY_HARD_REG_SET (x, reg_class_contents[(int)FP_REGS]);  \
497       for (i = 0; i < FIRST_PSEUDO_REGISTER; i++ )              \
498        if (TEST_HARD_REG_BIT (x, i))                            \
499         fixed_regs[i] = call_used_regs[i] = 1;                  \
500     }                                                           \
501   if (PIC_OFFSET_TABLE_REGNUM != INVALID_REGNUM)                \
502     fixed_regs[PIC_OFFSET_TABLE_REGNUM]                         \
503       = call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;            \
504 }
505
506 #endif /* defined SUPPORT_SUN_FPA */
507
508 /* Return number of consecutive hard regs needed starting at reg REGNO
509    to hold something of mode MODE.
510    This is ordinarily the length in words of a value of mode MODE
511    but can be less for certain modes in special long registers.
512
513    On the 68000, ordinary registers hold 32 bits worth;
514    for the 68881 registers, a single register is always enough for
515    anything that can be stored in them at all.  */
516 #define HARD_REGNO_NREGS(REGNO, MODE)   \
517   ((REGNO) >= 16 ? GET_MODE_NUNITS (MODE)       \
518    : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
519
520 #ifndef SUPPORT_SUN_FPA
521
522 /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
523    On the 68000, the cpu registers can hold any mode but the 68881 registers
524    can hold only SFmode or DFmode.  */
525
526 #define HARD_REGNO_MODE_OK(REGNO, MODE) \
527   (((REGNO) < 16                                        \
528     && !((REGNO) < 8 && (REGNO) + GET_MODE_SIZE (MODE) / 4 > 8))        \
529    || ((REGNO) >= 16 && (REGNO) < 24                                    \
530        && (GET_MODE_CLASS (MODE) == MODE_FLOAT          \
531            || GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT)              \
532        && GET_MODE_UNIT_SIZE (MODE) <= 12))
533
534 #else /* defined SUPPORT_SUN_FPA */
535
536 /* Value is 1 if hard register REGNO can hold a value of machine-mode MODE.
537    On the 68000, the cpu registers can hold any mode but the 68881 registers
538    can hold only SFmode or DFmode.  However, the Sun FPA register can
539    (apparently) hold whatever you feel like putting in them.
540    If using the fpa, don't put a double in d7/a0.  */
541
542 /* ??? This is confused.  The check to prohibit d7/a0 overlaps should always
543    be enabled regardless of whether TARGET_FPA is specified.  It isn't clear
544    what the other d/a register checks are for.  Every check using REGNO
545    actually needs to use a range, e.g. 24>=X<56 not <56.  There is probably
546    no one using this code anymore.  
547    This code used to be used to suppress register usage for the 68881 by
548    saying that the 68881 registers couldn't hold values of any mode if there
549    was no 68881.  This was wrong, because reload (etc.) will still try
550    to save and restore call-saved registers during, for instance, non-local
551    goto.  */
552 #define HARD_REGNO_MODE_OK(REGNO, MODE) \
553 (((REGNO) < 16                                                          \
554   && !(TARGET_FPA                                                       \
555        && GET_MODE_CLASS ((MODE)) != MODE_INT                           \
556        && GET_MODE_UNIT_SIZE ((MODE)) > 4                               \
557        && (REGNO) < 8 && (REGNO) + GET_MODE_SIZE ((MODE)) / 4 > 8       \
558        && (REGNO) % (GET_MODE_UNIT_SIZE ((MODE)) / 4) != 0))            \
559  || ((REGNO) >= 16 && (REGNO) < 24                                      \
560      ? ((GET_MODE_CLASS (MODE) == MODE_FLOAT                            \
561          || GET_MODE_CLASS (MODE) == MODE_COMPLEX_FLOAT)                \
562         && GET_MODE_UNIT_SIZE (MODE) <= 12)                             \
563      : ((REGNO) < 56 ? TARGET_FPA && GET_MODE_UNIT_SIZE (MODE) <= 8 : 0)))
564
565 #endif /* defined SUPPORT_SUN_FPA */
566
567 /* Value is 1 if it is a good idea to tie two pseudo registers
568    when one has mode MODE1 and one has mode MODE2.
569    If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
570    for any hard reg, then this must be 0 for correct output.  */
571 #define MODES_TIEABLE_P(MODE1, MODE2)                   \
572   (! TARGET_68881                                       \
573    || ((GET_MODE_CLASS (MODE1) == MODE_FLOAT            \
574         || GET_MODE_CLASS (MODE1) == MODE_COMPLEX_FLOAT)        \
575        == (GET_MODE_CLASS (MODE2) == MODE_FLOAT         \
576            || GET_MODE_CLASS (MODE2) == MODE_COMPLEX_FLOAT)))
577
578 /* Specify the registers used for certain standard purposes.
579    The values of these macros are register numbers.  */
580
581 /* m68000 pc isn't overloaded on a register.  */
582 /* #define PC_REGNUM  */
583
584 /* Register to use for pushing function arguments.  */
585 #define STACK_POINTER_REGNUM 15
586
587 /* Base register for access to local variables of the function.  */
588 #define FRAME_POINTER_REGNUM 14
589
590 /* Value should be nonzero if functions must have frame pointers.
591    Zero means the frame pointer need not be set up (and parms
592    may be accessed via the stack pointer) in functions that seem suitable.
593    This is computed in `reload', in reload1.c.  */
594 #define FRAME_POINTER_REQUIRED 0
595
596 /* Base register for access to arguments of the function.  */
597 #define ARG_POINTER_REGNUM 14
598
599 /* Register in which static-chain is passed to a function.  */
600 #define STATIC_CHAIN_REGNUM 8
601
602 /* Register in which address to store a structure value
603    is passed to a function.  */
604 #define STRUCT_VALUE_REGNUM 9
605 \f
606 /* Define the classes of registers for register constraints in the
607    machine description.  Also define ranges of constants.
608
609    One of the classes must always be named ALL_REGS and include all hard regs.
610    If there is more than one class, another class must be named NO_REGS
611    and contain no registers.
612
613    The name GENERAL_REGS must be the name of a class (or an alias for
614    another name such as ALL_REGS).  This is the class of registers
615    that is allowed by "g" or "r" in a register constraint.
616    Also, registers outside this class are allocated only when
617    instructions express preferences for them.
618
619    The classes must be numbered in nondecreasing order; that is,
620    a larger-numbered class must never be contained completely
621    in a smaller-numbered class.
622
623    For any two classes, it is very desirable that there be another
624    class that represents their union.  */
625
626 /* The 68000 has three kinds of registers, so eight classes would be
627    a complete set.  One of them is not needed.  */
628
629 #ifndef SUPPORT_SUN_FPA
630
631 enum reg_class {
632   NO_REGS, DATA_REGS,
633   ADDR_REGS, FP_REGS,
634   GENERAL_REGS, DATA_OR_FP_REGS,
635   ADDR_OR_FP_REGS, ALL_REGS,
636   LIM_REG_CLASSES };
637
638 #define N_REG_CLASSES (int) LIM_REG_CLASSES
639
640 /* Give names of register classes as strings for dump file.  */
641
642 #define REG_CLASS_NAMES \
643  { "NO_REGS", "DATA_REGS",              \
644    "ADDR_REGS", "FP_REGS",              \
645    "GENERAL_REGS", "DATA_OR_FP_REGS",   \
646    "ADDR_OR_FP_REGS", "ALL_REGS" }
647
648 /* Define which registers fit in which classes.
649    This is an initializer for a vector of HARD_REG_SET
650    of length N_REG_CLASSES.  */
651
652 #define REG_CLASS_CONTENTS \
653 {                                       \
654   {0x00000000},  /* NO_REGS */          \
655   {0x000000ff},  /* DATA_REGS */        \
656   {0x0000ff00},  /* ADDR_REGS */        \
657   {0x00ff0000},  /* FP_REGS */          \
658   {0x0000ffff},  /* GENERAL_REGS */     \
659   {0x00ff00ff},  /* DATA_OR_FP_REGS */  \
660   {0x00ffff00},  /* ADDR_OR_FP_REGS */  \
661   {0x00ffffff},  /* ALL_REGS */         \
662 }
663
664 /* The same information, inverted:
665    Return the class number of the smallest class containing
666    reg number REGNO.  This could be a conditional expression
667    or could index an array.  */
668
669 #define REGNO_REG_CLASS(REGNO) (((REGNO)>>3)+1)
670
671 #else /* defined SUPPORT_SUN_FPA */
672
673 /*
674  * Notes on final choices:
675  *
676  *   1) Didn't feel any need to union-ize LOW_FPA_REGS with anything
677  * else.
678  *   2) Removed all unions that involve address registers with
679  * floating point registers (left in unions of address and data with
680  * floating point).
681  *   3) Defined GENERAL_REGS as ADDR_OR_DATA_REGS.
682  *   4) Defined ALL_REGS as FPA_OR_FP_OR_GENERAL_REGS.
683  *   4) Left in everything else.
684  */
685 enum reg_class { NO_REGS, LO_FPA_REGS, FPA_REGS, FP_REGS,
686   FP_OR_FPA_REGS, DATA_REGS, DATA_OR_FPA_REGS, DATA_OR_FP_REGS,
687   DATA_OR_FP_OR_FPA_REGS, ADDR_REGS, GENERAL_REGS,
688   GENERAL_OR_FPA_REGS, GENERAL_OR_FP_REGS, ALL_REGS,
689   LIM_REG_CLASSES };
690
691 #define N_REG_CLASSES (int) LIM_REG_CLASSES
692
693 /* Give names of register classes as strings for dump file.  */
694
695 #define REG_CLASS_NAMES \
696  { "NO_REGS", "LO_FPA_REGS", "FPA_REGS", "FP_REGS",  \
697    "FP_OR_FPA_REGS", "DATA_REGS", "DATA_OR_FPA_REGS", "DATA_OR_FP_REGS",  \
698    "DATA_OR_FP_OR_FPA_REGS", "ADDR_REGS", "GENERAL_REGS",  \
699    "GENERAL_OR_FPA_REGS", "GENERAL_OR_FP_REGS", "ALL_REGS" }
700
701 /* Define which registers fit in which classes.
702    This is an initializer for a vector of HARD_REG_SET
703    of length N_REG_CLASSES.  */
704
705 #define REG_CLASS_CONTENTS \
706 {                                                       \
707  {0, 0},                        /* NO_REGS */           \
708  {0xff000000, 0x000000ff},      /* LO_FPA_REGS */       \
709  {0xff000000, 0x00ffffff},      /* FPA_REGS */          \
710  {0x00ff0000, 0x00000000},      /* FP_REGS */           \
711  {0xffff0000, 0x00ffffff},      /* FP_OR_FPA_REGS */    \
712  {0x000000ff, 0x00000000},      /* DATA_REGS */         \
713  {0xff0000ff, 0x00ffffff},      /* DATA_OR_FPA_REGS */  \
714  {0x00ff00ff, 0x00000000},      /* DATA_OR_FP_REGS */   \
715  {0xffff00ff, 0x00ffffff},      /* DATA_OR_FP_OR_FPA_REGS */\
716  {0x0000ff00, 0x00000000},      /* ADDR_REGS */         \
717  {0x0000ffff, 0x00000000},      /* GENERAL_REGS */      \
718  {0xff00ffff, 0x00ffffff},      /* GENERAL_OR_FPA_REGS */\
719  {0x00ffffff, 0x00000000},      /* GENERAL_OR_FP_REGS */\
720  {0xffffffff, 0x00ffffff},      /* ALL_REGS */          \
721 }
722
723 /* The same information, inverted:
724    Return the class number of the smallest class containing
725    reg number REGNO.  This could be a conditional expression
726    or could index an array.  */
727
728 extern const enum reg_class regno_reg_class[];
729 #define REGNO_REG_CLASS(REGNO) (regno_reg_class[(REGNO)>>3])
730
731 #endif /* SUPPORT_SUN_FPA */
732
733 /* The class value for index registers, and the one for base regs.  */
734
735 #define INDEX_REG_CLASS GENERAL_REGS
736 #define BASE_REG_CLASS ADDR_REGS
737
738 /* Get reg_class from a letter such as appears in the machine description.
739    We do a trick here to modify the effective constraints on the
740    machine description; we zorch the constraint letters that aren't
741    appropriate for a specific target.  This allows us to guarantee
742    that a specific kind of register will not be used for a given target
743    without fiddling with the register classes above.  */
744
745 #ifndef SUPPORT_SUN_FPA
746
747 #define REG_CLASS_FROM_LETTER(C) \
748   ((C) == 'a' ? ADDR_REGS :                     \
749    ((C) == 'd' ? DATA_REGS :                    \
750     ((C) == 'f' ? (TARGET_68881 ? FP_REGS :     \
751                    NO_REGS) :                   \
752      NO_REGS)))
753
754 #else /* defined SUPPORT_SUN_FPA */
755
756 #define REG_CLASS_FROM_LETTER(C) \
757   ((C) == 'a' ? ADDR_REGS :                     \
758    ((C) == 'd' ? DATA_REGS :                    \
759     ((C) == 'f' ? (TARGET_68881 ? FP_REGS :     \
760                    NO_REGS) :                   \
761      ((C) == 'x' ? (TARGET_FPA ? FPA_REGS :     \
762                     NO_REGS) :                  \
763       ((C) == 'y' ? (TARGET_FPA ? LO_FPA_REGS : \
764                      NO_REGS) :                 \
765        NO_REGS)))))
766
767 #endif /* defined SUPPORT_SUN_FPA */
768
769 /* The letters I, J, K, L and M in a register constraint string
770    can be used to stand for particular ranges of immediate operands.
771    This macro defines what the ranges are.
772    C is the letter, and VALUE is a constant value.
773    Return 1 if VALUE is in the range specified by C.
774
775    For the 68000, `I' is used for the range 1 to 8
776    allowed as immediate shift counts and in addq.
777    `J' is used for the range of signed numbers that fit in 16 bits.
778    `K' is for numbers that moveq can't handle.
779    `L' is for range -8 to -1, range of values that can be added with subq.
780    `M' is for numbers that moveq+notb can't handle.
781    'N' is for range 24 to 31, rotatert:SI 8 to 1 expressed as rotate.
782    'O' is for 16 (for rotate using swap).
783    'P' is for range 8 to 15, rotatert:HI 8 to 1 expressed as rotate.  */
784
785 #define CONST_OK_FOR_LETTER_P(VALUE, C) \
786   ((C) == 'I' ? (VALUE) > 0 && (VALUE) <= 8 : \
787    (C) == 'J' ? (VALUE) >= -0x8000 && (VALUE) <= 0x7FFF : \
788    (C) == 'K' ? (VALUE) < -0x80 || (VALUE) >= 0x80 : \
789    (C) == 'L' ? (VALUE) < 0 && (VALUE) >= -8 : \
790    (C) == 'M' ? (VALUE) < -0x100 || (VALUE) >= 0x100 : \
791    (C) == 'N' ? (VALUE) >= 24 && (VALUE) <= 31 : \
792    (C) == 'O' ? (VALUE) == 16 : \
793    (C) == 'P' ? (VALUE) >= 8 && (VALUE) <= 15 : 0)
794
795 /*
796  * A small bit of explanation:
797  * "G" defines all of the floating constants that are *NOT* 68881
798  * constants.  this is so 68881 constants get reloaded and the
799  * fpmovecr is used.  "H" defines *only* the class of constants that
800  * the fpa can use, because these can be gotten at in any fpa
801  * instruction and there is no need to force reloads.
802  */
803 #ifndef SUPPORT_SUN_FPA
804 #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)  \
805   ((C) == 'G' ? ! (TARGET_68881 && standard_68881_constant_p (VALUE)) : 0 )
806 #else /* defined SUPPORT_SUN_FPA */
807 #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)  \
808   ((C) == 'G' ? ! (TARGET_68881 && standard_68881_constant_p (VALUE)) : \
809    (C) == 'H' ? (TARGET_FPA && standard_sun_fpa_constant_p (VALUE)) : 0)
810 #endif /* defined SUPPORT_SUN_FPA */
811
812 /* A C expression that defines the optional machine-dependent constraint
813    letters that can be used to segregate specific types of operands,  
814    usually memory references, for the target machine.  It should return 1 if
815    VALUE corresponds to the operand type represented by the constraint letter
816    C.  If C is not defined as an extra constraint, the value returned should 
817    be 0 regardless of VALUE.  */
818
819 /* Letters in the range `Q' through `U' may be defined in a
820    machine-dependent fashion to stand for arbitrary operand types. 
821    The machine description macro `EXTRA_CONSTRAINT' is passed the
822    operand as its first argument and the constraint letter as its
823    second operand.
824
825    `Q' means address register indirect addressing mode.
826    `S' is for operands that satisfy 'm' when -mpcrel is in effect.
827    `T' is for operands that satisfy 's' when -mpcrel is not in effect.  */
828
829 #define EXTRA_CONSTRAINT(OP,CODE)                       \
830   (((CODE) == 'S')                                      \
831    ? (TARGET_PCREL                                      \
832       && GET_CODE (OP) == MEM                           \
833       && (GET_CODE (XEXP (OP, 0)) == SYMBOL_REF         \
834           || GET_CODE (XEXP (OP, 0)) == LABEL_REF       \
835           || GET_CODE (XEXP (OP, 0)) == CONST))         \
836    :                                                    \
837   (((CODE) == 'T')                                      \
838    ? ( !TARGET_PCREL                                    \
839       && (GET_CODE (OP) == SYMBOL_REF                   \
840           || GET_CODE (OP) == LABEL_REF                 \
841           || GET_CODE (OP) == CONST))                   \
842    :                                                    \
843   (((CODE) == 'Q')                                      \
844    ? (GET_CODE (OP) == MEM                              \
845       && GET_CODE (XEXP (OP, 0)) == REG)                \
846    :                                                    \
847    0)))
848
849 /* Given an rtx X being reloaded into a reg required to be
850    in class CLASS, return the class of reg to actually use.
851    In general this is just CLASS; but on some machines
852    in some cases it is preferable to use a more restrictive class.
853    On the 68000 series, use a data reg if possible when the
854    value is a constant in the range where moveq could be used
855    and we ensure that QImodes are reloaded into data regs.  */
856
857 #define PREFERRED_RELOAD_CLASS(X,CLASS)  \
858   ((GET_CODE (X) == CONST_INT                   \
859     && (unsigned) (INTVAL (X) + 0x80) < 0x100   \
860     && (CLASS) != ADDR_REGS)                    \
861    ? DATA_REGS                                  \
862    : (GET_MODE (X) == QImode && (CLASS) != ADDR_REGS) \
863    ? DATA_REGS                                  \
864    : (GET_CODE (X) == CONST_DOUBLE                                      \
865       && GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT)                   \
866    ? (TARGET_68881 && (CLASS == FP_REGS || CLASS == DATA_OR_FP_REGS)    \
867       ? FP_REGS : NO_REGS)                                              \
868    : (TARGET_PCREL                              \
869       && (GET_CODE (X) == SYMBOL_REF || GET_CODE (X) == CONST \
870           || GET_CODE (X) == LABEL_REF))        \
871    ? ADDR_REGS                                  \
872    : (CLASS))
873
874 /* Force QImode output reloads from subregs to be allocated to data regs,
875    since QImode stores from address regs are not supported.  We make the
876    assumption that if the class is not ADDR_REGS, then it must be a superset
877    of DATA_REGS.  */
878
879 #define LIMIT_RELOAD_CLASS(MODE, CLASS) \
880   (((MODE) == QImode && (CLASS) != ADDR_REGS)   \
881    ? DATA_REGS                                  \
882    : (CLASS))
883
884 /* Return the maximum number of consecutive registers
885    needed to represent mode MODE in a register of class CLASS.  */
886 /* On the 68000, this is the size of MODE in words,
887    except in the FP regs, where a single reg is always enough.  */
888 #ifndef SUPPORT_SUN_FPA
889
890 #define CLASS_MAX_NREGS(CLASS, MODE)    \
891  ((CLASS) == FP_REGS ? 1 \
892   : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
893
894 /* Moves between fp regs and other regs are two insns.  */
895 #define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)        \
896   (((CLASS1) == FP_REGS && (CLASS2) != FP_REGS)         \
897     || ((CLASS2) == FP_REGS && (CLASS1) != FP_REGS)     \
898     ? 4 : 2)
899
900 #else /* defined SUPPORT_SUN_FPA */
901
902 #define CLASS_MAX_NREGS(CLASS, MODE)    \
903  ((CLASS) == FP_REGS || (CLASS) == FPA_REGS || (CLASS) == LO_FPA_REGS ? 1 \
904   : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD))
905
906 /* Moves between fp regs and other regs are two insns.  */
907 /* Likewise for high fpa regs and other regs.  */
908 #define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2)        \
909   ((((CLASS1) == FP_REGS && (CLASS2) != FP_REGS)        \
910     || ((CLASS2) == FP_REGS && (CLASS1) != FP_REGS)     \
911     || ((CLASS1) == FPA_REGS && (CLASS2) != FPA_REGS)   \
912     || ((CLASS2) == FPA_REGS && (CLASS1) != FPA_REGS))  \
913    ? 4 : 2)
914
915 #endif /* define SUPPORT_SUN_FPA */
916 \f
917 /* Stack layout; function entry, exit and calling.  */
918
919 /* Define this if pushing a word on the stack
920    makes the stack pointer a smaller address.  */
921 #define STACK_GROWS_DOWNWARD
922
923 /* Nonzero if we need to generate stack-probe insns.
924    On most systems they are not needed.
925    When they are needed, define this as the stack offset to probe at.  */
926 #define NEED_PROBE 0
927
928 /* Define this if the nominal address of the stack frame
929    is at the high-address end of the local variables;
930    that is, each additional local variable allocated
931    goes at a more negative offset in the frame.  */
932 #define FRAME_GROWS_DOWNWARD
933
934 /* Offset within stack frame to start allocating local variables at.
935    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
936    first local allocated.  Otherwise, it is the offset to the BEGINNING
937    of the first local allocated.  */
938 #define STARTING_FRAME_OFFSET 0
939
940 /* If we generate an insn to push BYTES bytes,
941    this says how many the stack pointer really advances by.
942    On the 68000, sp@- in a byte insn really pushes a word.
943    On the 5200 (coldfire), sp@- in a byte insn pushes just a byte.  */
944 #define PUSH_ROUNDING(BYTES) (TARGET_5200 ? BYTES : ((BYTES) + 1) & ~1)
945
946 /* We want to avoid trying to push bytes.  */
947 #define MOVE_BY_PIECES_P(SIZE, ALIGN) \
948   (move_by_pieces_ninsns (SIZE, ALIGN) < MOVE_RATIO \
949     && (((SIZE) >=16 && (ALIGN) >= 16) || (TARGET_5200)))
950
951 /* Offset of first parameter from the argument pointer register value.  */
952 #define FIRST_PARM_OFFSET(FNDECL) 8
953
954 /* Value is the number of byte of arguments automatically
955    popped when returning from a subroutine call.
956    FUNDECL is the declaration node of the function (as a tree),
957    FUNTYPE is the data type of the function (as a tree),
958    or for a library call it is an identifier node for the subroutine name.
959    SIZE is the number of bytes of arguments passed on the stack.
960
961    On the 68000, the RTS insn cannot pop anything.
962    On the 68010, the RTD insn may be used to pop them if the number
963      of args is fixed, but if the number is variable then the caller
964      must pop them all.  RTD can't be used for library calls now
965      because the library is compiled with the Unix compiler.
966    Use of RTD is a selectable option, since it is incompatible with
967    standard Unix calling sequences.  If the option is not selected,
968    the caller must always pop the args.  */
969
970 #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE)   \
971   ((TARGET_RTD && (!(FUNDECL) || TREE_CODE (FUNDECL) != IDENTIFIER_NODE)        \
972     && (TYPE_ARG_TYPES (FUNTYPE) == 0                           \
973         || (TREE_VALUE (tree_last (TYPE_ARG_TYPES (FUNTYPE)))   \
974             == void_type_node)))                                \
975    ? (SIZE) : 0)
976
977 /* Define how to find the value returned by a function.
978    VALTYPE is the data type of the value (as a tree).
979    If the precise function being called is known, FUNC is its FUNCTION_DECL;
980    otherwise, FUNC is 0.  */
981
982 /* On the 68000 the return value is in D0 regardless.  */
983
984 #define FUNCTION_VALUE(VALTYPE, FUNC)  \
985   gen_rtx_REG (TYPE_MODE (VALTYPE), 0)
986
987 /* Define how to find the value returned by a library function
988    assuming the value has mode MODE.  */
989
990 /* On the 68000 the return value is in D0 regardless.  */
991
992 #define LIBCALL_VALUE(MODE)  gen_rtx_REG (MODE, 0)
993
994 /* 1 if N is a possible register number for a function value.
995    On the 68000, d0 is the only register thus used.  */
996
997 #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0)
998
999 /* Define this to be true when FUNCTION_VALUE_REGNO_P is true for
1000    more than one register.  */
1001
1002 #define NEEDS_UNTYPED_CALL 0
1003
1004 /* Define this if PCC uses the nonreentrant convention for returning
1005    structure and union values.  */
1006
1007 #define PCC_STATIC_STRUCT_RETURN
1008
1009 /* 1 if N is a possible register number for function argument passing.
1010    On the 68000, no registers are used in this way.  */
1011
1012 #define FUNCTION_ARG_REGNO_P(N) 0
1013 \f
1014 /* Define a data type for recording info about an argument list
1015    during the scan of that argument list.  This data type should
1016    hold all necessary information about the function itself
1017    and about the args processed so far, enough to enable macros
1018    such as FUNCTION_ARG to determine where the next arg should go.
1019
1020    On the m68k, this is a single integer, which is a number of bytes
1021    of arguments scanned so far.  */
1022
1023 #define CUMULATIVE_ARGS int
1024
1025 /* Initialize a variable CUM of type CUMULATIVE_ARGS
1026    for a call to a function whose data type is FNTYPE.
1027    For a library call, FNTYPE is 0.
1028
1029    On the m68k, the offset starts at 0.  */
1030
1031 #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT)       \
1032  ((CUM) = 0)
1033
1034 /* Update the data in CUM to advance over an argument
1035    of mode MODE and data type TYPE.
1036    (TYPE is null for libcalls where that information may not be available.)  */
1037
1038 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)    \
1039  ((CUM) += ((MODE) != BLKmode                   \
1040             ? (GET_MODE_SIZE (MODE) + 3) & ~3   \
1041             : (int_size_in_bytes (TYPE) + 3) & ~3))
1042
1043 /* Define where to put the arguments to a function.
1044    Value is zero to push the argument on the stack,
1045    or a hard register in which to store the argument.
1046
1047    MODE is the argument's machine mode.
1048    TYPE is the data type of the argument (as a tree).
1049     This is null for libcalls where that information may
1050     not be available.
1051    CUM is a variable of type CUMULATIVE_ARGS which gives info about
1052     the preceding args and about the function being called.
1053    NAMED is nonzero if this argument is a named parameter
1054     (otherwise it is an extra parameter matching an ellipsis).  */
1055
1056 /* On the 68000 all args are pushed, except if -mregparm is specified
1057    then the first two words of arguments are passed in d0, d1.
1058    *NOTE* -mregparm does not work.
1059    It exists only to test register calling conventions.  */
1060
1061 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
1062 ((TARGET_REGPARM && (CUM) < 8) ? gen_rtx_REG ((MODE), (CUM) / 4) : 0)
1063
1064 /* For an arg passed partly in registers and partly in memory,
1065    this is the number of registers used.
1066    For args passed entirely in registers or entirely in memory, zero.  */
1067
1068 #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
1069 ((TARGET_REGPARM && (CUM) < 8                                   \
1070   && 8 < ((CUM) + ((MODE) == BLKmode                            \
1071                       ? int_size_in_bytes (TYPE)                \
1072                       : GET_MODE_SIZE (MODE))))                 \
1073  ? 2 - (CUM) / 4 : 0)
1074
1075 /* Output assembler code to FILE to increment profiler label # LABELNO
1076    for profiling a function entry.  */
1077
1078 #define FUNCTION_PROFILER(FILE, LABELNO)  \
1079   asm_fprintf (FILE, "\tlea %LLP%d,%Ra0\n\tjsr mcount\n", (LABELNO))
1080
1081 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
1082    the stack pointer does not matter.  The value is tested only in
1083    functions that have frame pointers.
1084    No definition is equivalent to always zero.  */
1085
1086 #define EXIT_IGNORE_STACK 1
1087
1088 /* This is a hook for other tm files to change.  */
1089 /* #define FUNCTION_EXTRA_EPILOGUE(FILE, SIZE) */
1090
1091 /* Determine if the epilogue should be output as RTL.
1092    You should override this if you define FUNCTION_EXTRA_EPILOGUE.  */
1093 #define USE_RETURN_INSN use_return_insn ()
1094
1095 /* Store in the variable DEPTH the initial difference between the
1096    frame pointer reg contents and the stack pointer reg contents,
1097    as of the start of the function body.  This depends on the layout
1098    of the fixed parts of the stack frame and on how registers are saved.
1099
1100    On the 68k, if we have a frame, we must add one word to its length
1101    to allow for the place that a6 is stored when we do have a frame pointer.
1102    Otherwise, we would need to compute the offset from the frame pointer
1103    of a local variable as a function of frame_pointer_needed, which
1104    is hard.  */
1105
1106 #define INITIAL_FRAME_POINTER_OFFSET(DEPTH)                     \
1107 { int regno;                                                    \
1108   int offset = -4;                                              \
1109   for (regno = 16; regno < FIRST_PSEUDO_REGISTER; regno++)      \
1110     if (regs_ever_live[regno] && ! call_used_regs[regno])       \
1111       offset += 12;                                             \
1112   for (regno = 0; regno < 16; regno++)                          \
1113     if (regs_ever_live[regno] && ! call_used_regs[regno])       \
1114       offset += 4;                                              \
1115   if (flag_pic && current_function_uses_pic_offset_table)       \
1116     offset += 4;                                                \
1117   (DEPTH) = (offset + ((get_frame_size () + 3) & -4)            \
1118              + (get_frame_size () == 0 ? 0 : 4));               \
1119 }
1120
1121 /* Output assembler code for a block containing the constant parts
1122    of a trampoline, leaving space for the variable parts.  */
1123
1124 /* On the 68k, the trampoline looks like this:
1125      movl #STATIC,a0
1126      jmp  FUNCTION
1127
1128    WARNING: Targets that may run on 68040+ cpus must arrange for
1129    the instruction cache to be flushed.  Previous incarnations of
1130    the m68k trampoline code attempted to get around this by either
1131    using an out-of-line transfer function or pc-relative data, but
1132    the fact remains that the code to jump to the transfer function
1133    or the code to load the pc-relative data needs to be flushed
1134    just as much as the "variable" portion of the trampoline.  
1135    Recognizing that a cache flush is going to be required anyway,
1136    dispense with such notions and build a smaller trampoline.  */
1137
1138 /* Since more instructions are required to move a template into
1139    place than to create it on the spot, don't use a template.  */
1140
1141 /* Length in units of the trampoline for entering a nested function.  */
1142
1143 #define TRAMPOLINE_SIZE 12
1144
1145 /* Alignment required for a trampoline in bits.  */
1146
1147 #define TRAMPOLINE_ALIGNMENT 16
1148
1149 /* Targets redefine this to invoke code to either flush the cache,
1150    or enable stack execution (or both).  */
1151
1152 #ifndef FINALIZE_TRAMPOLINE
1153 #define FINALIZE_TRAMPOLINE(TRAMP)
1154 #endif
1155
1156 /* Emit RTL insns to initialize the variable parts of a trampoline.
1157    FNADDR is an RTX for the address of the function's pure code.
1158    CXT is an RTX for the static chain value for the function.
1159
1160    We generate a two-instructions program at address TRAMP :
1161         movea.l &CXT,%a0
1162         jmp FNADDR                                      */
1163
1164 #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT)                       \
1165 {                                                                       \
1166   emit_move_insn (gen_rtx_MEM (HImode, TRAMP), GEN_INT(0x207C));        \
1167   emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 2)), CXT); \
1168   emit_move_insn (gen_rtx_MEM (HImode, plus_constant (TRAMP, 6)),       \
1169                   GEN_INT(0x4EF9));                                     \
1170   emit_move_insn (gen_rtx_MEM (SImode, plus_constant (TRAMP, 8)), FNADDR); \
1171   FINALIZE_TRAMPOLINE(TRAMP);                                           \
1172 }
1173
1174 /* This is the library routine that is used
1175    to transfer control from the trampoline
1176    to the actual nested function.
1177    It is defined for backward compatibility,
1178    for linking with object code that used the old
1179    trampoline definition.  */
1180
1181 /* A colon is used with no explicit operands
1182    to cause the template string to be scanned for %-constructs.  */
1183 /* The function name __transfer_from_trampoline is not actually used.
1184    The function definition just permits use of "asm with operands"
1185    (though the operand list is empty).  */
1186 #define TRANSFER_FROM_TRAMPOLINE                                \
1187 void                                                            \
1188 __transfer_from_trampoline ()                                   \
1189 {                                                               \
1190   register char *a0 asm ("%a0");                                \
1191   asm (GLOBAL_ASM_OP "___trampoline");                          \
1192   asm ("___trampoline:");                                       \
1193   asm volatile ("move%.l %0,%@" : : "m" (a0[22]));              \
1194   asm volatile ("move%.l %1,%0" : "=a" (a0) : "m" (a0[18]));    \
1195   asm ("rts":);                                                 \
1196 }
1197 \f
1198 /* Addressing modes, and classification of registers for them.  */
1199
1200 #define HAVE_POST_INCREMENT 1
1201 /* #define HAVE_POST_DECREMENT 0 */
1202
1203 #define HAVE_PRE_DECREMENT 1
1204 /* #define HAVE_PRE_INCREMENT 0 */
1205
1206 /* Macros to check register numbers against specific register classes.  */
1207
1208 /* These assume that REGNO is a hard or pseudo reg number.
1209    They give nonzero only if REGNO is a hard reg of the suitable class
1210    or a pseudo reg currently allocated to a suitable hard reg.
1211    Since they use reg_renumber, they are safe only once reg_renumber
1212    has been allocated, which happens in local-alloc.c.  */
1213
1214 #define REGNO_OK_FOR_INDEX_P(REGNO) \
1215 ((REGNO) < 16 || (unsigned) reg_renumber[REGNO] < 16)
1216 #define REGNO_OK_FOR_BASE_P(REGNO) \
1217 (((REGNO) ^ 010) < 8 || (unsigned) (reg_renumber[REGNO] ^ 010) < 8)
1218 #define REGNO_OK_FOR_DATA_P(REGNO) \
1219 ((REGNO) < 8 || (unsigned) reg_renumber[REGNO] < 8)
1220 #define REGNO_OK_FOR_FP_P(REGNO) \
1221 (((REGNO) ^ 020) < 8 || (unsigned) (reg_renumber[REGNO] ^ 020) < 8)
1222 #ifdef SUPPORT_SUN_FPA
1223 #define REGNO_OK_FOR_FPA_P(REGNO) \
1224 (((REGNO) >= 24 && (REGNO) < 56) || (reg_renumber[REGNO] >= 24 && reg_renumber[REGNO] < 56))
1225 #endif
1226
1227 /* Now macros that check whether X is a register and also,
1228    strictly, whether it is in a specified class.
1229
1230    These macros are specific to the 68000, and may be used only
1231    in code for printing assembler insns and in conditions for
1232    define_optimization.  */
1233
1234 /* 1 if X is a data register.  */
1235
1236 #define DATA_REG_P(X) (REG_P (X) && REGNO_OK_FOR_DATA_P (REGNO (X)))
1237
1238 /* 1 if X is an fp register.  */
1239
1240 #define FP_REG_P(X) (REG_P (X) && REGNO_OK_FOR_FP_P (REGNO (X)))
1241
1242 /* 1 if X is an address register  */
1243
1244 #define ADDRESS_REG_P(X) (REG_P (X) && REGNO_OK_FOR_BASE_P (REGNO (X)))
1245
1246 #ifdef SUPPORT_SUN_FPA
1247 /* 1 if X is a register in the Sun FPA.  */
1248 #define FPA_REG_P(X) (REG_P (X) && REGNO_OK_FOR_FPA_P (REGNO (X)))
1249 #else
1250 /* Answer must be no if we don't have an FPA.  */
1251 #define FPA_REG_P(X) 0
1252 #endif
1253 \f
1254 /* Maximum number of registers that can appear in a valid memory address.  */
1255
1256 #define MAX_REGS_PER_ADDRESS 2
1257
1258 /* Recognize any constant value that is a valid address.  */
1259
1260 #define CONSTANT_ADDRESS_P(X)   \
1261   (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF              \
1262    || GET_CODE (X) == CONST_INT || GET_CODE (X) == CONST                \
1263    || GET_CODE (X) == HIGH)
1264
1265 /* Nonzero if the constant value X is a legitimate general operand.
1266    It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE.  */
1267
1268 #define LEGITIMATE_CONSTANT_P(X) 1
1269
1270 /* Nonzero if the constant value X is a legitimate general operand
1271    when generating PIC code.  It is given that flag_pic is on and 
1272    that X satisfies CONSTANT_P or is a CONST_DOUBLE.
1273
1274    PCREL_GENERAL_OPERAND_OK makes reload accept addresses that are
1275    accepted by insn predicates, but which would otherwise fail the
1276    `general_operand' test.  */
1277
1278 #ifndef REG_OK_STRICT
1279 #define PCREL_GENERAL_OPERAND_OK 0
1280 #else
1281 #define PCREL_GENERAL_OPERAND_OK (TARGET_PCREL)
1282 #endif
1283
1284 #define LEGITIMATE_PIC_OPERAND_P(X)     \
1285   ((! symbolic_operand (X, VOIDmode)                            \
1286     && ! (GET_CODE (X) == CONST_DOUBLE && mem_for_const_double (X) != 0 \
1287           && GET_CODE (mem_for_const_double (X)) == MEM                 \
1288           && symbolic_operand (XEXP (mem_for_const_double (X), 0),      \
1289                                VOIDmode)))                              \
1290    || (GET_CODE (X) == SYMBOL_REF && SYMBOL_REF_FLAG (X))               \
1291    || PCREL_GENERAL_OPERAND_OK)
1292
1293 /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
1294    and check its validity for a certain class.
1295    We have two alternate definitions for each of them.
1296    The usual definition accepts all pseudo regs; the other rejects
1297    them unless they have been allocated suitable hard regs.
1298    The symbol REG_OK_STRICT causes the latter definition to be used.
1299
1300    Most source files want to accept pseudo regs in the hope that
1301    they will get allocated to the class that the insn wants them to be in.
1302    Source files for reload pass need to be strict.
1303    After reload, it makes no difference, since pseudo regs have
1304    been eliminated by then.  */
1305
1306 #ifndef REG_OK_STRICT
1307
1308 /* Nonzero if X is a hard reg that can be used as an index
1309    or if it is a pseudo reg.  */
1310 #define REG_OK_FOR_INDEX_P(X) ((REGNO (X) ^ 020) >= 8)
1311 /* Nonzero if X is a hard reg that can be used as a base reg
1312    or if it is a pseudo reg.  */
1313 #define REG_OK_FOR_BASE_P(X) ((REGNO (X) & ~027) != 0)
1314
1315 #else
1316
1317 /* Nonzero if X is a hard reg that can be used as an index.  */
1318 #define REG_OK_FOR_INDEX_P(X) REGNO_OK_FOR_INDEX_P (REGNO (X))
1319 /* Nonzero if X is a hard reg that can be used as a base reg.  */
1320 #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))
1321
1322 #endif
1323 \f
1324 /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
1325    that is a valid memory address for an instruction.
1326    The MODE argument is the machine mode for the MEM expression
1327    that wants to use this address.
1328
1329    When generating PIC, an address involving a SYMBOL_REF is legitimate
1330    if and only if it is the sum of pic_offset_table_rtx and the SYMBOL_REF.
1331    We use LEGITIMATE_PIC_OPERAND_P to throw out the illegitimate addresses,
1332    and we explicitly check for the sum of pic_offset_table_rtx and a SYMBOL_REF.
1333
1334    Likewise for a LABEL_REF when generating PIC.
1335
1336    The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS.  */
1337
1338 /* Allow SUBREG everywhere we allow REG.  This results in better code.  It
1339    also makes function inlining work when inline functions are called with
1340    arguments that are SUBREGs.  */
1341
1342 #define LEGITIMATE_BASE_REG_P(X)   \
1343   ((GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X))       \
1344    || (GET_CODE (X) == SUBREG                           \
1345        && GET_CODE (SUBREG_REG (X)) == REG              \
1346        && REG_OK_FOR_BASE_P (SUBREG_REG (X))))
1347
1348 #define INDIRECTABLE_1_ADDRESS_P(X)  \
1349   ((CONSTANT_ADDRESS_P (X) && (!flag_pic || LEGITIMATE_PIC_OPERAND_P (X))) \
1350    || LEGITIMATE_BASE_REG_P (X)                                         \
1351    || ((GET_CODE (X) == PRE_DEC || GET_CODE (X) == POST_INC)            \
1352        && LEGITIMATE_BASE_REG_P (XEXP (X, 0)))                          \
1353    || (GET_CODE (X) == PLUS                                             \
1354        && LEGITIMATE_BASE_REG_P (XEXP (X, 0))                           \
1355        && GET_CODE (XEXP (X, 1)) == CONST_INT                           \
1356        && (TARGET_68020                                                 \
1357            || ((unsigned) INTVAL (XEXP (X, 1)) + 0x8000) < 0x10000))    \
1358    || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx      \
1359        && flag_pic && GET_CODE (XEXP (X, 1)) == SYMBOL_REF)             \
1360    || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx      \
1361        && flag_pic && GET_CODE (XEXP (X, 1)) == LABEL_REF))
1362
1363 #define GO_IF_NONINDEXED_ADDRESS(X, ADDR)  \
1364 { if (INDIRECTABLE_1_ADDRESS_P (X)) goto ADDR; }
1365
1366 /* Only labels on dispatch tables are valid for indexing from.  */
1367 #define GO_IF_INDEXABLE_BASE(X, ADDR)                           \
1368 { rtx temp;                                                     \
1369   if (GET_CODE (X) == LABEL_REF                                 \
1370       && (temp = next_nonnote_insn (XEXP (X, 0))) != 0          \
1371       && GET_CODE (temp) == JUMP_INSN                           \
1372       && (GET_CODE (PATTERN (temp)) == ADDR_VEC                 \
1373           || GET_CODE (PATTERN (temp)) == ADDR_DIFF_VEC))       \
1374     goto ADDR;                                                  \
1375   if (LEGITIMATE_BASE_REG_P (X)) goto ADDR; }
1376
1377 #define GO_IF_INDEXING(X, ADDR) \
1378 { if (GET_CODE (X) == PLUS && LEGITIMATE_INDEX_P (XEXP (X, 0)))         \
1379     { GO_IF_INDEXABLE_BASE (XEXP (X, 1), ADDR); }                       \
1380   if (GET_CODE (X) == PLUS && LEGITIMATE_INDEX_P (XEXP (X, 1)))         \
1381     { GO_IF_INDEXABLE_BASE (XEXP (X, 0), ADDR); } }
1382
1383 #define GO_IF_INDEXED_ADDRESS(X, ADDR)   \
1384 { GO_IF_INDEXING (X, ADDR);                                             \
1385   if (GET_CODE (X) == PLUS)                                             \
1386     { if (GET_CODE (XEXP (X, 1)) == CONST_INT                           \
1387           && (TARGET_68020 || (unsigned) INTVAL (XEXP (X, 1)) + 0x80 < 0x100))          \
1388         { rtx go_temp = XEXP (X, 0); GO_IF_INDEXING (go_temp, ADDR); }  \
1389       if (GET_CODE (XEXP (X, 0)) == CONST_INT                           \
1390           && (TARGET_68020 || (unsigned) INTVAL (XEXP (X, 0)) + 0x80 < 0x100))          \
1391         { rtx go_temp = XEXP (X, 1); GO_IF_INDEXING (go_temp, ADDR); } } }
1392
1393 /* coldfire/5200 does not allow HImode index registers.  */
1394 #define LEGITIMATE_INDEX_REG_P(X)   \
1395   ((GET_CODE (X) == REG && REG_OK_FOR_INDEX_P (X))      \
1396    || (! TARGET_5200                                    \
1397        && GET_CODE (X) == SIGN_EXTEND                   \
1398        && GET_CODE (XEXP (X, 0)) == REG                 \
1399        && GET_MODE (XEXP (X, 0)) == HImode              \
1400        && REG_OK_FOR_INDEX_P (XEXP (X, 0)))             \
1401    || (GET_CODE (X) == SUBREG                           \
1402        && GET_CODE (SUBREG_REG (X)) == REG              \
1403        && REG_OK_FOR_INDEX_P (SUBREG_REG (X))))
1404
1405 #define LEGITIMATE_INDEX_P(X)   \
1406    (LEGITIMATE_INDEX_REG_P (X)                          \
1407     || ((TARGET_68020 || TARGET_5200) && GET_CODE (X) == MULT \
1408         && LEGITIMATE_INDEX_REG_P (XEXP (X, 0))         \
1409         && GET_CODE (XEXP (X, 1)) == CONST_INT          \
1410         && (INTVAL (XEXP (X, 1)) == 2                   \
1411             || INTVAL (XEXP (X, 1)) == 4                \
1412             || (INTVAL (XEXP (X, 1)) == 8 && !TARGET_5200))))
1413
1414 /* If pic, we accept INDEX+LABEL, which is what do_tablejump makes.  */
1415 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)                         \
1416 { GO_IF_NONINDEXED_ADDRESS (X, ADDR);                                   \
1417   GO_IF_INDEXED_ADDRESS (X, ADDR);                                      \
1418   if (flag_pic && MODE == CASE_VECTOR_MODE && GET_CODE (X) == PLUS      \
1419       && LEGITIMATE_INDEX_P (XEXP (X, 0))                               \
1420       && GET_CODE (XEXP (X, 1)) == LABEL_REF)                           \
1421     goto ADDR; }
1422
1423 /* Don't call memory_address_noforce for the address to fetch
1424    the switch offset.  This address is ok as it stands (see above),
1425    but memory_address_noforce would alter it.  */
1426 #define PIC_CASE_VECTOR_ADDRESS(index) index
1427 \f
1428 /* Try machine-dependent ways of modifying an illegitimate address
1429    to be legitimate.  If we find one, return the new, valid address.
1430    This macro is used in only one place: `memory_address' in explow.c.
1431
1432    OLDX is the address as it was before break_out_memory_refs was called.
1433    In some cases it is useful to look at this to decide what needs to be done.
1434
1435    MODE and WIN are passed so that this macro can use
1436    GO_IF_LEGITIMATE_ADDRESS.
1437
1438    It is always safe for this macro to do nothing.  It exists to recognize
1439    opportunities to optimize the output.
1440
1441    For the 68000, we handle X+REG by loading X into a register R and
1442    using R+REG.  R will go in an address reg and indexing will be used.
1443    However, if REG is a broken-out memory address or multiplication,
1444    nothing needs to be done because REG can certainly go in an address reg.  */
1445
1446 #define COPY_ONCE(Y) if (!copied) { Y = copy_rtx (Y); copied = ch = 1; }
1447 #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN)   \
1448 { register int ch = (X) != (OLDX);                                      \
1449   if (GET_CODE (X) == PLUS)                                             \
1450     { int copied = 0;                                                   \
1451       if (GET_CODE (XEXP (X, 0)) == MULT)                               \
1452         { COPY_ONCE (X); XEXP (X, 0) = force_operand (XEXP (X, 0), 0);} \
1453       if (GET_CODE (XEXP (X, 1)) == MULT)                               \
1454         { COPY_ONCE (X); XEXP (X, 1) = force_operand (XEXP (X, 1), 0);} \
1455       if (ch && GET_CODE (XEXP (X, 1)) == REG                           \
1456           && GET_CODE (XEXP (X, 0)) == REG)                             \
1457         goto WIN;                                                       \
1458       if (ch) { GO_IF_LEGITIMATE_ADDRESS (MODE, X, WIN); }              \
1459       if (GET_CODE (XEXP (X, 0)) == REG                                 \
1460                || (GET_CODE (XEXP (X, 0)) == SIGN_EXTEND                \
1461                    && GET_CODE (XEXP (XEXP (X, 0), 0)) == REG           \
1462                    && GET_MODE (XEXP (XEXP (X, 0), 0)) == HImode))      \
1463         { register rtx temp = gen_reg_rtx (Pmode);                      \
1464           register rtx val = force_operand (XEXP (X, 1), 0);            \
1465           emit_move_insn (temp, val);                                   \
1466           COPY_ONCE (X);                                                \
1467           XEXP (X, 1) = temp;                                           \
1468           goto WIN; }                                                   \
1469       else if (GET_CODE (XEXP (X, 1)) == REG                            \
1470                || (GET_CODE (XEXP (X, 1)) == SIGN_EXTEND                \
1471                    && GET_CODE (XEXP (XEXP (X, 1), 0)) == REG           \
1472                    && GET_MODE (XEXP (XEXP (X, 1), 0)) == HImode))      \
1473         { register rtx temp = gen_reg_rtx (Pmode);                      \
1474           register rtx val = force_operand (XEXP (X, 0), 0);            \
1475           emit_move_insn (temp, val);                                   \
1476           COPY_ONCE (X);                                                \
1477           XEXP (X, 0) = temp;                                           \
1478           goto WIN; }}}
1479
1480 /* Go to LABEL if ADDR (a legitimate address expression)
1481    has an effect that depends on the machine mode it is used for.
1482    On the 68000, only predecrement and postincrement address depend thus
1483    (the amount of decrement or increment being the length of the operand).  */
1484
1485 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)        \
1486  if (GET_CODE (ADDR) == POST_INC || GET_CODE (ADDR) == PRE_DEC) goto LABEL
1487 \f
1488 /* Specify the machine mode that this machine uses
1489    for the index in the tablejump instruction.  */
1490 #define CASE_VECTOR_MODE HImode
1491
1492 /* Define as C expression which evaluates to nonzero if the tablejump
1493    instruction expects the table to contain offsets from the address of the
1494    table.
1495    Do not define this if the table should contain absolute addresses.  */
1496 #define CASE_VECTOR_PC_RELATIVE 1
1497
1498 /* Define this as 1 if `char' should by default be signed; else as 0.  */
1499 #define DEFAULT_SIGNED_CHAR 1
1500
1501 /* Don't cse the address of the function being compiled.  */
1502 #define NO_RECURSIVE_FUNCTION_CSE
1503
1504 /* Max number of bytes we can move from memory to memory
1505    in one reasonably fast instruction.  */
1506 #define MOVE_MAX 4
1507
1508 /* Nonzero if access to memory by bytes is slow and undesirable.  */
1509 #define SLOW_BYTE_ACCESS 0
1510
1511 /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
1512    is done just by pretending it is already truncated.  */
1513 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
1514
1515 /* We assume that the store-condition-codes instructions store 0 for false
1516    and some other value for true.  This is the value stored for true.  */
1517
1518 #define STORE_FLAG_VALUE (-1)
1519
1520 /* When a prototype says `char' or `short', really pass an `int'.  */
1521 #define PROMOTE_PROTOTYPES 1
1522
1523 /* Specify the machine mode that pointers have.
1524    After generation of rtl, the compiler makes no further distinction
1525    between pointers and any other objects of this machine mode.  */
1526 #define Pmode SImode
1527
1528 /* A function address in a call instruction
1529    is a byte address (for indexing purposes)
1530    so give the MEM rtx a byte's mode.  */
1531 #define FUNCTION_MODE QImode
1532
1533 /* Compute the cost of computing a constant rtl expression RTX
1534    whose rtx-code is CODE.  The body of this macro is a portion
1535    of a switch statement.  If the code is computed here,
1536    return it with a return statement.  Otherwise, break from the switch.  */
1537
1538 #define CONST_COSTS(RTX,CODE,OUTER_CODE) \
1539   case CONST_INT:                                               \
1540     /* Constant zero is super cheap due to clr instruction.  */ \
1541     if (RTX == const0_rtx) return 0;                            \
1542     /* if ((OUTER_CODE) == SET) */                              \
1543       return const_int_cost(RTX);                               \
1544   case CONST:                                                   \
1545   case LABEL_REF:                                               \
1546   case SYMBOL_REF:                                              \
1547     return 3;                                                   \
1548   case CONST_DOUBLE:                                            \
1549     /* Make 0.0 cheaper than other floating constants to        \
1550        encourage creating tstsf and tstdf insns.  */            \
1551     if ((OUTER_CODE) == COMPARE                                 \
1552         && ((RTX) == CONST0_RTX (SFmode)                        \
1553             || (RTX) == CONST0_RTX (DFmode)))                   \
1554       return 4;                                                 \
1555     return 5;
1556
1557 /* Compute the cost of various arithmetic operations.
1558    These are vaguely right for a 68020.  */
1559 /* The costs for long multiply have been adjusted to
1560    work properly in synth_mult on the 68020,
1561    relative to an average of the time for add and the time for shift,
1562    taking away a little more because sometimes move insns are needed.  */
1563 /* div?.w is relatively cheaper on 68000 counted in COSTS_N_INSNS terms.  */
1564 #define MULL_COST (TARGET_68060 ? 2 : TARGET_68040 ? 5 : 13)
1565 #define MULW_COST (TARGET_68060 ? 2 : TARGET_68040 ? 3 : TARGET_68020 ? 8 : 5)
1566 #define DIVW_COST (TARGET_68020 ? 27 : 12)
1567
1568 #define RTX_COSTS(X,CODE,OUTER_CODE)                            \
1569   case PLUS:                                                    \
1570     /* An lea costs about three times as much as a simple add.  */  \
1571     if (GET_MODE (X) == SImode                                  \
1572         && GET_CODE (XEXP (X, 1)) == REG                        \
1573         && GET_CODE (XEXP (X, 0)) == MULT                       \
1574         && GET_CODE (XEXP (XEXP (X, 0), 0)) == REG              \
1575         && GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT        \
1576         && (INTVAL (XEXP (XEXP (X, 0), 1)) == 2                 \
1577             || INTVAL (XEXP (XEXP (X, 0), 1)) == 4              \
1578             || INTVAL (XEXP (XEXP (X, 0), 1)) == 8))            \
1579       return COSTS_N_INSNS (3);  /* lea an@(dx:l:i),am */       \
1580     break;                                                      \
1581   case ASHIFT:                                                  \
1582   case ASHIFTRT:                                                \
1583   case LSHIFTRT:                                                \
1584     if (TARGET_68060)                                           \
1585       return COSTS_N_INSNS(1);                                  \
1586     if (! TARGET_68020)                                                 \
1587       {                                                                 \
1588         if (GET_CODE (XEXP (X, 1)) == CONST_INT)                        \
1589           {                                                             \
1590             if (INTVAL (XEXP (X, 1)) < 16)                              \
1591               return COSTS_N_INSNS (2) + INTVAL (XEXP (X, 1)) / 2;      \
1592             else                                                        \
1593               /* We're using clrw + swap for these cases.  */           \
1594               return COSTS_N_INSNS (4) + (INTVAL (XEXP (X, 1)) - 16) / 2; \
1595           }                                                             \
1596         return COSTS_N_INSNS (10); /* worst case */                     \
1597       }                                                                 \
1598     /* A shift by a big integer takes an extra instruction.  */ \
1599     if (GET_CODE (XEXP (X, 1)) == CONST_INT                     \
1600         && (INTVAL (XEXP (X, 1)) == 16))                        \
1601       return COSTS_N_INSNS (2);  /* clrw;swap */                \
1602     if (GET_CODE (XEXP (X, 1)) == CONST_INT                     \
1603         && !(INTVAL (XEXP (X, 1)) > 0                           \
1604              && INTVAL (XEXP (X, 1)) <= 8))                     \
1605       return COSTS_N_INSNS (3);  /* lsr #i,dn */                \
1606     break;                                                      \
1607   case MULT:                                                    \
1608     if ((GET_CODE (XEXP (X, 0)) == ZERO_EXTEND                  \
1609          || GET_CODE (XEXP (X, 0)) == SIGN_EXTEND)              \
1610         && GET_MODE (X) == SImode)                              \
1611       return COSTS_N_INSNS (MULW_COST);                         \
1612     if (GET_MODE (X) == QImode || GET_MODE (X) == HImode)       \
1613       return COSTS_N_INSNS (MULW_COST);                         \
1614     else                                                        \
1615       return COSTS_N_INSNS (MULL_COST);                         \
1616   case DIV:                                                     \
1617   case UDIV:                                                    \
1618   case MOD:                                                     \
1619   case UMOD:                                                    \
1620     if (GET_MODE (X) == QImode || GET_MODE (X) == HImode)       \
1621       return COSTS_N_INSNS (DIVW_COST); /* div.w */             \
1622     return COSTS_N_INSNS (43);   /* div.l */
1623 \f
1624 /* Tell final.c how to eliminate redundant test instructions.  */
1625
1626 /* Here we define machine-dependent flags and fields in cc_status
1627    (see `conditions.h').  */
1628
1629 /* Set if the cc value is actually in the 68881, so a floating point
1630    conditional branch must be output.  */
1631 #define CC_IN_68881 04000
1632
1633 /* Store in cc_status the expressions that the condition codes will
1634    describe after execution of an instruction whose pattern is EXP.
1635    Do not alter them if the instruction would not alter the cc's.  */
1636
1637 /* On the 68000, all the insns to store in an address register fail to
1638    set the cc's.  However, in some cases these instructions can make it
1639    possibly invalid to use the saved cc's.  In those cases we clear out
1640    some or all of the saved cc's so they won't be used.  */
1641
1642 #define NOTICE_UPDATE_CC(EXP,INSN) notice_update_cc (EXP, INSN)
1643
1644 #define OUTPUT_JUMP(NORMAL, FLOAT, NO_OV)  \
1645 { if (cc_prev_status.flags & CC_IN_68881)                       \
1646     return FLOAT;                                               \
1647   if (cc_prev_status.flags & CC_NO_OVERFLOW)                    \
1648     return NO_OV;                                               \
1649   return NORMAL; }
1650 \f
1651 /* Control the assembler format that we output.  */
1652
1653 /* Output at beginning of assembler file.  */
1654
1655 #define ASM_FILE_START(FILE)    \
1656   fprintf (FILE, "#NO_APP\n");
1657
1658 /* Output to assembler file text saying following lines
1659    may contain character constants, extra white space, comments, etc.  */
1660
1661 #define ASM_APP_ON "#APP\n"
1662
1663 /* Output to assembler file text saying following lines
1664    no longer contain unusual constructs.  */
1665
1666 #define ASM_APP_OFF "#NO_APP\n"
1667
1668 /* Output before read-only data.  */
1669
1670 #define TEXT_SECTION_ASM_OP "\t.text"
1671
1672 /* Output before writable data.  */
1673
1674 #define DATA_SECTION_ASM_OP "\t.data"
1675
1676 /* Here are four prefixes that are used by asm_fprintf to
1677    facilitate customization for alternate assembler syntaxes.
1678    Machines with no likelihood of an alternate syntax need not
1679    define these and need not use asm_fprintf.  */
1680
1681 /* The prefix for register names.  Note that REGISTER_NAMES
1682    is supposed to include this prefix.  */
1683
1684 #define REGISTER_PREFIX ""
1685
1686 /* The prefix for local labels.  You should be able to define this as
1687    an empty string, or any arbitrary string (such as ".", ".L%", etc)
1688    without having to make any other changes to account for the specific
1689    definition.  Note it is a string literal, not interpreted by printf
1690    and friends.  */
1691
1692 #define LOCAL_LABEL_PREFIX ""
1693
1694 /* The prefix to add to user-visible assembler symbols.  */
1695
1696 #define USER_LABEL_PREFIX "_"
1697
1698 /* The prefix for immediate operands.  */
1699
1700 #define IMMEDIATE_PREFIX "#"
1701
1702 /* How to refer to registers in assembler output.
1703    This sequence is indexed by compiler's hard-register-number (see above).  */
1704
1705 #ifndef SUPPORT_SUN_FPA
1706
1707 #define REGISTER_NAMES \
1708 {"d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7",        \
1709  "a0", "a1", "a2", "a3", "a4", "a5", "a6", "sp",        \
1710  "fp0", "fp1", "fp2", "fp3", "fp4", "fp5", "fp6", "fp7" }
1711
1712 #else /* SUPPORTED_SUN_FPA */
1713
1714 #define REGISTER_NAMES \
1715 {"d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7",        \
1716  "a0", "a1", "a2", "a3", "a4", "a5", "a6", "sp",        \
1717  "fp0", "fp1", "fp2", "fp3", "fp4", "fp5", "fp6", "fp7", \
1718  "fpa0", "fpa1", "fpa2", "fpa3", "fpa4", "fpa5", "fpa6", "fpa7", \
1719  "fpa8", "fpa9", "fpa10", "fpa11", "fpa12", "fpa13", "fpa14", "fpa15", \
1720  "fpa16", "fpa17", "fpa18", "fpa19", "fpa20", "fpa21", "fpa22", "fpa23", \
1721  "fpa24", "fpa25", "fpa26", "fpa27", "fpa28", "fpa29", "fpa30", "fpa31" }
1722
1723 #endif /* defined SUPPORT_SUN_FPA */
1724
1725 /* How to renumber registers for dbx and gdb.
1726    On the Sun-3, the floating point registers have numbers
1727    18 to 25, not 16 to 23 as they do in the compiler.  */
1728
1729 #define DBX_REGISTER_NUMBER(REGNO) ((REGNO) < 16 ? (REGNO) : (REGNO) + 2)
1730
1731 /* Before the prologue, RA is at 0(%sp).  */
1732 #define INCOMING_RETURN_ADDR_RTX \
1733   gen_rtx_MEM (VOIDmode, gen_rtx_REG (VOIDmode, STACK_POINTER_REGNUM))
1734
1735 /* We must not use the DBX register numbers for the DWARF 2 CFA column
1736    numbers because that maps to numbers beyond FIRST_PSEUDO_REGISTER.
1737    Instead use the identity mapping.  */
1738 #define DWARF_FRAME_REGNUM(REG) REG
1739
1740 /* Before the prologue, the top of the frame is at 4(%sp).  */
1741 #define INCOMING_FRAME_SP_OFFSET 4
1742
1743 #define GLOBAL_ASM_OP "\t.globl\t"
1744
1745 /* This is how to output a reference to a user-level label named NAME.
1746    `assemble_name' uses this.  */
1747
1748 #define ASM_OUTPUT_LABELREF(FILE,NAME)  \
1749   asm_fprintf (FILE, "%0U%s", NAME)
1750
1751 /* This is how to output an internal numbered label where
1752    PREFIX is the class of label and NUM is the number within the class.  */
1753
1754 #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)      \
1755   asm_fprintf (FILE, "%0L%s%d:\n", PREFIX, NUM)
1756
1757 /* This is how to store into the string LABEL
1758    the symbol_ref name of an internal numbered label where
1759    PREFIX is the class of label and NUM is the number within the class.
1760    This is suitable for output with `assemble_name'.  */
1761
1762 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)   \
1763   sprintf (LABEL, "*%s%s%ld", LOCAL_LABEL_PREFIX, PREFIX, (long)(NUM))
1764
1765 /* This is how to output an insn to push a register on the stack.
1766    It need not be very fast code.  */
1767
1768 #define ASM_OUTPUT_REG_PUSH(FILE,REGNO)  \
1769   asm_fprintf (FILE, "\tmovel %s,%Rsp@-\n", reg_names[REGNO])
1770
1771 /* This is how to output an insn to pop a register from the stack.
1772    It need not be very fast code.  */
1773
1774 #define ASM_OUTPUT_REG_POP(FILE,REGNO)  \
1775   asm_fprintf (FILE, "\tmovel %Rsp@+,%s\n", reg_names[REGNO])
1776
1777 /* This is how to output an element of a case-vector that is absolute.
1778    (The 68000 does not use such vectors,
1779    but we must define this macro anyway.)  */
1780
1781 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE)  \
1782   asm_fprintf (FILE, "\t.long %LL%d\n", VALUE)
1783
1784 /* This is how to output an element of a case-vector that is relative.  */
1785
1786 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL)  \
1787   asm_fprintf (FILE, "\t.word %LL%d-%LL%d\n", VALUE, REL)
1788
1789 /* This is how to output an assembler line
1790    that says to advance the location counter
1791    to a multiple of 2**LOG bytes.  */
1792
1793 /* We don't have a way to align to more than a two-byte boundary, so do the
1794    best we can and don't complain.  */
1795 #define ASM_OUTPUT_ALIGN(FILE,LOG)      \
1796   if ((LOG) >= 1)                       \
1797     fprintf (FILE, "\t.even\n");
1798
1799 #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
1800   fprintf (FILE, "\t.skip %u\n", (SIZE))
1801
1802 /* This says how to output an assembler line
1803    to define a global common symbol.  */
1804
1805 #define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED)  \
1806 ( fputs (".comm ", (FILE)),                     \
1807   assemble_name ((FILE), (NAME)),               \
1808   fprintf ((FILE), ",%u\n", (ROUNDED)))
1809
1810 /* This says how to output an assembler line
1811    to define a local common symbol.  */
1812
1813 #define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED)  \
1814 ( fputs (".lcomm ", (FILE)),                    \
1815   assemble_name ((FILE), (NAME)),               \
1816   fprintf ((FILE), ",%u\n", (ROUNDED)))
1817
1818 /* Store in OUTPUT a string (made with alloca) containing
1819    an assembler-name for a local static variable named NAME.
1820    LABELNO is an integer which is different for each call.  */
1821
1822 #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO)  \
1823 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),    \
1824   sprintf ((OUTPUT), "%s.%d", (NAME), (LABELNO)))
1825
1826 /* Output a float value (represented as a C double) as an immediate operand.
1827    This macro is a 68k-specific macro.  */
1828
1829 #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE)               \
1830  do {                                                           \
1831       if (CODE == 'f')                                          \
1832         {                                                       \
1833           char dstr[30];                                        \
1834           REAL_VALUE_TO_DECIMAL (VALUE, dstr, 9);               \
1835           asm_fprintf ((FILE), "%I0r%s", dstr);                 \
1836         }                                                       \
1837       else                                                      \
1838         {                                                       \
1839           long l;                                               \
1840           REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);               \
1841           asm_fprintf ((FILE), "%I0x%lx", l);                   \
1842         }                                                       \
1843      } while (0)
1844
1845 /* Output a double value (represented as a C double) as an immediate operand.
1846    This macro is a 68k-specific macro.  */
1847 #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE)                           \
1848  do { char dstr[30];                                                    \
1849       REAL_VALUE_TO_DECIMAL (VALUE, dstr, -1);                          \
1850       asm_fprintf (FILE, "%I0r%s", dstr);                               \
1851     } while (0)
1852
1853 /* Note, long double immediate operands are not actually
1854    generated by m68k.md.  */
1855 #define ASM_OUTPUT_LONG_DOUBLE_OPERAND(FILE,VALUE)                      \
1856  do { char dstr[30];                                                    \
1857       REAL_VALUE_TO_DECIMAL (VALUE, dstr, -1);                          \
1858       asm_fprintf (FILE, "%I0r%s", dstr);                               \
1859     } while (0)
1860
1861 /* Print operand X (an rtx) in assembler syntax to file FILE.
1862    CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
1863    For `%' followed by punctuation, CODE is the punctuation and X is null.
1864
1865    On the 68000, we use several CODE characters:
1866    '.' for dot needed in Motorola-style opcode names.
1867    '-' for an operand pushing on the stack:
1868        sp@-, -(sp) or -(%sp) depending on the style of syntax.
1869    '+' for an operand pushing on the stack:
1870        sp@+, (sp)+ or (%sp)+ depending on the style of syntax.
1871    '@' for a reference to the top word on the stack:
1872        sp@, (sp) or (%sp) depending on the style of syntax.
1873    '#' for an immediate operand prefix (# in MIT and Motorola syntax
1874        but & in SGS syntax).
1875    '!' for the fpcr register (used in some float-to-fixed conversions).
1876    '$' for the letter `s' in an op code, but only on the 68040.
1877    '&' for the letter `d' in an op code, but only on the 68040.
1878    '/' for register prefix needed by longlong.h.
1879
1880    'b' for byte insn (no effect, on the Sun; this is for the ISI).
1881    'd' to force memory addressing to be absolute, not relative.
1882    'f' for float insn (print a CONST_DOUBLE as a float rather than in hex)
1883    'o' for operands to go directly to output_operand_address (bypassing
1884        print_operand_address--used only for SYMBOL_REFs under TARGET_PCREL)
1885    'w' for FPA insn (print a CONST_DOUBLE as a SunFPA constant rather
1886        than directly).  Second part of 'y' below.
1887    'x' for float insn (print a CONST_DOUBLE as a float rather than in hex),
1888        or print pair of registers as rx:ry.
1889    'y' for a FPA insn (print pair of registers as rx:ry).  This also outputs
1890        CONST_DOUBLE's as SunFPA constant RAM registers if
1891        possible, so it should not be used except for the SunFPA.  */
1892
1893 #define PRINT_OPERAND_PUNCT_VALID_P(CODE)                               \
1894   ((CODE) == '.' || (CODE) == '#' || (CODE) == '-'                      \
1895    || (CODE) == '+' || (CODE) == '@' || (CODE) == '!'                   \
1896    || (CODE) == '$' || (CODE) == '&' || (CODE) == '/')
1897
1898 /* A C compound statement to output to stdio stream STREAM the
1899    assembler syntax for an instruction operand X.  X is an RTL
1900    expression.
1901
1902    CODE is a value that can be used to specify one of several ways
1903    of printing the operand.  It is used when identical operands
1904    must be printed differently depending on the context.  CODE
1905    comes from the `%' specification that was used to request
1906    printing of the operand.  If the specification was just `%DIGIT'
1907    then CODE is 0; if the specification was `%LTR DIGIT' then CODE
1908    is the ASCII code for LTR.
1909
1910    If X is a register, this macro should print the register's name.
1911    The names can be found in an array `reg_names' whose type is
1912    `char *[]'.  `reg_names' is initialized from `REGISTER_NAMES'.
1913
1914    When the machine description has a specification `%PUNCT' (a `%'
1915    followed by a punctuation character), this macro is called with
1916    a null pointer for X and the punctuation character for CODE.
1917
1918    See m68k.c for the m68k specific codes.  */
1919
1920 #define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE)
1921
1922 /* A C compound statement to output to stdio stream STREAM the
1923    assembler syntax for an instruction operand that is a memory
1924    reference whose address is ADDR.  ADDR is an RTL expression.  */
1925
1926 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)
1927
1928 /* Variables in m68k.c */
1929 extern const char *m68k_align_loops_string;
1930 extern const char *m68k_align_jumps_string;
1931 extern const char *m68k_align_funcs_string;
1932 extern int m68k_align_loops;
1933 extern int m68k_align_jumps;
1934 extern int m68k_align_funcs;
1935 extern int m68k_last_compare_had_fp_operands;
1936
1937 \f
1938 /* Define the codes that are matched by predicates in m68k.c.  */
1939
1940 #define PREDICATE_CODES                                                 \
1941   {"general_src_operand", {CONST_INT, CONST_DOUBLE, CONST, SYMBOL_REF,  \
1942                            LABEL_REF, SUBREG, REG, MEM}},               \
1943   {"nonimmediate_src_operand", {SUBREG, REG, MEM}},                     \
1944   {"memory_src_operand", {SUBREG, MEM}},                                \
1945   {"not_sp_operand", {SUBREG, REG, MEM}},                               \
1946   {"pcrel_address", {SYMBOL_REF, LABEL_REF, CONST}},                    \
1947   {"const_uint32_operand", {CONST_INT, CONST_DOUBLE}},                  \
1948   {"const_sint32_operand", {CONST_INT}},                                \
1949   {"valid_dbcc_comparison_p", {EQ, NE, GTU, LTU, GEU, LEU,              \
1950                                GT, LT, GE, LE}},                        \
1951   {"extend_operator", {SIGN_EXTEND, ZERO_EXTEND}},
1952 \f
1953 /*
1954 Local variables:
1955 version-control: t
1956 End:
1957 */