Fix copyright date.
[platform/upstream/gcc.git] / gcc / config / v850 / v850.h
1 /* Definitions of target machine for GNU compiler. NEC V850 series
2    Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
3    Contributed by Jeff Law (law@cygnus.com).
4
5 This file is part of GNU CC.
6
7 GNU CC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU CC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU CC; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21
22 #include "svr4.h"       /* Automatically does #undef CPP_PREDEFINES */
23
24 #undef ASM_SPEC
25 #define ASM_SPEC "%{mv*:-mv%*}"
26
27 #ifndef CPP_SPEC
28 #define CPP_SPEC "-D__v850__"
29 #endif
30
31 #undef ASM_FINAL_SPEC
32 #undef LIB_SPEC
33 #undef ENDFILE_SPEC
34 #undef LINK_SPEC
35 #undef STARTFILE_SPEC
36
37 /* Names to predefine in the preprocessor for this target machine.  */
38 #define CPP_PREDEFINES "-D__v851__ -D__v850"
39
40 /* Print subsidiary information on the compiler version in use.  */
41
42 #ifndef TARGET_VERSION
43 #define TARGET_VERSION fprintf (stderr, " (NEC V850)");
44 #endif
45
46
47 /* Run-time compilation parameters selecting different hardware subsets.  */
48
49 extern int target_flags;
50
51 /* Target flags bits, see below for an explanation of the bits.  */
52 #define MASK_GHS                0x00000001
53 #define MASK_LONG_CALLS         0x00000002
54 #define MASK_EP                 0x00000004
55 #define MASK_PROLOG_FUNCTION    0x00000008
56 #define MASK_DEBUG              0x40000000
57
58 #define MASK_CPU                0x00000030
59 #define MASK_V850               0x00000010
60
61 #define MASK_BIG_SWITCH         0x00000100
62
63 #ifndef MASK_DEFAULT
64 #define MASK_DEFAULT            MASK_V850
65 #endif
66
67 #define TARGET_V850             ((target_flags & MASK_CPU) == MASK_V850)
68
69
70 /* Macros used in the machine description to test the flags.  */
71
72 /* The GHS calling convention support doesn't really work,
73    mostly due to a lack of documentation.  Outstanding issues:
74
75      * How do varargs & stdarg really work.  How to they handle
76      passing structures (if at all).
77
78      * Doubles are normally 4 byte aligned, except in argument
79      lists where they are 8 byte aligned.  Is the alignment
80      in the argument list based on the first parameter,
81      first stack parameter, etc etc.
82
83      * Passing/returning of large structures probably isn't the same
84      as GHS.  We don't have enough documentation on their conventions
85      to be compatible.
86
87      * Tests of SETUP_INCOMING_VARARGS need to be made runtime checks
88      since it depends on TARGET_GHS.  */
89 #define TARGET_GHS (target_flags & MASK_GHS)
90  
91 /* Don't do PC-relative calls, instead load the address of the target
92    function into a register and perform a register indirect call.  */
93 #define TARGET_LONG_CALLS (target_flags & MASK_LONG_CALLS)
94
95 /* Whether to optimize space by using ep (r30) for pointers with small offsets
96    in basic blocks.  */
97 #define TARGET_EP (target_flags & MASK_EP)
98
99 /* Whether to call out-of-line functions to save registers or not.  */
100 #define TARGET_PROLOG_FUNCTION (target_flags & MASK_PROLOG_FUNCTION)
101
102 /* Whether to emit 2 byte per entry or 4 byte per entry switch tables.  */
103 #define TARGET_BIG_SWITCH (target_flags & MASK_BIG_SWITCH)
104
105 /* General debug flag */
106 #define TARGET_DEBUG (target_flags & MASK_DEBUG)
107
108 /* Macro to define tables used to set the flags.
109    This is a list in braces of pairs in braces,
110    each pair being { "NAME", VALUE }
111    where VALUE is the bits to set or minus the bits to clear.
112    An empty string NAME is used to identify the default VALUE.  */
113
114 #define TARGET_SWITCHES                                                 \
115   {{ "ghs",                      MASK_GHS, "Support Green Hills ABI" }, \
116    { "no-ghs",                  -MASK_GHS, "" },                        \
117    { "long-calls",               MASK_LONG_CALLS,                       \
118                                 "Prohibit PC relative function calls" },\
119    { "no-long-calls",           -MASK_LONG_CALLS, "" },                 \
120    { "ep",                       MASK_EP,                               \
121                                 "Reuse r30 on a per function basis" },  \
122    { "no-ep",                   -MASK_EP, "" },                         \
123    { "prolog-function",          MASK_PROLOG_FUNCTION,                  \
124                                 "Use stubs for function prologues" },   \
125    { "no-prolog-function",      -MASK_PROLOG_FUNCTION, "" },            \
126    { "space",                    MASK_EP | MASK_PROLOG_FUNCTION,        \
127                                 "Same as: -mep -mprolog-function" },    \
128    { "debug",                    MASK_DEBUG, "Enable backend debugging" }, \
129    { "v850",                     MASK_V850,                             \
130                                 "Compile for the v850 processor" },     \
131    { "v850",                     -(MASK_V850 ^ MASK_CPU), "" },         \
132    { "big-switch",               MASK_BIG_SWITCH,                       \
133                                 "Use 4 byte entries in switch tables" },\
134    EXTRA_SWITCHES                                                       \
135    { "",                         TARGET_DEFAULT, ""}}
136
137 #ifndef EXTRA_SWITCHES
138 #define EXTRA_SWITCHES
139 #endif
140
141 #ifndef TARGET_DEFAULT
142 #define TARGET_DEFAULT          MASK_DEFAULT
143 #endif
144
145 /* Information about the various small memory areas.  */
146 struct small_memory_info {
147   char *name;
148   char *value;
149   long max;
150   long physical_max;
151 };
152
153 enum small_memory_type {
154   /* tiny data area, using EP as base register */
155   SMALL_MEMORY_TDA = 0,
156   /* small data area using dp as base register */
157   SMALL_MEMORY_SDA,
158   /* zero data area using r0 as base register */
159   SMALL_MEMORY_ZDA,
160   SMALL_MEMORY_max
161 };
162
163 extern struct small_memory_info small_memory[(int)SMALL_MEMORY_max];
164
165 /* This macro is similar to `TARGET_SWITCHES' but defines names of
166    command options that have values.  Its definition is an
167    initializer with a subgrouping for each command option.
168
169    Each subgrouping contains a string constant, that defines the
170    fixed part of the option name, and the address of a variable.  The
171    variable, type `char *', is set to the variable part of the given
172    option if the fixed part matches.  The actual option name is made
173    by appending `-m' to the specified name.
174
175    Here is an example which defines `-mshort-data-NUMBER'.  If the
176    given option is `-mshort-data-512', the variable `m88k_short_data'
177    will be set to the string `"512"'.
178
179           extern char *m88k_short_data;
180           #define TARGET_OPTIONS \
181            { { "short-data-", &m88k_short_data } } */
182
183 #define TARGET_OPTIONS                                                  \
184 {                                                                       \
185   { "tda=",     &small_memory[ (int)SMALL_MEMORY_TDA ].value,           \
186       "Set the max size of data eligible for the TDA area"  },          \
187   { "tda-",     &small_memory[ (int)SMALL_MEMORY_TDA ].value, "" },     \
188   { "sda=",     &small_memory[ (int)SMALL_MEMORY_SDA ].value,           \
189       "Set the max size of data eligible for the SDA area"  },          \
190   { "sda-",     &small_memory[ (int)SMALL_MEMORY_SDA ].value, "" },     \
191   { "zda=",     &small_memory[ (int)SMALL_MEMORY_ZDA ].value,           \
192       "Set the max size of data eligible for the ZDA area"  },          \
193   { "zda-",     &small_memory[ (int)SMALL_MEMORY_ZDA ].value, "" },     \
194 }
195
196 /* Sometimes certain combinations of command options do not make
197    sense on a particular target machine.  You can define a macro
198    `OVERRIDE_OPTIONS' to take account of this.  This macro, if
199    defined, is executed once just after all the command options have
200    been parsed.
201
202    Don't use this macro to turn on various extra optimizations for
203    `-O'.  That is what `OPTIMIZATION_OPTIONS' is for.  */
204 #define OVERRIDE_OPTIONS override_options ()
205
206
207 /* Show we can debug even without a frame pointer.  */
208 #define CAN_DEBUG_WITHOUT_FP
209
210 /* Some machines may desire to change what optimizations are
211    performed for various optimization levels.   This macro, if
212    defined, is executed once just after the optimization level is
213    determined and before the remainder of the command options have
214    been parsed.  Values set in this macro are used as the default
215    values for the other command line options.
216
217    LEVEL is the optimization level specified; 2 if `-O2' is
218    specified, 1 if `-O' is specified, and 0 if neither is specified.
219
220    SIZE is non-zero if `-Os' is specified, 0 otherwise.  
221
222    You should not use this macro to change options that are not
223    machine-specific.  These should uniformly selected by the same
224    optimization level on all supported machines.  Use this macro to
225    enable machine-specific optimizations.
226
227    *Do not examine `write_symbols' in this macro!* The debugging
228    options are not supposed to alter the generated code. */
229
230 #define OPTIMIZATION_OPTIONS(LEVEL,SIZE)                                \
231 {                                                                       \
232   if (LEVEL)                                                            \
233     target_flags |= (MASK_EP | MASK_PROLOG_FUNCTION);                   \
234 }
235
236 \f
237 /* Target machine storage layout */
238
239 /* Define this if most significant bit is lowest numbered
240    in instructions that operate on numbered bit-fields.
241    This is not true on the NEC V850.  */
242 #define BITS_BIG_ENDIAN 0
243
244 /* Define this if most significant byte of a word is the lowest numbered.  */
245 /* This is not true on the NEC V850.  */
246 #define BYTES_BIG_ENDIAN 0
247
248 /* Define this if most significant word of a multiword number is lowest
249    numbered.
250    This is not true on the NEC V850.  */
251 #define WORDS_BIG_ENDIAN 0
252
253 /* Number of bits in an addressable storage unit */
254 #define BITS_PER_UNIT 8
255
256 /* Width in bits of a "word", which is the contents of a machine register.
257    Note that this is not necessarily the width of data type `int';
258    if using 16-bit ints on a 68000, this would still be 32.
259    But on a machine with 16-bit registers, this would be 16.  */
260 #define BITS_PER_WORD           32
261
262 /* Width of a word, in units (bytes).  */
263 #define UNITS_PER_WORD          4
264
265 /* Width in bits of a pointer.
266    See also the macro `Pmode' defined below.  */
267 #define POINTER_SIZE            32
268
269 /* Define this macro if it is advisable to hold scalars in registers
270    in a wider mode than that declared by the program.  In such cases,
271    the value is constrained to be within the bounds of the declared
272    type, but kept valid in the wider mode.  The signedness of the
273    extension may differ from that of the type.
274
275    Some simple experiments have shown that leaving UNSIGNEDP alone
276    generates the best overall code.  */
277
278 #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE)  \
279   if (GET_MODE_CLASS (MODE) == MODE_INT \
280       && GET_MODE_SIZE (MODE) < 4)      \
281     { (MODE) = SImode; }
282
283 /* Allocation boundary (in *bits*) for storing arguments in argument list.  */
284 #define PARM_BOUNDARY           32
285
286 /* The stack goes in 32 bit lumps.  */
287 #define STACK_BOUNDARY          32
288
289 /* Allocation boundary (in *bits*) for the code of a function.
290    16 is the minimum boundary; 32 would give better performance.  */
291 #define FUNCTION_BOUNDARY 16
292
293 /* No data type wants to be aligned rounder than this.  */
294 #define BIGGEST_ALIGNMENT       32
295
296 /* Alignment of field after `int : 0' in a structure.  */
297 #define EMPTY_FIELD_BOUNDARY 32
298
299 /* No structure field wants to be aligned rounder than this.  */
300 #define BIGGEST_FIELD_ALIGNMENT 32
301
302 /* Define this if move instructions will actually fail to work
303    when given unaligned data.  */
304 #define STRICT_ALIGNMENT 1
305
306 /* Define this as 1 if `char' should by default be signed; else as 0.
307
308    On the NEC V850, loads do sign extension, so make this default. */
309 #define DEFAULT_SIGNED_CHAR 1
310
311 /* Define results of standard character escape sequences.  */
312 #define TARGET_BELL 007
313 #define TARGET_BS 010
314 #define TARGET_TAB 011
315 #define TARGET_NEWLINE 012
316 #define TARGET_VT 013
317 #define TARGET_FF 014
318 #define TARGET_CR 015
319 \f
320 /* Standard register usage.  */
321
322 /* Number of actual hardware registers.
323    The hardware registers are assigned numbers for the compiler
324    from 0 to just below FIRST_PSEUDO_REGISTER.
325
326    All registers that the compiler knows about must be given numbers,
327    even those that are not normally considered general registers.  */
328
329 #define FIRST_PSEUDO_REGISTER 34
330
331 /* 1 for registers that have pervasive standard uses
332    and are not available for the register allocator.  */
333
334 #define FIXED_REGISTERS \
335   { 1, 1, 0, 1, 1, 0, 0, 0, \
336     0, 0, 0, 0, 0, 0, 0, 0, \
337     0, 0, 0, 0, 0, 0, 0, 0, \
338     0, 0, 0, 0, 0, 0, 1, 0, \
339     1, 1}
340
341 /* 1 for registers not available across function calls.
342    These must include the FIXED_REGISTERS and also any
343    registers that can be used without being saved.
344    The latter must include the registers where values are returned
345    and the register where structure-value addresses are passed.
346    Aside from that, you can include as many other registers as you
347    like.  */
348
349 #define CALL_USED_REGISTERS \
350   { 1, 1, 0, 1, 1, 1, 1, 1, \
351     1, 1, 1, 1, 1, 1, 1, 1, \
352     1, 1, 1, 1, 0, 0, 0, 0, \
353     0, 0, 0, 0, 0, 0, 1, 1, \
354     1, 1}
355
356 /* List the order in which to allocate registers.  Each register must be
357    listed once, even those in FIXED_REGISTERS.
358
359    On the 850, we make the return registers first, then all of the volatile
360    registers, then the saved registers in reverse order to better save the
361    registers with an out of line function, and finally the fixed
362    registers.  */
363
364 #define REG_ALLOC_ORDER                                                 \
365 {                                                                       \
366   10, 11,                               /* return registers */          \
367   12, 13, 14, 15, 16, 17, 18, 19,       /* scratch registers */         \
368    6,  7,  8,  9, 31,                   /* argument registers */        \
369   29, 28, 27, 26, 25, 24, 23, 22,       /* saved registers */           \
370   21, 20,  2,                                                           \
371    0,  1,  3,  4,  5, 30, 32, 33        /* fixed registers */           \
372 }
373
374 /* Return number of consecutive hard regs needed starting at reg REGNO
375    to hold something of mode MODE.
376
377    This is ordinarily the length in words of a value of mode MODE
378    but can be less for certain modes in special long registers.  */
379
380 #define HARD_REGNO_NREGS(REGNO, MODE)   \
381   ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
382
383 /* Value is 1 if hard register REGNO can hold a value of machine-mode
384    MODE.  */
385
386 #define HARD_REGNO_MODE_OK(REGNO, MODE) \
387  ((((REGNO) & 1) == 0) || (GET_MODE_SIZE (MODE) <= 4))
388
389 /* Value is 1 if it is a good idea to tie two pseudo registers
390    when one has mode MODE1 and one has mode MODE2.
391    If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
392    for any hard reg, then this must be 0 for correct output.  */
393 #define MODES_TIEABLE_P(MODE1, MODE2) \
394   (MODE1 == MODE2 || GET_MODE_SIZE (MODE1) <= 4 && GET_MODE_SIZE (MODE2) <= 4)
395
396 \f
397 /* Define the classes of registers for register constraints in the
398    machine description.  Also define ranges of constants.
399
400    One of the classes must always be named ALL_REGS and include all hard regs.
401    If there is more than one class, another class must be named NO_REGS
402    and contain no registers.
403
404    The name GENERAL_REGS must be the name of a class (or an alias for
405    another name such as ALL_REGS).  This is the class of registers
406    that is allowed by "g" or "r" in a register constraint.
407    Also, registers outside this class are allocated only when
408    instructions express preferences for them.
409
410    The classes must be numbered in nondecreasing order; that is,
411    a larger-numbered class must never be contained completely
412    in a smaller-numbered class.
413
414    For any two classes, it is very desirable that there be another
415    class that represents their union.  */
416    
417 enum reg_class
418 {
419   NO_REGS, GENERAL_REGS, ALL_REGS, LIM_REG_CLASSES
420 };
421
422 #define N_REG_CLASSES (int) LIM_REG_CLASSES
423
424 /* Give names of register classes as strings for dump file.   */
425
426 #define REG_CLASS_NAMES \
427 { "NO_REGS", "GENERAL_REGS", "ALL_REGS", "LIM_REGS" }
428
429 /* Define which registers fit in which classes.
430    This is an initializer for a vector of HARD_REG_SET
431    of length N_REG_CLASSES.  */
432
433 #define REG_CLASS_CONTENTS                      \
434 {  0x00000000,          /* No regs      */      \
435    0xffffffff,          /* GENERAL_REGS */      \
436    0xffffffff,          /* ALL_REGS     */      \
437 }
438
439 /* The same information, inverted:
440    Return the class number of the smallest class containing
441    reg number REGNO.  This could be a conditional expression
442    or could index an array.  */
443
444 #define REGNO_REG_CLASS(REGNO)  GENERAL_REGS
445
446 /* The class value for index registers, and the one for base regs.  */
447
448 #define INDEX_REG_CLASS NO_REGS
449 #define BASE_REG_CLASS  GENERAL_REGS
450
451 /* Get reg_class from a letter such as appears in the machine description.  */
452
453 #define REG_CLASS_FROM_LETTER(C) (NO_REGS)
454
455 /* Macros to check register numbers against specific register classes.  */
456
457 /* These assume that REGNO is a hard or pseudo reg number.
458    They give nonzero only if REGNO is a hard reg of the suitable class
459    or a pseudo reg currently allocated to a suitable hard reg.
460    Since they use reg_renumber, they are safe only once reg_renumber
461    has been allocated, which happens in local-alloc.c.  */
462  
463 #define REGNO_OK_FOR_BASE_P(regno) \
464   ((regno) < FIRST_PSEUDO_REGISTER || reg_renumber[regno] >= 0)
465
466 #define REGNO_OK_FOR_INDEX_P(regno) 0
467
468 /* Given an rtx X being reloaded into a reg required to be
469    in class CLASS, return the class of reg to actually use.
470    In general this is just CLASS; but on some machines
471    in some cases it is preferable to use a more restrictive class.  */
472
473 #define PREFERRED_RELOAD_CLASS(X,CLASS)  (CLASS)
474
475 /* Return the maximum number of consecutive registers
476    needed to represent mode MODE in a register of class CLASS.  */
477
478 #define CLASS_MAX_NREGS(CLASS, MODE)    \
479   ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
480
481 /* The letters I, J, K, L, M, N, O, P in a register constraint string
482    can be used to stand for particular ranges of immediate operands.
483    This macro defines what the ranges are.
484    C is the letter, and VALUE is a constant value.
485    Return 1 if VALUE is in the range specified by C.  */
486
487 #define INT_7_BITS(VALUE) ((unsigned) (VALUE) + 0x40 < 0x80)
488 #define INT_8_BITS(VALUE) ((unsigned) (VALUE) + 0x80 < 0x100)
489 /* zero */
490 #define CONST_OK_FOR_I(VALUE) ((VALUE) == 0)
491 /* 5 bit signed immediate */
492 #define CONST_OK_FOR_J(VALUE) ((unsigned) (VALUE) + 0x10 < 0x20)
493 /* 16 bit signed immediate */
494 #define CONST_OK_FOR_K(VALUE) ((unsigned) (VALUE) + 0x8000 < 0x10000)
495 /* valid constant for movhi instruction.  */
496 #define CONST_OK_FOR_L(VALUE) \
497   (((unsigned) ((int) (VALUE) >> 16) + 0x8000 < 0x10000) \
498    && CONST_OK_FOR_I ((VALUE & 0xffff)))
499 /* 16 bit unsigned immediate */
500 #define CONST_OK_FOR_M(VALUE) ((unsigned)(VALUE) < 0x10000)
501 /* 5 bit unsigned immediate in shift instructions */
502 #define CONST_OK_FOR_N(VALUE) ((unsigned) (VALUE) <= 31)
503
504 #define CONST_OK_FOR_O(VALUE) 0
505 #define CONST_OK_FOR_P(VALUE) 0
506
507
508 #define CONST_OK_FOR_LETTER_P(VALUE, C)  \
509   ((C) == 'I' ? CONST_OK_FOR_I (VALUE) : \
510    (C) == 'J' ? CONST_OK_FOR_J (VALUE) : \
511    (C) == 'K' ? CONST_OK_FOR_K (VALUE) : \
512    (C) == 'L' ? CONST_OK_FOR_L (VALUE) : \
513    (C) == 'M' ? CONST_OK_FOR_M (VALUE) : \
514    (C) == 'N' ? CONST_OK_FOR_N (VALUE) : \
515    (C) == 'O' ? CONST_OK_FOR_O (VALUE) : \
516    (C) == 'P' ? CONST_OK_FOR_P (VALUE) : \
517    0)
518
519 /* Similar, but for floating constants, and defining letters G and H.
520    Here VALUE is the CONST_DOUBLE rtx itself. 
521      
522   `G' is a zero of some form.  */
523
524 #define CONST_DOUBLE_OK_FOR_G(VALUE)                                    \
525   ((GET_MODE_CLASS (GET_MODE (VALUE)) == MODE_FLOAT                     \
526     && (VALUE) == CONST0_RTX (GET_MODE (VALUE)))                        \
527    || (GET_MODE_CLASS (GET_MODE (VALUE)) == MODE_INT                    \
528        && CONST_DOUBLE_LOW (VALUE) == 0                                 \
529        && CONST_DOUBLE_HIGH (VALUE) == 0))
530
531 #define CONST_DOUBLE_OK_FOR_H(VALUE) 0
532
533 #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)                          \
534   ((C) == 'G'   ? CONST_DOUBLE_OK_FOR_G (VALUE)                         \
535    : (C) == 'H' ? CONST_DOUBLE_OK_FOR_H (VALUE)                         \
536    : 0)
537
538 \f
539 /* Stack layout; function entry, exit and calling.  */
540
541 /* Define this if pushing a word on the stack
542    makes the stack pointer a smaller address.  */
543
544 #define STACK_GROWS_DOWNWARD
545
546 /* Define this if the nominal address of the stack frame
547    is at the high-address end of the local variables;
548    that is, each additional local variable allocated
549    goes at a more negative offset in the frame.  */
550
551 #define FRAME_GROWS_DOWNWARD
552
553 /* Offset within stack frame to start allocating local variables at.
554    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
555    first local allocated.  Otherwise, it is the offset to the BEGINNING
556    of the first local allocated.  */
557
558 #define STARTING_FRAME_OFFSET 0
559
560 /* Offset of first parameter from the argument pointer register value.  */
561 /* Is equal to the size of the saved fp + pc, even if an fp isn't
562    saved since the value is used before we know.  */
563
564 #define FIRST_PARM_OFFSET(FNDECL) 0
565
566 /* Specify the registers used for certain standard purposes.
567    The values of these macros are register numbers.  */
568
569 /* Register to use for pushing function arguments.  */
570 #define STACK_POINTER_REGNUM 3
571
572 /* Base register for access to local variables of the function.  */
573 #define FRAME_POINTER_REGNUM 32
574
575 /* Register containing return address from latest function call.  */
576 #define LINK_POINTER_REGNUM 31
577      
578 /* On some machines the offset between the frame pointer and starting
579    offset of the automatic variables is not known until after register
580    allocation has been done (for example, because the saved registers
581    are between these two locations).  On those machines, define
582    `FRAME_POINTER_REGNUM' the number of a special, fixed register to
583    be used internally until the offset is known, and define
584    `HARD_FRAME_POINTER_REGNUM' to be actual the hard register number
585    used for the frame pointer.
586
587    You should define this macro only in the very rare circumstances
588    when it is not possible to calculate the offset between the frame
589    pointer and the automatic variables until after register
590    allocation has been completed.  When this macro is defined, you
591    must also indicate in your definition of `ELIMINABLE_REGS' how to
592    eliminate `FRAME_POINTER_REGNUM' into either
593    `HARD_FRAME_POINTER_REGNUM' or `STACK_POINTER_REGNUM'.
594
595    Do not define this macro if it would be the same as
596    `FRAME_POINTER_REGNUM'. */
597 #undef  HARD_FRAME_POINTER_REGNUM 
598 #define HARD_FRAME_POINTER_REGNUM 29
599
600 /* Base register for access to arguments of the function.  */
601 #define ARG_POINTER_REGNUM 33
602
603 /* Register in which static-chain is passed to a function.  */
604 #define STATIC_CHAIN_REGNUM 20
605
606 /* Value should be nonzero if functions must have frame pointers.
607    Zero means the frame pointer need not be set up (and parms
608    may be accessed via the stack pointer) in functions that seem suitable.
609    This is computed in `reload', in reload1.c.  */
610 #define FRAME_POINTER_REQUIRED 0
611
612 /* If defined, this macro specifies a table of register pairs used to
613    eliminate unneeded registers that point into the stack frame.  If
614    it is not defined, the only elimination attempted by the compiler
615    is to replace references to the frame pointer with references to
616    the stack pointer.
617
618    The definition of this macro is a list of structure
619    initializations, each of which specifies an original and
620    replacement register.
621
622    On some machines, the position of the argument pointer is not
623    known until the compilation is completed.  In such a case, a
624    separate hard register must be used for the argument pointer.
625    This register can be eliminated by replacing it with either the
626    frame pointer or the argument pointer, depending on whether or not
627    the frame pointer has been eliminated.
628
629    In this case, you might specify:
630         #define ELIMINABLE_REGS  \
631         {{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
632          {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \
633          {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}}
634
635    Note that the elimination of the argument pointer with the stack
636    pointer is specified first since that is the preferred elimination. */
637
638 #define ELIMINABLE_REGS                                                 \
639 {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM },                        \
640  { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM },                   \
641  { ARG_POINTER_REGNUM,   STACK_POINTER_REGNUM },                        \
642  { ARG_POINTER_REGNUM,   HARD_FRAME_POINTER_REGNUM }}                   \
643
644 /* A C expression that returns non-zero if the compiler is allowed to
645    try to replace register number FROM-REG with register number
646    TO-REG.  This macro need only be defined if `ELIMINABLE_REGS' is
647    defined, and will usually be the constant 1, since most of the
648    cases preventing register elimination are things that the compiler
649    already knows about. */
650
651 #define CAN_ELIMINATE(FROM, TO) \
652  ((TO) == STACK_POINTER_REGNUM ? ! frame_pointer_needed : 1)
653
654 /* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'.  It
655    specifies the initial difference between the specified pair of
656    registers.  This macro must be defined if `ELIMINABLE_REGS' is
657    defined. */
658
659 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET)                    \
660 {                                                                       \
661   if ((FROM) == FRAME_POINTER_REGNUM)                                   \
662     (OFFSET) = get_frame_size () + current_function_outgoing_args_size; \
663   else if ((FROM) == ARG_POINTER_REGNUM)                                \
664    (OFFSET) = compute_frame_size (get_frame_size (), (long *)0);        \
665   else                                                                  \
666     abort ();                                                           \
667 }
668
669 /* A guess for the V850.  */
670 #define PROMOTE_PROTOTYPES 1
671
672 /* Keep the stack pointer constant throughout the function.  */
673 #define ACCUMULATE_OUTGOING_ARGS
674
675 /* Value is the number of bytes of arguments automatically
676    popped when returning from a subroutine call.
677    FUNDECL is the declaration node of the function (as a tree),
678    FUNTYPE is the data type of the function (as a tree),
679    or for a library call it is an identifier node for the subroutine name.
680    SIZE is the number of bytes of arguments passed on the stack.  */
681
682 #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0
683
684 \f
685 /* Define a data type for recording info about an argument list
686    during the scan of that argument list.  This data type should
687    hold all necessary information about the function itself
688    and about the args processed so far, enough to enable macros
689    such as FUNCTION_ARG to determine where the next arg should go.  */
690
691 #define CUMULATIVE_ARGS struct cum_arg
692 struct cum_arg { int nbytes; };
693
694 /* Define where to put the arguments to a function.
695    Value is zero to push the argument on the stack,
696    or a hard register in which to store the argument.
697
698    MODE is the argument's machine mode.
699    TYPE is the data type of the argument (as a tree).
700     This is null for libcalls where that information may
701     not be available.
702    CUM is a variable of type CUMULATIVE_ARGS which gives info about
703     the preceding args and about the function being called.
704    NAMED is nonzero if this argument is a named parameter
705     (otherwise it is an extra parameter matching an ellipsis).  */
706
707 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
708   function_arg (&CUM, MODE, TYPE, NAMED)
709
710 #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) \
711   function_arg_partial_nregs (&CUM, MODE, TYPE, NAMED)
712
713 /* Initialize a variable CUM of type CUMULATIVE_ARGS
714    for a call to a function whose data type is FNTYPE.
715    For a library call, FNTYPE is 0.  */
716
717 #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT)       \
718  ((CUM).nbytes = 0)
719
720 /* Update the data in CUM to advance over an argument
721    of mode MODE and data type TYPE.
722    (TYPE is null for libcalls where that information may not be available.)  */
723
724 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)    \
725  ((CUM).nbytes += ((MODE) != BLKmode                    \
726   ? (GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) & -UNITS_PER_WORD       \
727   : (int_size_in_bytes (TYPE) + UNITS_PER_WORD - 1) & -UNITS_PER_WORD))
728
729 /* When a parameter is passed in a register, stack space is still
730    allocated for it.  */
731 #define REG_PARM_STACK_SPACE(DECL) (!TARGET_GHS ? 16 : 0)
732
733 /* Define this if the above stack space is to be considered part of the
734    space allocated by the caller.  */
735 #define OUTGOING_REG_PARM_STACK_SPACE
736
737 extern int current_function_anonymous_args;
738 /* Do any setup necessary for varargs/stdargs functions.  */
739 #define SETUP_INCOMING_VARARGS(CUM, MODE, TYPE, PAS, SECOND) \
740   current_function_anonymous_args = (!TARGET_GHS ? 1 : 0);
741
742 #define FUNCTION_ARG_PASS_BY_REFERENCE(CUM, MODE, TYPE, NAMED)          \
743   ((TYPE) && int_size_in_bytes (TYPE) > 8)
744  
745 #define FUNCTION_ARG_CALLEE_COPIES(CUM, MODE, TYPE, NAMED) \
746   ((TYPE) && int_size_in_bytes (TYPE) > 8)
747
748 /* 1 if N is a possible register number for function argument passing.  */
749
750 #define FUNCTION_ARG_REGNO_P(N) (N >= 6 && N <= 9)
751
752 /* Define how to find the value returned by a function.
753    VALTYPE is the data type of the value (as a tree).
754    If the precise function being called is known, FUNC is its FUNCTION_DECL;
755    otherwise, FUNC is 0.   */
756    
757 #define FUNCTION_VALUE(VALTYPE, FUNC) \
758   gen_rtx (REG, TYPE_MODE (VALTYPE), 10)
759
760 /* Define how to find the value returned by a library function
761    assuming the value has mode MODE.  */
762
763 #define LIBCALL_VALUE(MODE) \
764   gen_rtx (REG, MODE, 10)
765
766 /* 1 if N is a possible register number for a function value.  */
767
768 #define FUNCTION_VALUE_REGNO_P(N) ((N) == 10)
769
770 /* Return values > 8 bytes in length in memory.  */
771 #define DEFAULT_PCC_STRUCT_RETURN 0
772 #define RETURN_IN_MEMORY(TYPE)  \
773   (int_size_in_bytes (TYPE) > 8 || TYPE_MODE (TYPE) == BLKmode)
774
775 /* Register in which address to store a structure value
776    is passed to a function.  On the V850 it's passed as
777    the first parameter.  */
778
779 #define STRUCT_VALUE 0
780
781 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
782    the stack pointer does not matter.  The value is tested only in
783    functions that have frame pointers.
784    No definition is equivalent to always zero.  */
785
786 #define EXIT_IGNORE_STACK 1
787
788 /* Output assembler code to FILE to increment profiler label # LABELNO
789    for profiling a function entry.  */
790
791 #define FUNCTION_PROFILER(FILE, LABELNO) ;
792
793 #define TRAMPOLINE_TEMPLATE(FILE)                       \
794   do {                                                  \
795     fprintf (FILE, "\tjarl .+4,r12\n");                 \
796     fprintf (FILE, "\tld.w 12[r12],r5\n");              \
797     fprintf (FILE, "\tld.w 16[r12],r12\n");             \
798     fprintf (FILE, "\tjmp [r12]\n");                    \
799     fprintf (FILE, "\tnop\n");                          \
800     fprintf (FILE, "\t.long 0\n");                      \
801     fprintf (FILE, "\t.long 0\n");                      \
802   } while (0)
803
804 /* Length in units of the trampoline for entering a nested function.  */
805
806 #define TRAMPOLINE_SIZE 24
807
808 /* Emit RTL insns to initialize the variable parts of a trampoline.
809    FNADDR is an RTX for the address of the function's pure code.
810    CXT is an RTX for the static chain value for the function.  */
811
812 #define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT)                       \
813 {                                                                       \
814   emit_move_insn (gen_rtx (MEM, SImode, plus_constant ((TRAMP), 16)),   \
815                  (CXT));                                                \
816   emit_move_insn (gen_rtx (MEM, SImode, plus_constant ((TRAMP), 20)),   \
817                  (FNADDR));                                             \
818 }
819
820 /* Addressing modes, and classification of registers for them.  */
821
822 \f
823 /* 1 if X is an rtx for a constant that is a valid address.  */
824
825 /* ??? This seems too exclusive.  May get better code by accepting more
826    possibilities here, in particular, should accept ZDA_NAME SYMBOL_REFs.  */
827
828 #define CONSTANT_ADDRESS_P(X)   \
829   (GET_CODE (X) == CONST_INT                            \
830    && CONST_OK_FOR_K (INTVAL (X)))
831
832 /* Maximum number of registers that can appear in a valid memory address.  */
833
834 #define MAX_REGS_PER_ADDRESS 1
835
836 /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
837    and check its validity for a certain class.
838    We have two alternate definitions for each of them.
839    The usual definition accepts all pseudo regs; the other rejects
840    them unless they have been allocated suitable hard regs.
841    The symbol REG_OK_STRICT causes the latter definition to be used.
842
843    Most source files want to accept pseudo regs in the hope that
844    they will get allocated to the class that the insn wants them to be in.
845    Source files for reload pass need to be strict.
846    After reload, it makes no difference, since pseudo regs have
847    been eliminated by then.  */
848
849 #ifndef REG_OK_STRICT
850
851 /* Nonzero if X is a hard reg that can be used as an index
852    or if it is a pseudo reg.  */
853 #define REG_OK_FOR_INDEX_P(X) 0
854 /* Nonzero if X is a hard reg that can be used as a base reg
855    or if it is a pseudo reg.  */
856 #define REG_OK_FOR_BASE_P(X) 1
857 #define REG_OK_FOR_INDEX_P_STRICT(X) 0
858 #define REG_OK_FOR_BASE_P_STRICT(X) REGNO_OK_FOR_BASE_P (REGNO (X))
859 #define STRICT 0
860
861 #else
862
863 /* Nonzero if X is a hard reg that can be used as an index.  */
864 #define REG_OK_FOR_INDEX_P(X) 0
865 /* Nonzero if X is a hard reg that can be used as a base reg.  */
866 #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))
867 #define STRICT 1
868
869 #endif
870
871 /* A C expression that defines the optional machine-dependent
872    constraint letters that can be used to segregate specific types of
873    operands, usually memory references, for the target machine.
874    Normally this macro will not be defined.  If it is required for a
875    particular target machine, it should return 1 if VALUE corresponds
876    to the operand type represented by the constraint letter C.  If C
877    is not defined as an extra constraint, the value returned should
878    be 0 regardless of VALUE.
879
880    For example, on the ROMP, load instructions cannot have their
881    output in r0 if the memory reference contains a symbolic address.
882    Constraint letter `Q' is defined as representing a memory address
883    that does *not* contain a symbolic address.  An alternative is
884    specified with a `Q' constraint on the input and `r' on the
885    output.  The next alternative specifies `m' on the input and a
886    register class that does not include r0 on the output.  */
887
888 #define EXTRA_CONSTRAINT(OP, C)                                         \
889  ((C) == 'Q'   ? ep_memory_operand (OP, GET_MODE (OP))                  \
890   : (C) == 'R' ? special_symbolref_operand (OP, VOIDmode)               \
891   : (C) == 'S' ? (GET_CODE (OP) == SYMBOL_REF && ! ZDA_NAME_P (XSTR (OP, 0))) \
892   : (C) == 'T' ? 0                                                      \
893   : (C) == 'U' ? ((GET_CODE (OP) == SYMBOL_REF && ZDA_NAME_P (XSTR (OP, 0))) \
894                   || (GET_CODE (OP) == CONST                            \
895                       && GET_CODE (XEXP (OP, 0)) == PLUS                \
896                       && GET_CODE (XEXP (XEXP (OP, 0), 0)) == SYMBOL_REF \
897                       && ZDA_NAME_P (XSTR (XEXP (XEXP (OP, 0), 0), 0)))) \
898   : 0)
899 \f
900 /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
901    that is a valid memory address for an instruction.
902    The MODE argument is the machine mode for the MEM expression
903    that wants to use this address.
904
905    The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS,
906    except for CONSTANT_ADDRESS_P which is actually
907    machine-independent.  */
908
909 /* Accept either REG or SUBREG where a register is valid.  */
910   
911 #define RTX_OK_FOR_BASE_P(X)                                            \
912   ((REG_P (X) && REG_OK_FOR_BASE_P (X))                                 \
913    || (GET_CODE (X) == SUBREG && REG_P (SUBREG_REG (X))                 \
914        && REG_OK_FOR_BASE_P (SUBREG_REG (X))))
915
916 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)                         \
917 do {                                                                    \
918   if (RTX_OK_FOR_BASE_P (X)) goto ADDR;                                 \
919   if (CONSTANT_ADDRESS_P (X)                                            \
920       && (MODE == QImode || INTVAL (X) % 2 == 0))                       \
921     goto ADDR;                                                          \
922   if (GET_CODE (X) == LO_SUM                                            \
923       && GET_CODE (XEXP (X, 0)) == REG                                  \
924       && REG_OK_FOR_BASE_P (XEXP (X, 0))                                \
925       && CONSTANT_P (XEXP (X, 1))                                       \
926       && (GET_CODE (XEXP (X, 1)) != CONST_INT                           \
927           || ((MODE == QImode || INTVAL (XEXP (X, 1)) % 2 == 0)         \
928               && CONST_OK_FOR_K (INTVAL (XEXP (X, 1)))))                \
929       && GET_MODE_SIZE (MODE) <= GET_MODE_SIZE (word_mode))             \
930     goto ADDR;                                                          \
931   if (special_symbolref_operand (X, MODE)                               \
932       && (GET_MODE_SIZE (MODE) <= GET_MODE_SIZE (word_mode)))           \
933      goto ADDR;                                                         \
934   if (GET_CODE (X) == PLUS                                              \
935       && CONSTANT_ADDRESS_P (XEXP (X, 1))                               \
936       && (MODE == QImode || INTVAL (XEXP (X, 1)) % 2 == 0)              \
937       && RTX_OK_FOR_BASE_P (XEXP (X, 0))) goto ADDR;                    \
938 } while (0)
939
940 \f
941 /* Try machine-dependent ways of modifying an illegitimate address
942    to be legitimate.  If we find one, return the new, valid address.
943    This macro is used in only one place: `memory_address' in explow.c.
944
945    OLDX is the address as it was before break_out_memory_refs was called.
946    In some cases it is useful to look at this to decide what needs to be done.
947
948    MODE and WIN are passed so that this macro can use
949    GO_IF_LEGITIMATE_ADDRESS.
950
951    It is always safe for this macro to do nothing.  It exists to recognize
952    opportunities to optimize the output.   */
953
954 #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN)  {}
955
956 /* Go to LABEL if ADDR (a legitimate address expression)
957    has an effect that depends on the machine mode it is used for.  */
958
959 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)  {}
960
961 /* Nonzero if the constant value X is a legitimate general operand.
962    It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE.  */
963
964 #define LEGITIMATE_CONSTANT_P(X)                                        \
965   (GET_CODE (X) == CONST_DOUBLE                                         \
966    || !(GET_CODE (X) == CONST                                           \
967         && GET_CODE (XEXP (X, 0)) == PLUS                               \
968         && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF               \
969         && GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT                \
970         && ! CONST_OK_FOR_K (INTVAL (XEXP (XEXP (X, 0), 1)))))
971
972 /* In rare cases, correct code generation requires extra machine
973    dependent processing between the second jump optimization pass and
974    delayed branch scheduling.  On those machines, define this macro
975    as a C statement to act on the code starting at INSN.  */
976
977 #define MACHINE_DEPENDENT_REORG(INSN) v850_reorg (INSN)
978
979 \f
980 /* Tell final.c how to eliminate redundant test instructions.  */
981
982 /* Here we define machine-dependent flags and fields in cc_status
983    (see `conditions.h').  No extra ones are needed for the vax.  */
984
985 /* Store in cc_status the expressions
986    that the condition codes will describe
987    after execution of an instruction whose pattern is EXP.
988    Do not alter them if the instruction would not alter the cc's.  */
989
990 #define CC_OVERFLOW_UNUSABLE 0x200
991 #define CC_NO_CARRY CC_NO_OVERFLOW
992 #define NOTICE_UPDATE_CC(EXP, INSN) notice_update_cc(EXP, INSN)
993
994 /* A part of a C `switch' statement that describes the relative costs
995    of constant RTL expressions.  It must contain `case' labels for
996    expression codes `const_int', `const', `symbol_ref', `label_ref'
997    and `const_double'.  Each case must ultimately reach a `return'
998    statement to return the relative cost of the use of that kind of
999    constant value in an expression.  The cost may depend on the
1000    precise value of the constant, which is available for examination
1001    in X, and the rtx code of the expression in which it is contained,
1002    found in OUTER_CODE.
1003
1004    CODE is the expression code--redundant, since it can be obtained
1005    with `GET_CODE (X)'. */
1006
1007 #define CONST_COSTS(RTX,CODE,OUTER_CODE)                                \
1008   case CONST_INT:                                                       \
1009   case CONST_DOUBLE:                                                    \
1010   case CONST:                                                           \
1011   case SYMBOL_REF:                                                      \
1012   case LABEL_REF:                                                       \
1013     {                                                                   \
1014       int _zxy = const_costs(RTX, CODE);                                \
1015       return (_zxy) ? COSTS_N_INSNS (_zxy) : 0;                         \
1016     }
1017
1018 /* A crude cut at RTX_COSTS for the V850.  */
1019
1020 /* Provide the costs of a rtl expression.  This is in the body of a
1021    switch on CODE. 
1022
1023    There aren't DImode MOD, DIV or MULT operations, so call them
1024    very expensive.  Everything else is pretty much a constant cost.  */
1025
1026 #define RTX_COSTS(RTX,CODE,OUTER_CODE)                                  \
1027   case MOD:                                                             \
1028   case DIV:                                                             \
1029     return 60;                                                          \
1030   case MULT:                                                            \
1031     return 20;
1032
1033 /* All addressing modes have the same cost on the V850 series.  */
1034 #define ADDRESS_COST(ADDR) 1
1035
1036 /* Nonzero if access to memory by bytes or half words is no faster
1037    than accessing full words.  */
1038 #define SLOW_BYTE_ACCESS 1
1039
1040 /* Define this if zero-extension is slow (more than one real instruction).  */
1041 #define SLOW_ZERO_EXTEND 
1042
1043 /* According expr.c, a value of around 6 should minimize code size, and
1044    for the V850 series, that's our primary concern.  */
1045 #define MOVE_RATIO 6
1046
1047 /* Indirect calls are expensive, never turn a direct call
1048    into an indirect call.  */
1049 #define NO_FUNCTION_CSE
1050
1051 /* The four different data regions on the v850.  */
1052 typedef enum 
1053 {
1054   DATA_AREA_NORMAL,
1055   DATA_AREA_SDA,
1056   DATA_AREA_TDA,
1057   DATA_AREA_ZDA
1058 } v850_data_area;
1059
1060 /* A list of names for sections other than the standard two, which are
1061    `in_text' and `in_data'.  You need not define this macro on a
1062    system with no other sections (that GCC needs to use).  */
1063 #undef  EXTRA_SECTIONS
1064 #define EXTRA_SECTIONS in_tdata, in_sdata, in_zdata, in_const, in_ctors, \
1065 in_dtors, in_rozdata, in_rosdata, in_sbss, in_zbss, in_zcommon, in_scommon
1066
1067 /* One or more functions to be defined in `varasm.c'.  These
1068    functions should do jobs analogous to those of `text_section' and
1069    `data_section', for your additional sections.  Do not define this
1070    macro if you do not define `EXTRA_SECTIONS'. */
1071 #undef  EXTRA_SECTION_FUNCTIONS
1072
1073 /* This could be done a lot more cleanly using ANSI C ... */
1074 #define EXTRA_SECTION_FUNCTIONS                                         \
1075 CONST_SECTION_FUNCTION                                                  \
1076 CTORS_SECTION_FUNCTION                                                  \
1077 DTORS_SECTION_FUNCTION                                                  \
1078                                                                         \
1079 void                                                                    \
1080 sdata_section ()                                                        \
1081 {                                                                       \
1082   if (in_section != in_sdata)                                           \
1083     {                                                                   \
1084       fprintf (asm_out_file, "%s\n", SDATA_SECTION_ASM_OP);             \
1085       in_section = in_sdata;                                            \
1086     }                                                                   \
1087 }                                                                       \
1088                                                                         \
1089 void                                                                    \
1090 rosdata_section ()                                                      \
1091 {                                                                       \
1092   if (in_section != in_rosdata)                                         \
1093     {                                                                   \
1094       fprintf (asm_out_file, "%s\n", ROSDATA_SECTION_ASM_OP);           \
1095       in_section = in_sdata;                                            \
1096     }                                                                   \
1097 }                                                                       \
1098                                                                         \
1099 void                                                                    \
1100 sbss_section ()                                                         \
1101 {                                                                       \
1102   if (in_section != in_sbss)                                            \
1103     {                                                                   \
1104       fprintf (asm_out_file, "%s\n", SBSS_SECTION_ASM_OP);              \
1105       in_section = in_sbss;                                             \
1106     }                                                                   \
1107 }                                                                       \
1108                                                                         \
1109 void                                                                    \
1110 tdata_section ()                                                        \
1111 {                                                                       \
1112   if (in_section != in_tdata)                                           \
1113     {                                                                   \
1114       fprintf (asm_out_file, "%s\n", TDATA_SECTION_ASM_OP);             \
1115       in_section = in_tdata;                                            \
1116     }                                                                   \
1117 }                                                                       \
1118                                                                         \
1119 void                                                                    \
1120 zdata_section ()                                                        \
1121 {                                                                       \
1122   if (in_section != in_zdata)                                           \
1123     {                                                                   \
1124       fprintf (asm_out_file, "%s\n", ZDATA_SECTION_ASM_OP);             \
1125       in_section = in_zdata;                                            \
1126     }                                                                   \
1127 }                                                                       \
1128                                                                         \
1129 void                                                                    \
1130 rozdata_section ()                                                      \
1131 {                                                                       \
1132   if (in_section != in_rozdata)                                         \
1133     {                                                                   \
1134       fprintf (asm_out_file, "%s\n", ROZDATA_SECTION_ASM_OP);           \
1135       in_section = in_rozdata;                                          \
1136     }                                                                   \
1137 }                                                                       \
1138                                                                         \
1139 void                                                                    \
1140 zbss_section ()                                                         \
1141 {                                                                       \
1142   if (in_section != in_zbss)                                            \
1143     {                                                                   \
1144       fprintf (asm_out_file, "%s\n", ZBSS_SECTION_ASM_OP);              \
1145       in_section = in_zbss;                                             \
1146     }                                                                   \
1147 }
1148
1149 #define TEXT_SECTION_ASM_OP  "\t.section .text"
1150 #define DATA_SECTION_ASM_OP  "\t.section .data"
1151 #define BSS_SECTION_ASM_OP   "\t.section .bss"
1152 #define SDATA_SECTION_ASM_OP "\t.section .sdata,\"aw\""
1153 #define SBSS_SECTION_ASM_OP  "\t.section .sbss,\"aw\""
1154 #define ZDATA_SECTION_ASM_OP "\t.section .zdata,\"aw\""
1155 #define ZBSS_SECTION_ASM_OP  "\t.section .zbss,\"aw\""
1156 #define TDATA_SECTION_ASM_OP "\t.section .tdata,\"aw\""
1157 #define ROSDATA_SECTION_ASM_OP "\t.section .rosdata,\"a\""
1158 #define ROZDATA_SECTION_ASM_OP "\t.section .rozdata,\"a\""
1159
1160 #define SCOMMON_ASM_OP         ".scomm"
1161 #define ZCOMMON_ASM_OP         ".zcomm"
1162 #define TCOMMON_ASM_OP         ".tcomm"
1163
1164 /* A C statement or statements to switch to the appropriate section
1165    for output of EXP.  You can assume that EXP is either a `VAR_DECL'
1166    node or a constant of some sort.  RELOC indicates whether the
1167    initial value of EXP requires link-time relocations.  Select the
1168    section by calling `text_section' or one of the alternatives for
1169    other sections.
1170
1171    Do not define this macro if you put all read-only variables and
1172    constants in the read-only data section (usually the text section).  */
1173 #undef  SELECT_SECTION
1174 #define SELECT_SECTION(EXP, RELOC)                                      \
1175 do {                                                                    \
1176   if (TREE_CODE (EXP) == VAR_DECL)                                      \
1177     {                                                                   \
1178       int is_const;                                                     \
1179       if (!TREE_READONLY (EXP)                                          \
1180           || TREE_SIDE_EFFECTS (EXP)                                    \
1181           || !DECL_INITIAL (EXP)                                        \
1182           || (DECL_INITIAL (EXP) != error_mark_node                     \
1183               && !TREE_CONSTANT (DECL_INITIAL (EXP))))                  \
1184         is_const = FALSE;                                               \
1185       else                                                              \
1186         is_const = TRUE;                                                \
1187                                                                         \
1188       switch (v850_get_data_area (EXP))                                 \
1189         {                                                               \
1190         case DATA_AREA_ZDA:                                             \
1191           if (is_const)                                                 \
1192             rozdata_section ();                                         \
1193           else                                                          \
1194             zdata_section ();                                           \
1195           break;                                                        \
1196                                                                         \
1197         case DATA_AREA_TDA:                                             \
1198           tdata_section ();                                             \
1199           break;                                                        \
1200                                                                         \
1201         case DATA_AREA_SDA:                                             \
1202           if (is_const)                                                 \
1203             rosdata_section ();                                         \
1204           else                                                          \
1205             sdata_section ();                                           \
1206           break;                                                        \
1207                                                                         \
1208         default:                                                        \
1209           if (is_const)                                                 \
1210             const_section ();                                           \
1211           else                                                          \
1212             data_section ();                                            \
1213           break;                                                        \
1214         }                                                               \
1215     }                                                                   \
1216   else if (TREE_CODE (EXP) == STRING_CST)                               \
1217     {                                                                   \
1218       if (! flag_writable_strings)                                      \
1219         const_section ();                                               \
1220       else                                                              \
1221         data_section ();                                                \
1222     }                                                                   \
1223                                                                         \
1224   else                                                                  \
1225     const_section ();                                                   \
1226                                                                         \
1227 } while (0)
1228
1229 /* A C statement or statements to switch to the appropriate section
1230    for output of RTX in mode MODE.  You can assume that RTX is some
1231    kind of constant in RTL.  The argument MODE is redundant except in
1232    the case of a `const_int' rtx.  Select the section by calling
1233    `text_section' or one of the alternatives for other sections.
1234
1235    Do not define this macro if you put all constants in the read-only
1236    data section.  */
1237 /* #define SELECT_RTX_SECTION(MODE, RTX) */
1238
1239 /* Output at beginning/end of assembler file.  */
1240 #undef ASM_FILE_START
1241 #define ASM_FILE_START(FILE) asm_file_start(FILE)
1242
1243 #define ASM_COMMENT_START "#"
1244
1245 /* Output to assembler file text saying following lines
1246    may contain character constants, extra white space, comments, etc.  */
1247
1248 #define ASM_APP_ON "#APP\n"
1249
1250 /* Output to assembler file text saying following lines
1251    no longer contain unusual constructs.  */
1252
1253 #define ASM_APP_OFF "#NO_APP\n"
1254
1255 /* This is how to output an assembler line defining a `double' constant.
1256    It is .double or .float, depending.  */
1257
1258 #define ASM_OUTPUT_DOUBLE(FILE, VALUE)                  \
1259 do { char dstr[30];                                     \
1260      REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr);    \
1261      fprintf (FILE, "\t.double %s\n", dstr);            \
1262    } while (0)
1263
1264
1265 /* This is how to output an assembler line defining a `float' constant.  */
1266 #define ASM_OUTPUT_FLOAT(FILE, VALUE)                   \
1267 do { char dstr[30];                                     \
1268      REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr);    \
1269      fprintf (FILE, "\t.float %s\n", dstr);             \
1270    } while (0)
1271
1272 /* This is how to output an assembler line defining an `int' constant.  */
1273
1274 #define ASM_OUTPUT_INT(FILE, VALUE)             \
1275 ( fprintf (FILE, "\t.long "),                   \
1276   output_addr_const (FILE, (VALUE)),            \
1277   fprintf (FILE, "\n"))
1278
1279 /* Likewise for `char' and `short' constants.  */
1280
1281 #define ASM_OUTPUT_SHORT(FILE, VALUE)           \
1282 ( fprintf (FILE, "\t.hword "),                  \
1283   output_addr_const (FILE, (VALUE)),            \
1284   fprintf (FILE, "\n"))
1285
1286 #define ASM_OUTPUT_CHAR(FILE, VALUE)            \
1287 ( fprintf (FILE, "\t.byte "),                   \
1288   output_addr_const (FILE, (VALUE)),            \
1289   fprintf (FILE, "\n"))
1290
1291 /* This is how to output an assembler line for a numeric constant byte.  */
1292 #define ASM_OUTPUT_BYTE(FILE, VALUE)  \
1293   fprintf (FILE, "\t.byte 0x%x\n", (VALUE))
1294
1295 /* Define the parentheses used to group arithmetic operations
1296    in assembler code.  */
1297
1298 #define ASM_OPEN_PAREN "("
1299 #define ASM_CLOSE_PAREN ")"
1300
1301 /* This says how to output the assembler to define a global
1302    uninitialized but not common symbol.  */
1303
1304 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
1305   asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
1306
1307 #undef  ASM_OUTPUT_ALIGNED_BSS 
1308 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
1309   v850_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
1310
1311 /* This says how to output the assembler to define a global
1312    uninitialized, common symbol. */
1313 #undef  ASM_OUTPUT_ALIGNED_COMMON
1314 #undef  ASM_OUTPUT_COMMON
1315 #define ASM_OUTPUT_ALIGNED_DECL_COMMON(FILE, DECL, NAME, SIZE, ALIGN) \
1316      v850_output_common (FILE, DECL, NAME, SIZE, ALIGN)
1317
1318 /* This says how to output the assembler to define a local
1319    uninitialized symbol. */
1320 #undef  ASM_OUTPUT_ALIGNED_LOCAL
1321 #undef  ASM_OUTPUT_LOCAL
1322 #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \
1323      v850_output_local (FILE, DECL, NAME, SIZE, ALIGN)
1324      
1325 /* This is how to output the definition of a user-level label named NAME,
1326    such as the label on a static function or variable NAME.  */
1327
1328 #define ASM_OUTPUT_LABEL(FILE, NAME)    \
1329   do { assemble_name (FILE, NAME); fputs (":\n", FILE); } while (0)
1330
1331 /* This is how to output a command to make the user-level label named NAME
1332    defined for reference from other files.  */
1333
1334 #define ASM_GLOBALIZE_LABEL(FILE, NAME) \
1335   do { fputs ("\t.global ", FILE); assemble_name (FILE, NAME); fputs ("\n", FILE);} while (0)
1336
1337 /* This is how to output a reference to a user-level label named NAME.
1338    `assemble_name' uses this.  */
1339
1340 #undef ASM_OUTPUT_LABELREF
1341 #define ASM_OUTPUT_LABELREF(FILE, NAME)           \
1342   do {                                            \
1343   char* real_name;                                \
1344   STRIP_NAME_ENCODING (real_name, (NAME));        \
1345   fprintf (FILE, "_%s", real_name);               \
1346   } while (0)           
1347
1348 /* Store in OUTPUT a string (made with alloca) containing
1349    an assembler-name for a local static variable named NAME.
1350    LABELNO is an integer which is different for each call.  */
1351
1352 #define ASM_FORMAT_PRIVATE_NAME(OUTPUT, NAME, LABELNO)  \
1353 ( (OUTPUT) = (char *) alloca (strlen ((NAME)) + 10),    \
1354   sprintf ((OUTPUT), "%s___%d", (NAME), (LABELNO)))
1355
1356 /* This is how we tell the assembler that two symbols have the same value.  */
1357
1358 #define ASM_OUTPUT_DEF(FILE,NAME1,NAME2) \
1359   do { assemble_name(FILE, NAME1);       \
1360        fputs(" = ", FILE);               \
1361        assemble_name(FILE, NAME2);       \
1362        fputc('\n', FILE); } while (0)
1363
1364
1365 /* How to refer to registers in assembler output.
1366    This sequence is indexed by compiler's hard-register-number (see above).  */
1367
1368 #define REGISTER_NAMES                                                  \
1369 {  "r0",  "r1",  "r2",  "sp",  "gp",  "r5",  "r6" , "r7",               \
1370    "r8",  "r9", "r10", "r11", "r12", "r13", "r14", "r15",               \
1371   "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",               \
1372   "r24", "r25", "r26", "r27", "r28", "r29",  "ep", "r31",               \
1373   ".fp", ".ap"}
1374
1375 #define ADDITIONAL_REGISTER_NAMES                                       \
1376 { { "zero",     0 },                                                    \
1377   { "hp",       2 },                                                    \
1378   { "r3",       3 },                                                    \
1379   { "r4",       4 },                                                    \
1380   { "tp",       5 },                                                    \
1381   { "fp",       29 },                                                   \
1382   { "r30",      30 },                                                   \
1383   { "lp",       31} }
1384
1385 /* Print an instruction operand X on file FILE.
1386    look in v850.c for details */
1387
1388 #define PRINT_OPERAND(FILE, X, CODE)  print_operand (FILE, X, CODE)
1389
1390 #define PRINT_OPERAND_PUNCT_VALID_P(CODE) \
1391   ((CODE) == '.')
1392
1393 /* Print a memory operand whose address is X, on file FILE.
1394    This uses a function in output-vax.c.  */
1395
1396 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)
1397
1398 #define ASM_OUTPUT_REG_PUSH(FILE,REGNO)
1399 #define ASM_OUTPUT_REG_POP(FILE,REGNO)
1400
1401 /* This is how to output an element of a case-vector that is absolute.  */
1402
1403 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
1404   asm_fprintf (FILE, "\t%s .L%d\n",                                     \
1405                (TARGET_BIG_SWITCH ? ".long" : ".short"), VALUE)
1406
1407 /* This is how to output an element of a case-vector that is relative.  */
1408
1409 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
1410   fprintf (FILE, "\t%s .L%d-.L%d\n",                                    \
1411            (TARGET_BIG_SWITCH ? ".long" : ".short"),                    \
1412            VALUE, REL)
1413
1414 #define ASM_OUTPUT_ALIGN(FILE,LOG)      \
1415   if ((LOG) != 0)                       \
1416     fprintf (FILE, "\t.align %d\n", (LOG))
1417
1418 /* We don't have to worry about dbx compatibility for the v850.  */
1419 #define DEFAULT_GDB_EXTENSIONS 1
1420
1421 /* Use stabs debugging info by default.  */
1422 #undef PREFERRED_DEBUGGING_TYPE
1423 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
1424
1425 #define DBX_REGISTER_NUMBER(REGNO) REGNO
1426
1427 /* Define to use software floating point emulator for REAL_ARITHMETIC and
1428    decimal <-> binary conversion. */
1429 #define REAL_ARITHMETIC
1430
1431 /* Specify the machine mode that this machine uses
1432    for the index in the tablejump instruction.  */
1433 #define CASE_VECTOR_MODE (TARGET_BIG_SWITCH ? SImode : HImode)
1434
1435 /* Define this if the case instruction drops through after the table
1436    when the index is out of range.  Don't define it if the case insn
1437    jumps to the default label instead.  */
1438 /* #define CASE_DROPS_THROUGH */
1439
1440 /* Define as C expression which evaluates to nonzero if the tablejump
1441    instruction expects the table to contain offsets from the address of the
1442    table.
1443    Do not define this if the table should contain absolute addresses. */
1444 #define CASE_VECTOR_PC_RELATIVE 1
1445
1446 /* The switch instruction requires that the jump table immediately follow
1447    it. */
1448 #define JUMP_TABLES_IN_TEXT_SECTION 1
1449
1450 /* svr4.h defines this assuming that 4 byte alignment is required.  */
1451 #undef ASM_OUTPUT_BEFORE_CASE_LABEL
1452 #define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \
1453   ASM_OUTPUT_ALIGN ((FILE), (TARGET_BIG_SWITCH ? 2 : 1));
1454
1455 #define WORD_REGISTER_OPERATIONS
1456
1457 /* Byte and short loads sign extend the value to a word.  */
1458 #define LOAD_EXTEND_OP(MODE) SIGN_EXTEND
1459
1460 /* Specify the tree operation to be used to convert reals to integers.  */
1461 #define IMPLICIT_FIX_EXPR FIX_ROUND_EXPR
1462
1463 /* This flag, if defined, says the same insns that convert to a signed fixnum
1464    also convert validly to an unsigned one.  */
1465 #define FIXUNS_TRUNC_LIKE_FIX_TRUNC
1466
1467 /* This is the kind of divide that is easiest to do in the general case.  */
1468 #define EASY_DIV_EXPR TRUNC_DIV_EXPR
1469
1470 /* Max number of bytes we can move from memory to memory
1471    in one reasonably fast instruction.  */
1472 #define MOVE_MAX        4
1473
1474 /* Define if shifts truncate the shift count
1475    which implies one can omit a sign-extension or zero-extension
1476    of a shift count.  */
1477 #define SHIFT_COUNT_TRUNCATED 1
1478
1479 /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
1480    is done just by pretending it is already truncated.  */
1481 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
1482
1483 #define STORE_FLAG_VALUE 1
1484
1485 /* Specify the machine mode that pointers have.
1486    After generation of rtl, the compiler makes no further distinction
1487    between pointers and any other objects of this machine mode.  */
1488 #define Pmode SImode
1489
1490 /* A function address in a call instruction
1491    is a byte address (for indexing purposes)
1492    so give the MEM rtx a byte's mode.  */
1493 #define FUNCTION_MODE QImode
1494
1495 /* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
1496    is a valid machine specific attribute for DECL.
1497    The attributes in ATTRIBUTES have previously been assigned to DECL.  */
1498 #define VALID_MACHINE_DECL_ATTRIBUTE(DECL, ATTRIBUTES, IDENTIFIER, ARGS) \
1499   v850_valid_machine_decl_attribute (DECL, IDENTIFIER, ARGS)
1500
1501 /* A C statement that assigns default attributes to a newly created DECL.  */
1502 #define SET_DEFAULT_DECL_ATTRIBUTES(decl, attr) \
1503      v850_set_default_decl_attr (decl)
1504
1505 /* Tell compiler we want to support GHS pragmas */
1506 #define HANDLE_PRAGMA(get, unget, name) v850_handle_pragma (get, unget, name)
1507
1508 enum v850_pragma_state
1509 {
1510   V850_PS_START,
1511   V850_PS_SHOULD_BE_DONE,
1512   V850_PS_BAD,
1513   V850_PS_MAYBE_SECTION_NAME,
1514   V850_PS_EXPECTING_EQUALS,
1515   V850_PS_EXPECTING_SECTION_ALIAS,
1516   V850_PS_MAYBE_COMMA
1517 };
1518
1519 enum v850_pragma_type
1520 {
1521   V850_PT_UNKNOWN,
1522   V850_PT_INTERRUPT,
1523   V850_PT_SECTION,
1524   V850_PT_START_SECTION,
1525   V850_PT_END_SECTION
1526 };
1527
1528 /* enum GHS_SECTION_KIND is an enumeration of the kinds of sections that
1529    can appear in the "ghs section" pragma.  These names are used to index
1530    into the GHS_default_section_names[] and GHS_current_section_names[]
1531    that are defined in v850.c, and so the ordering of each must remain
1532    consistant. 
1533
1534    These arrays give the default and current names for each kind of 
1535    section defined by the GHS pragmas.  The current names can be changed
1536    by the "ghs section" pragma.  If the current names are null, use 
1537    the default names.  Note that the two arrays have different types.
1538
1539    For the *normal* section kinds (like .data, .text, etc.) we do not
1540    want to explicitly force the name of these sections, but would rather
1541    let the linker (or at least the back end) choose the name of the 
1542    section, UNLESS the user has force a specific name for these section
1543    kinds.  To accomplish this set the name in ghs_default_section_names
1544    to null.  */
1545
1546 enum GHS_section_kind
1547
1548   GHS_SECTION_KIND_DEFAULT,
1549
1550   GHS_SECTION_KIND_TEXT,
1551   GHS_SECTION_KIND_DATA, 
1552   GHS_SECTION_KIND_RODATA,
1553   GHS_SECTION_KIND_BSS,
1554   GHS_SECTION_KIND_SDATA,
1555   GHS_SECTION_KIND_ROSDATA,
1556   GHS_SECTION_KIND_TDATA,
1557   GHS_SECTION_KIND_ZDATA,
1558   GHS_SECTION_KIND_ROZDATA,
1559
1560   COUNT_OF_GHS_SECTION_KINDS  /* must be last */
1561 };
1562
1563 /* The assembler op to start the file.  */
1564
1565 #define FILE_ASM_OP "\t.file\n"
1566
1567 /* Enable the register move pass to improve code.  */
1568 #define ENABLE_REGMOVE_PASS
1569
1570
1571 /* Implement ZDA, TDA, and SDA */
1572
1573 #define EP_REGNUM 30    /* ep register number */
1574
1575 #define ENCODE_SECTION_INFO(DECL)                                       \
1576 do {                                                                    \
1577   if ((TREE_STATIC (DECL) || DECL_EXTERNAL (DECL))                      \
1578       && TREE_CODE (DECL) == VAR_DECL)                                  \
1579     v850_encode_data_area (DECL);                                       \
1580 } while (0)
1581
1582 #define ZDA_NAME_FLAG_CHAR '@'
1583 #define TDA_NAME_FLAG_CHAR '%'
1584 #define SDA_NAME_FLAG_CHAR '&'
1585
1586 #define ZDA_NAME_P(NAME) (*(NAME) == ZDA_NAME_FLAG_CHAR)
1587 #define TDA_NAME_P(NAME) (*(NAME) == TDA_NAME_FLAG_CHAR)
1588 #define SDA_NAME_P(NAME) (*(NAME) == SDA_NAME_FLAG_CHAR)
1589
1590 #define ENCODED_NAME_P(SYMBOL_NAME)    \
1591   (ZDA_NAME_P (SYMBOL_NAME)            \
1592    || TDA_NAME_P (SYMBOL_NAME)         \
1593    || SDA_NAME_P (SYMBOL_NAME))
1594
1595 #define STRIP_NAME_ENCODING(VAR,SYMBOL_NAME) \
1596      (VAR) = (SYMBOL_NAME) + (ENCODED_NAME_P (SYMBOL_NAME) || *(SYMBOL_NAME) == '*')
1597
1598 /* Define this if you have defined special-purpose predicates in the
1599    file `MACHINE.c'.  This macro is called within an initializer of an
1600    array of structures.  The first field in the structure is the name
1601    of a predicate and the second field is an array of rtl codes.  For
1602    each predicate, list all rtl codes that can be in expressions
1603    matched by the predicate.  The list should have a trailing comma.  */
1604
1605 #define PREDICATE_CODES                                                 \
1606 { "ep_memory_operand",          { MEM }},                               \
1607 { "reg_or_0_operand",           { REG, SUBREG, CONST_INT, CONST_DOUBLE }}, \
1608 { "reg_or_int5_operand",        { REG, SUBREG, CONST_INT }},            \
1609 { "call_address_operand",       { REG, SYMBOL_REF }},                   \
1610 { "movsi_source_operand",       { LABEL_REF, SYMBOL_REF, CONST_INT,     \
1611                                   CONST_DOUBLE, CONST, HIGH, MEM,       \
1612                                   REG, SUBREG }},                       \
1613 { "special_symbolref_operand",  { SYMBOL_REF }},                        \
1614 { "power_of_two_operand",       { CONST_INT }},                         \
1615 { "pattern_is_ok_for_prologue", { PARALLEL }},                          \
1616 { "pattern_is_ok_for_epilogue", { PARALLEL }},                          \
1617 { "register_is_ok_for_epilogue",{ REG }},                               \
1618 { "not_power_of_two_operand",   { CONST_INT }},
1619
1620   /* Note, due to dependency and search path conflicts, prototypes
1621      involving the FILE, rtx or tree types cannot be included here.
1622      They are included at the start of v850.c  */
1623   
1624 extern void   asm_file_start                ();
1625 extern void   print_operand                 ();
1626 extern void   print_operand_address         ();
1627 extern int    function_arg_partial_nregs    ();
1628 extern int    const_costs                   ();
1629 extern char * output_move_double            ();
1630 extern char * output_move_single            ();
1631 extern int    ep_memory_operand             ();
1632 extern int    reg_or_0_operand              ();
1633 extern int    reg_or_int5_operand           ();
1634 extern int    call_address_operand          ();
1635 extern int    movsi_source_operand          ();
1636 extern int    power_of_two_operand          ();
1637 extern int    not_power_of_two_operand      ();
1638 extern int    special_symbolref_operand     ();
1639 extern void   v850_reorg                    ();
1640 extern void   notice_update_cc              ();
1641 extern int    v850_valid_machine_decl_attribute ();
1642 extern int    v850_interrupt_function_p     ();
1643 extern int    pattern_is_ok_for_prologue    ();
1644 extern int    pattern_is_ok_for_epilogue    ();
1645 extern int    register_is_ok_for_epilogue   ();
1646 extern char * construct_save_jarl           ();
1647 extern char * construct_restore_jr          ();
1648
1649 extern void   override_options              PROTO ((void));
1650 extern int    compute_register_save_size    PROTO ((long *));
1651 extern int    compute_frame_size            PROTO ((int, long *));
1652 extern void   expand_prologue               PROTO ((void));
1653 extern void   expand_epilogue               PROTO ((void));
1654
1655 extern void   v850_output_aligned_bss       ();
1656 extern void   v850_output_common            ();
1657 extern void   v850_output_local             ();
1658 extern void   sdata_section                 PROTO ((void));
1659 extern void   rosdata_section               PROTO ((void));
1660 extern void   sbss_section                  PROTO ((void));
1661 extern void   tdata_section                 PROTO ((void));
1662 extern void   zdata_section                 PROTO ((void));
1663 extern void   rozdata_section               PROTO ((void));
1664 extern void   zbss_section                  PROTO ((void));
1665 extern int    v850_handle_pragma            PROTO ((int (*)(void), void (*)(int), char *));
1666 extern void   v850_encode_data_area         ();
1667 extern void   v850_set_default_decl_attr    ();
1668 extern v850_data_area v850_get_data_area    ();