OSDN Git Service

* target.h (enum opt_levels, struct default_options): New.
[pf3gnuchains/gcc-fork.git] / gcc / config / v850 / v850.h
1 /* Definitions of target machine for GNU compiler. NEC V850 series
2    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
3    2007, 2008, 2009, 2010  Free Software Foundation, Inc.
4    Contributed by Jeff Law (law@cygnus.com).
5
6    This file is part of GCC.
7
8    GCC 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 3, or (at your option)
11    any later version.
12
13    GCC 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 GCC; see the file COPYING3.  If not see
20    <http://www.gnu.org/licenses/>.  */
21
22 #ifndef GCC_V850_H
23 #define GCC_V850_H
24
25 extern GTY(()) rtx v850_compare_op0;
26 extern GTY(()) rtx v850_compare_op1;
27
28 /* These are defined in svr4.h but we want to override them.  */
29 #undef LIB_SPEC
30 #define LIB_SPEC "%{!shared:%{!symbolic:--start-group -lc -lgcc --end-group}}"
31
32 #undef ENDFILE_SPEC
33 #undef LINK_SPEC
34 #undef STARTFILE_SPEC
35 #undef ASM_SPEC
36
37 #define TARGET_CPU_generic      1
38 #define TARGET_CPU_v850e        2
39 #define TARGET_CPU_v850e1       3
40 #define TARGET_CPU_v850e2       4
41 #define TARGET_CPU_v850e2v3     5
42
43
44 #ifndef TARGET_CPU_DEFAULT
45 #define TARGET_CPU_DEFAULT      TARGET_CPU_generic
46 #endif
47
48 #define MASK_DEFAULT            MASK_V850
49 #define SUBTARGET_ASM_SPEC      "%{!mv*:-mv850}"
50 #define SUBTARGET_CPP_SPEC      "%{!mv*:-D__v850__}"
51 #define TARGET_VERSION          fprintf (stderr, " (NEC V850)");
52
53 /* Choose which processor will be the default.
54    We must pass a -mv850xx option to the assembler if no explicit -mv* option
55    is given, because the assembler's processor default may not be correct.  */
56 #if TARGET_CPU_DEFAULT == TARGET_CPU_v850e
57 #undef  MASK_DEFAULT
58 #define MASK_DEFAULT            MASK_V850E
59 #undef  SUBTARGET_ASM_SPEC
60 #define SUBTARGET_ASM_SPEC      "%{!mv*:-mv850e}"
61 #undef  SUBTARGET_CPP_SPEC
62 #define SUBTARGET_CPP_SPEC      "%{!mv*:-D__v850e__}"
63 #undef  TARGET_VERSION
64 #define TARGET_VERSION          fprintf (stderr, " (NEC V850E)");
65 #endif
66
67 #if TARGET_CPU_DEFAULT == TARGET_CPU_v850e1
68 #undef  MASK_DEFAULT
69 #define MASK_DEFAULT            MASK_V850E     /* No practical difference.  */     
70 #undef  SUBTARGET_ASM_SPEC
71 #define SUBTARGET_ASM_SPEC      "%{!mv*:-mv850e1}"
72 #undef  SUBTARGET_CPP_SPEC
73 #define SUBTARGET_CPP_SPEC      "%{!mv*:-D__v850e1__} %{mv850e1:-D__v850e1__}"
74 #undef  TARGET_VERSION
75 #define TARGET_VERSION          fprintf (stderr, " (NEC V850E1)");
76 #endif
77
78 #if TARGET_CPU_DEFAULT == TARGET_CPU_v850e2
79 #undef  MASK_DEFAULT
80 #define MASK_DEFAULT            MASK_V850E2     
81 #undef  SUBTARGET_ASM_SPEC
82 #define SUBTARGET_ASM_SPEC      "%{!mv*:-mv850e2}"
83 #undef  SUBTARGET_CPP_SPEC
84 #define SUBTARGET_CPP_SPEC      "%{!mv*:-D__v850e2__} %{mv850e2:-D__v850e2__}"
85 #undef  TARGET_VERSION
86 #define TARGET_VERSION          fprintf (stderr, " (NEC V850E2)");
87 #endif
88
89 #if TARGET_CPU_DEFAULT == TARGET_CPU_v850e2v3
90 #undef  MASK_DEFAULT
91 #define MASK_DEFAULT            MASK_V850E2V3
92 #undef  SUBTARGET_ASM_SPEC
93 #define SUBTARGET_ASM_SPEC      "%{!mv*:-mv850e2v3}"
94 #undef  SUBTARGET_CPP_SPEC
95 #define SUBTARGET_CPP_SPEC      "%{!mv*:-D__v850e2v3__} %{mv850e2v3:-D__v850e2v3__}"
96 #undef  TARGET_VERSION
97 #define TARGET_VERSION          fprintf (stderr, " (NEC V850E2V3)");
98 #endif
99
100 #define TARGET_V850E2_ALL      (TARGET_V850E2 || TARGET_V850E2V3) 
101
102 #define ASM_SPEC "%{mv*:-mv%*}"
103 #define CPP_SPEC               "%{mv850e2v3:-D__v850e2v3__} %{mv850e2:-D__v850e2__} %{mv850e:-D__v850e__} %{mv850:-D__v850__} %(subtarget_cpp_spec)" \
104                                " %{mep:-D__EP__}"
105
106 #define EXTRA_SPECS \
107  { "subtarget_asm_spec", SUBTARGET_ASM_SPEC }, \
108  { "subtarget_cpp_spec", SUBTARGET_CPP_SPEC } 
109
110 /* Names to predefine in the preprocessor for this target machine.  */
111 #define TARGET_CPU_CPP_BUILTINS() do {          \
112   builtin_define( "__v851__" );                        \
113   builtin_define( "__v850" );                   \
114   builtin_assert( "machine=v850" );             \
115   builtin_assert( "cpu=v850" );                 \
116   if (TARGET_EP)                                \
117     builtin_define ("__EP__");                  \
118 } while(0)
119
120 #define MASK_CPU (MASK_V850 | MASK_V850E)
121
122 /* Information about the various small memory areas.  */
123 struct small_memory_info {
124   const char *name;
125   long max;
126   long physical_max;
127 };
128
129 enum small_memory_type {
130   /* tiny data area, using EP as base register */
131   SMALL_MEMORY_TDA = 0,
132   /* small data area using dp as base register */
133   SMALL_MEMORY_SDA,
134   /* zero data area using r0 as base register */
135   SMALL_MEMORY_ZDA,
136   SMALL_MEMORY_max
137 };
138
139 extern struct small_memory_info small_memory[(int)SMALL_MEMORY_max];
140 \f
141 /* Target machine storage layout */
142
143 /* Define this if most significant bit is lowest numbered
144    in instructions that operate on numbered bit-fields.
145    This is not true on the NEC V850.  */
146 #define BITS_BIG_ENDIAN 0
147
148 /* Define this if most significant byte of a word is the lowest numbered.  */
149 /* This is not true on the NEC V850.  */
150 #define BYTES_BIG_ENDIAN 0
151
152 /* Define this if most significant word of a multiword number is lowest
153    numbered.
154    This is not true on the NEC V850.  */
155 #define WORDS_BIG_ENDIAN 0
156
157 /* Width of a word, in units (bytes).  */
158 #define UNITS_PER_WORD          4
159
160 /* Define this macro if it is advisable to hold scalars in registers
161    in a wider mode than that declared by the program.  In such cases,
162    the value is constrained to be within the bounds of the declared
163    type, but kept valid in the wider mode.  The signedness of the
164    extension may differ from that of the type.
165
166    Some simple experiments have shown that leaving UNSIGNEDP alone
167    generates the best overall code.  */
168
169 #define PROMOTE_MODE(MODE,UNSIGNEDP,TYPE)  \
170   if (GET_MODE_CLASS (MODE) == MODE_INT \
171       && GET_MODE_SIZE (MODE) < 4)      \
172     { (MODE) = SImode; }
173
174 /* Allocation boundary (in *bits*) for storing arguments in argument list.  */
175 #define PARM_BOUNDARY           32
176
177 /* The stack goes in 32-bit lumps.  */
178 #define STACK_BOUNDARY          32
179
180 /* Allocation boundary (in *bits*) for the code of a function.
181    16 is the minimum boundary; 32 would give better performance.  */
182 #define FUNCTION_BOUNDARY 16
183
184 /* No data type wants to be aligned rounder than this.  */
185 #define BIGGEST_ALIGNMENT       32
186
187 /* Alignment of field after `int : 0' in a structure.  */
188 #define EMPTY_FIELD_BOUNDARY 32
189
190 /* No structure field wants to be aligned rounder than this.  */
191 #define BIGGEST_FIELD_ALIGNMENT 32
192
193 /* Define this if move instructions will actually fail to work
194    when given unaligned data.  */
195 #define STRICT_ALIGNMENT  (!TARGET_NO_STRICT_ALIGN)
196
197 /* Define this as 1 if `char' should by default be signed; else as 0.
198
199    On the NEC V850, loads do sign extension, so make this default.  */
200 #define DEFAULT_SIGNED_CHAR 1
201 \f
202 /* Standard register usage.  */
203
204 /* Number of actual hardware registers.
205    The hardware registers are assigned numbers for the compiler
206    from 0 to just below FIRST_PSEUDO_REGISTER.
207
208    All registers that the compiler knows about must be given numbers,
209    even those that are not normally considered general registers.  */
210
211 #define FIRST_PSEUDO_REGISTER 36
212
213 /* 1 for registers that have pervasive standard uses
214    and are not available for the register allocator.  */
215
216 #define FIXED_REGISTERS \
217   { 1, 1, 1, 1, 1, 1, 0, 0, \
218     0, 0, 0, 0, 0, 0, 0, 0, \
219     0, 0, 0, 0, 0, 0, 0, 0, \
220     0, 0, 0, 0, 0, 0, 1, 0, \
221     1, 1,       \
222     1, 1}
223
224 /* 1 for registers not available across function calls.
225    These must include the FIXED_REGISTERS and also any
226    registers that can be used without being saved.
227    The latter must include the registers where values are returned
228    and the register where structure-value addresses are passed.
229    Aside from that, you can include as many other registers as you
230    like.  */
231
232 #define CALL_USED_REGISTERS \
233   { 1, 1, 1, 1, 1, 1, 1, 1, \
234     1, 1, 1, 1, 1, 1, 1, 1, \
235     1, 1, 1, 1, 0, 0, 0, 0, \
236     0, 0, 0, 0, 0, 0, 1, 1, \
237     1, 1,       \
238     1, 1}
239
240 /* List the order in which to allocate registers.  Each register must be
241    listed once, even those in FIXED_REGISTERS.
242
243    On the 850, we make the return registers first, then all of the volatile
244    registers, then the saved registers in reverse order to better save the
245    registers with an out of line function, and finally the fixed
246    registers.  */
247
248 #define REG_ALLOC_ORDER                                                 \
249 {                                                                       \
250   10, 11,                               /* return registers */          \
251   12, 13, 14, 15, 16, 17, 18, 19,       /* scratch registers */         \
252    6,  7,  8,  9, 31,                   /* argument registers */        \
253   29, 28, 27, 26, 25, 24, 23, 22,       /* saved registers */           \
254   21, 20,  2,                                                           \
255    0,  1,  3,  4,  5, 30, 32, 33,      /* fixed registers */           \
256   34, 35                                                                \
257 }
258
259 /* If TARGET_APP_REGS is not defined then add r2 and r5 to
260    the pool of fixed registers. See PR 14505.  */
261 #define CONDITIONAL_REGISTER_USAGE             \
262 {                                              \
263   if (TARGET_APP_REGS)                         \
264     {                                          \
265      fixed_regs[2] = 0;  call_used_regs[2] = 0;        \
266      fixed_regs[5] = 0;  call_used_regs[5] = 1;        \
267     }                                          \
268  }
269
270
271 /* Return number of consecutive hard regs needed starting at reg REGNO
272    to hold something of mode MODE.
273
274    This is ordinarily the length in words of a value of mode MODE
275    but can be less for certain modes in special long registers.  */
276
277 #define HARD_REGNO_NREGS(REGNO, MODE)   \
278   ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
279
280 /* Value is 1 if hard register REGNO can hold a value of machine-mode
281    MODE.  */
282
283 #define HARD_REGNO_MODE_OK(REGNO, MODE) \
284  ((GET_MODE_SIZE (MODE) <= 4) || (((REGNO) & 1) == 0 && (REGNO) != 0))
285
286 /* Value is 1 if it is a good idea to tie two pseudo registers
287    when one has mode MODE1 and one has mode MODE2.
288    If HARD_REGNO_MODE_OK could produce different values for MODE1 and MODE2,
289    for any hard reg, then this must be 0 for correct output.  */
290 #define MODES_TIEABLE_P(MODE1, MODE2) \
291   (MODE1 == MODE2 || (GET_MODE_SIZE (MODE1) <= 4 && GET_MODE_SIZE (MODE2) <= 4))
292
293 \f
294 /* Define the classes of registers for register constraints in the
295    machine description.  Also define ranges of constants.
296
297    One of the classes must always be named ALL_REGS and include all hard regs.
298    If there is more than one class, another class must be named NO_REGS
299    and contain no registers.
300
301    The name GENERAL_REGS must be the name of a class (or an alias for
302    another name such as ALL_REGS).  This is the class of registers
303    that is allowed by "g" or "r" in a register constraint.
304    Also, registers outside this class are allocated only when
305    instructions express preferences for them.
306
307    The classes must be numbered in nondecreasing order; that is,
308    a larger-numbered class must never be contained completely
309    in a smaller-numbered class.
310
311    For any two classes, it is very desirable that there be another
312    class that represents their union.  */
313    
314 enum reg_class
315 {
316   NO_REGS, GENERAL_REGS, EVEN_REGS, ALL_REGS, LIM_REG_CLASSES
317 };
318
319 #define N_REG_CLASSES (int) LIM_REG_CLASSES
320
321 #define IRA_COVER_CLASSES               \
322 {                                       \
323   GENERAL_REGS, LIM_REG_CLASSES         \
324 }
325
326 /* Give names of register classes as strings for dump file.  */
327
328 #define REG_CLASS_NAMES \
329 { "NO_REGS", "GENERAL_REGS", "EVEN_REGS", "ALL_REGS", "LIM_REGS" }
330
331 /* Define which registers fit in which classes.
332    This is an initializer for a vector of HARD_REG_SET
333    of length N_REG_CLASSES.  */
334
335 #define REG_CLASS_CONTENTS                     \
336 {                                              \
337   { 0x00000000,0x0 }, /* NO_REGS      */       \
338   { 0xffffffff,0x0 }, /* GENERAL_REGS */       \
339   { 0x55555554,0x0 }, /* EVEN_REGS */          \
340   { 0xffffffff,0x0 }, /* ALL_REGS      */      \
341 }
342
343 /* The same information, inverted:
344    Return the class number of the smallest class containing
345    reg number REGNO.  This could be a conditional expression
346    or could index an array.  */
347
348 #define REGNO_REG_CLASS(REGNO)  ((REGNO == CC_REGNUM || REGNO == FCC_REGNUM) ? NO_REGS : GENERAL_REGS)
349
350 /* The class value for index registers, and the one for base regs.  */
351
352 #define INDEX_REG_CLASS NO_REGS
353 #define BASE_REG_CLASS  GENERAL_REGS
354
355 /* Get reg_class from a letter such as appears in the machine description.  */
356
357 #define REG_CLASS_FROM_LETTER(C) \
358        (C == 'e' ? EVEN_REGS : (NO_REGS))
359
360 /* Macros to check register numbers against specific register classes.  */
361
362 /* These assume that REGNO is a hard or pseudo reg number.
363    They give nonzero only if REGNO is a hard reg of the suitable class
364    or a pseudo reg currently allocated to a suitable hard reg.
365    Since they use reg_renumber, they are safe only once reg_renumber
366    has been allocated, which happens in local-alloc.c.  */
367  
368 #define REGNO_OK_FOR_BASE_P(regno)             \
369   (((regno) < FIRST_PSEUDO_REGISTER            \
370     && (regno) != CC_REGNUM                    \
371     && (regno) != FCC_REGNUM)                  \
372    || reg_renumber[regno] >= 0)
373
374 #define REGNO_OK_FOR_INDEX_P(regno) 0
375
376 /* Return the maximum number of consecutive registers
377    needed to represent mode MODE in a register of class CLASS.  */
378
379 #define CLASS_MAX_NREGS(CLASS, MODE)    \
380   ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
381
382 /* The letters I, J, K, L, M, N, O, P in a register constraint string
383    can be used to stand for particular ranges of immediate operands.
384    This macro defines what the ranges are.
385    C is the letter, and VALUE is a constant value.
386    Return 1 if VALUE is in the range specified by C.  */
387
388 #define INT_7_BITS(VALUE) ((unsigned) (VALUE) + 0x40 < 0x80)
389 #define INT_8_BITS(VALUE) ((unsigned) (VALUE) + 0x80 < 0x100)
390 /* zero */
391 #define CONST_OK_FOR_I(VALUE) ((VALUE) == 0)
392 /* 5-bit signed immediate */
393 #define CONST_OK_FOR_J(VALUE) ((unsigned) (VALUE) + 0x10 < 0x20)
394 /* 16-bit signed immediate */
395 #define CONST_OK_FOR_K(VALUE) ((unsigned) (VALUE) + 0x8000 < 0x10000)
396 /* valid constant for movhi instruction.  */
397 #define CONST_OK_FOR_L(VALUE) \
398   (((unsigned) ((int) (VALUE) >> 16) + 0x8000 < 0x10000) \
399    && CONST_OK_FOR_I ((VALUE & 0xffff)))
400 /* 16-bit unsigned immediate */
401 #define CONST_OK_FOR_M(VALUE) ((unsigned)(VALUE) < 0x10000)
402 /* 5-bit unsigned immediate in shift instructions */
403 #define CONST_OK_FOR_N(VALUE) ((unsigned) (VALUE) <= 31)
404 /* 9-bit signed immediate for word multiply instruction.  */
405 #define CONST_OK_FOR_O(VALUE) ((unsigned) (VALUE) + 0x100 < 0x200)
406
407 #define CONST_OK_FOR_P(VALUE) 0
408
409 #define CONST_OK_FOR_LETTER_P(VALUE, C)  \
410   ((C) == 'I' ? CONST_OK_FOR_I (VALUE) : \
411    (C) == 'J' ? CONST_OK_FOR_J (VALUE) : \
412    (C) == 'K' ? CONST_OK_FOR_K (VALUE) : \
413    (C) == 'L' ? CONST_OK_FOR_L (VALUE) : \
414    (C) == 'M' ? CONST_OK_FOR_M (VALUE) : \
415    (C) == 'N' ? CONST_OK_FOR_N (VALUE) : \
416    (C) == 'O' ? CONST_OK_FOR_O (VALUE) : \
417    (C) == 'P' ? CONST_OK_FOR_P (VALUE) : \
418    0)
419
420 /* Similar, but for floating constants, and defining letters G and H.
421    Here VALUE is the CONST_DOUBLE rtx itself. 
422      
423   `G' is a zero of some form.  */
424
425 #define CONST_DOUBLE_OK_FOR_G(VALUE)                                    \
426   ((GET_MODE_CLASS (GET_MODE (VALUE)) == MODE_FLOAT                     \
427     && (VALUE) == CONST0_RTX (GET_MODE (VALUE)))                        \
428    || (GET_MODE_CLASS (GET_MODE (VALUE)) == MODE_INT                    \
429        && CONST_DOUBLE_LOW (VALUE) == 0                                 \
430        && CONST_DOUBLE_HIGH (VALUE) == 0))
431
432 #define CONST_DOUBLE_OK_FOR_H(VALUE) 0
433
434 #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)                          \
435   ((C) == 'G'   ? CONST_DOUBLE_OK_FOR_G (VALUE)                         \
436    : (C) == 'H' ? CONST_DOUBLE_OK_FOR_H (VALUE)                         \
437    : 0)
438
439 \f
440 /* Stack layout; function entry, exit and calling.  */
441
442 /* Define this if pushing a word on the stack
443    makes the stack pointer a smaller address.  */
444
445 #define STACK_GROWS_DOWNWARD
446
447 /* Define this to nonzero if the nominal address of the stack frame
448    is at the high-address end of the local variables;
449    that is, each additional local variable allocated
450    goes at a more negative offset in the frame.  */
451
452 #define FRAME_GROWS_DOWNWARD 1
453
454 /* Offset within stack frame to start allocating local variables at.
455    If FRAME_GROWS_DOWNWARD, this is the offset to the END of the
456    first local allocated.  Otherwise, it is the offset to the BEGINNING
457    of the first local allocated.  */
458
459 #define STARTING_FRAME_OFFSET 0
460
461 /* Offset of first parameter from the argument pointer register value.  */
462 /* Is equal to the size of the saved fp + pc, even if an fp isn't
463    saved since the value is used before we know.  */
464
465 #define FIRST_PARM_OFFSET(FNDECL) 0
466
467 /* Specify the registers used for certain standard purposes.
468    The values of these macros are register numbers.  */
469
470 /* Register to use for pushing function arguments.  */
471 #define STACK_POINTER_REGNUM SP_REGNUM
472
473 /* Base register for access to local variables of the function.  */
474 #define FRAME_POINTER_REGNUM 34
475
476 /* Register containing return address from latest function call.  */
477 #define LINK_POINTER_REGNUM LP_REGNUM
478      
479 /* On some machines the offset between the frame pointer and starting
480    offset of the automatic variables is not known until after register
481    allocation has been done (for example, because the saved registers
482    are between these two locations).  On those machines, define
483    `FRAME_POINTER_REGNUM' the number of a special, fixed register to
484    be used internally until the offset is known, and define
485    `HARD_FRAME_POINTER_REGNUM' to be actual the hard register number
486    used for the frame pointer.
487
488    You should define this macro only in the very rare circumstances
489    when it is not possible to calculate the offset between the frame
490    pointer and the automatic variables until after register
491    allocation has been completed.  When this macro is defined, you
492    must also indicate in your definition of `ELIMINABLE_REGS' how to
493    eliminate `FRAME_POINTER_REGNUM' into either
494    `HARD_FRAME_POINTER_REGNUM' or `STACK_POINTER_REGNUM'.
495
496    Do not define this macro if it would be the same as
497    `FRAME_POINTER_REGNUM'.  */
498 #undef  HARD_FRAME_POINTER_REGNUM 
499 #define HARD_FRAME_POINTER_REGNUM 29
500
501 /* Base register for access to arguments of the function.  */
502 #define ARG_POINTER_REGNUM 35
503
504 /* Register in which static-chain is passed to a function.  */
505 #define STATIC_CHAIN_REGNUM 20
506
507 /* If defined, this macro specifies a table of register pairs used to
508    eliminate unneeded registers that point into the stack frame.  If
509    it is not defined, the only elimination attempted by the compiler
510    is to replace references to the frame pointer with references to
511    the stack pointer.
512
513    The definition of this macro is a list of structure
514    initializations, each of which specifies an original and
515    replacement register.
516
517    On some machines, the position of the argument pointer is not
518    known until the compilation is completed.  In such a case, a
519    separate hard register must be used for the argument pointer.
520    This register can be eliminated by replacing it with either the
521    frame pointer or the argument pointer, depending on whether or not
522    the frame pointer has been eliminated.
523
524    In this case, you might specify:
525         #define ELIMINABLE_REGS  \
526         {{ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \
527          {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \
528          {FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}}
529
530    Note that the elimination of the argument pointer with the stack
531    pointer is specified first since that is the preferred elimination.  */
532
533 #define ELIMINABLE_REGS                                                 \
534 {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM },                        \
535  { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM },                   \
536  { ARG_POINTER_REGNUM,   STACK_POINTER_REGNUM },                        \
537  { ARG_POINTER_REGNUM,   HARD_FRAME_POINTER_REGNUM }}                   \
538
539 /* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'.  It
540    specifies the initial difference between the specified pair of
541    registers.  This macro must be defined if `ELIMINABLE_REGS' is
542    defined.  */
543
544 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET)                    \
545 {                                                                       \
546   if ((FROM) == FRAME_POINTER_REGNUM)                                   \
547     (OFFSET) = get_frame_size () + crtl->outgoing_args_size;    \
548   else if ((FROM) == ARG_POINTER_REGNUM)                                \
549    (OFFSET) = compute_frame_size (get_frame_size (), (long *)0);        \
550   else                                                                  \
551     gcc_unreachable ();                                                 \
552 }
553
554 /* Keep the stack pointer constant throughout the function.  */
555 #define ACCUMULATE_OUTGOING_ARGS 1
556
557 #define RETURN_ADDR_RTX(COUNT, FP) v850_return_addr (COUNT)
558 \f
559 /* Define a data type for recording info about an argument list
560    during the scan of that argument list.  This data type should
561    hold all necessary information about the function itself
562    and about the args processed so far, enough to enable macros
563    such as FUNCTION_ARG to determine where the next arg should go.  */
564
565 #define CUMULATIVE_ARGS struct cum_arg
566 struct cum_arg { int nbytes; int anonymous_args; };
567
568 /* Initialize a variable CUM of type CUMULATIVE_ARGS
569    for a call to a function whose data type is FNTYPE.
570    For a library call, FNTYPE is 0.  */
571
572 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
573  ((CUM).nbytes = 0, (CUM).anonymous_args = 0)
574
575 /* When a parameter is passed in a register, stack space is still
576    allocated for it.  */
577 #define REG_PARM_STACK_SPACE(DECL) 0
578
579 /* 1 if N is a possible register number for function argument passing.  */
580
581 #define FUNCTION_ARG_REGNO_P(N) (N >= 6 && N <= 9)
582
583 /* Define how to find the value returned by a library function
584    assuming the value has mode MODE.  */
585
586 #define LIBCALL_VALUE(MODE) \
587   gen_rtx_REG (MODE, 10)
588
589 #define DEFAULT_PCC_STRUCT_RETURN 0
590
591 /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function,
592    the stack pointer does not matter.  The value is tested only in
593    functions that have frame pointers.
594    No definition is equivalent to always zero.  */
595
596 #define EXIT_IGNORE_STACK 1
597
598 /* Define this macro as a C expression that is nonzero for registers
599    used by the epilogue or the `return' pattern.  */
600
601 #define EPILOGUE_USES(REGNO) \
602   (reload_completed && (REGNO) == LINK_POINTER_REGNUM)
603
604 /* Output assembler code to FILE to increment profiler label # LABELNO
605    for profiling a function entry.  */
606
607 #define FUNCTION_PROFILER(FILE, LABELNO) ;
608
609 /* Length in units of the trampoline for entering a nested function.  */
610
611 #define TRAMPOLINE_SIZE 24
612
613 /* Addressing modes, and classification of registers for them.  */
614
615 \f
616 /* 1 if X is an rtx for a constant that is a valid address.  */
617
618 /* ??? This seems too exclusive.  May get better code by accepting more
619    possibilities here, in particular, should accept ZDA_NAME SYMBOL_REFs.  */
620
621 #define CONSTANT_ADDRESS_P(X)   \
622   (GET_CODE (X) == CONST_INT                            \
623    && CONST_OK_FOR_K (INTVAL (X)))
624
625 /* Maximum number of registers that can appear in a valid memory address.  */
626
627 #define MAX_REGS_PER_ADDRESS 1
628
629 /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
630    and check its validity for a certain class.
631    We have two alternate definitions for each of them.
632    The usual definition accepts all pseudo regs; the other rejects
633    them unless they have been allocated suitable hard regs.
634    The symbol REG_OK_STRICT causes the latter definition to be used.
635
636    Most source files want to accept pseudo regs in the hope that
637    they will get allocated to the class that the insn wants them to be in.
638    Source files for reload pass need to be strict.
639    After reload, it makes no difference, since pseudo regs have
640    been eliminated by then.  */
641
642 #ifndef REG_OK_STRICT
643
644 /* Nonzero if X is a hard reg that can be used as an index
645    or if it is a pseudo reg.  */
646 #define REG_OK_FOR_INDEX_P(X) 0
647 /* Nonzero if X is a hard reg that can be used as a base reg
648    or if it is a pseudo reg.  */
649 #define REG_OK_FOR_BASE_P(X) 1
650 #define REG_OK_FOR_INDEX_P_STRICT(X) 0
651 #define REG_OK_FOR_BASE_P_STRICT(X) REGNO_OK_FOR_BASE_P (REGNO (X))
652 #define STRICT 0
653
654 #else
655
656 /* Nonzero if X is a hard reg that can be used as an index.  */
657 #define REG_OK_FOR_INDEX_P(X) 0
658 /* Nonzero if X is a hard reg that can be used as a base reg.  */
659 #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))
660 #define STRICT 1
661
662 #endif
663
664 /* A C expression that defines the optional machine-dependent
665    constraint letters that can be used to segregate specific types of
666    operands, usually memory references, for the target machine.
667    Normally this macro will not be defined.  If it is required for a
668    particular target machine, it should return 1 if VALUE corresponds
669    to the operand type represented by the constraint letter C.  If C
670    is not defined as an extra constraint, the value returned should
671    be 0 regardless of VALUE.
672
673    For example, on the ROMP, load instructions cannot have their
674    output in r0 if the memory reference contains a symbolic address.
675    Constraint letter `Q' is defined as representing a memory address
676    that does *not* contain a symbolic address.  An alternative is
677    specified with a `Q' constraint on the input and `r' on the
678    output.  The next alternative specifies `m' on the input and a
679    register class that does not include r0 on the output.  */
680
681 #define EXTRA_CONSTRAINT(OP, C)                                         \
682  ((C) == 'Q'   ? ep_memory_operand (OP, GET_MODE (OP), FALSE)           \
683   : (C) == 'R' ? special_symbolref_operand (OP, VOIDmode)               \
684   : (C) == 'S' ? (GET_CODE (OP) == SYMBOL_REF                           \
685                   && !SYMBOL_REF_ZDA_P (OP))                            \
686   : (C) == 'T' ? ep_memory_operand (OP, GET_MODE (OP), TRUE)            \
687   : (C) == 'U' ? ((GET_CODE (OP) == SYMBOL_REF                          \
688                    && SYMBOL_REF_ZDA_P (OP))                            \
689                   || (GET_CODE (OP) == CONST                            \
690                       && GET_CODE (XEXP (OP, 0)) == PLUS                \
691                       && GET_CODE (XEXP (XEXP (OP, 0), 0)) == SYMBOL_REF\
692                       && SYMBOL_REF_ZDA_P (XEXP (XEXP (OP, 0), 0))))    \
693   : (C) == 'W' ? (GET_CODE (OP) == CONST_INT                            \
694                   && ((unsigned)(INTVAL (OP)) >= 0x8000)               \
695                   && ((unsigned)(INTVAL (OP)) < 0x400000))              \
696   : 0)
697 \f
698 /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
699    that is a valid memory address for an instruction.
700    The MODE argument is the machine mode for the MEM expression
701    that wants to use this address.
702
703    The other macros defined here are used only in GO_IF_LEGITIMATE_ADDRESS,
704    except for CONSTANT_ADDRESS_P which is actually
705    machine-independent.  */
706
707 /* Accept either REG or SUBREG where a register is valid.  */
708   
709 #define RTX_OK_FOR_BASE_P(X)                                            \
710   ((REG_P (X) && REG_OK_FOR_BASE_P (X))                                 \
711    || (GET_CODE (X) == SUBREG && REG_P (SUBREG_REG (X))                 \
712        && REG_OK_FOR_BASE_P (SUBREG_REG (X))))
713
714 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)                         \
715 do {                                                                    \
716   if (RTX_OK_FOR_BASE_P (X))                                            \
717     goto ADDR;                                                          \
718   if (CONSTANT_ADDRESS_P (X)                                            \
719       && (MODE == QImode || INTVAL (X) % 2 == 0)                        \
720       && (GET_MODE_SIZE (MODE) <= 4 || INTVAL (X) % 4 == 0))            \
721     goto ADDR;                                                          \
722   if (GET_CODE (X) == LO_SUM                                            \
723       && REG_P (XEXP (X, 0))                                            \
724       && REG_OK_FOR_BASE_P (XEXP (X, 0))                                \
725       && CONSTANT_P (XEXP (X, 1))                                       \
726       && (GET_CODE (XEXP (X, 1)) != CONST_INT                           \
727           || ((MODE == QImode || INTVAL (XEXP (X, 1)) % 2 == 0)         \
728               && CONST_OK_FOR_K (INTVAL (XEXP (X, 1)))))                \
729       && GET_MODE_SIZE (MODE) <= GET_MODE_SIZE (word_mode))             \
730     goto ADDR;                                                          \
731   if (special_symbolref_operand (X, MODE)                               \
732       && (GET_MODE_SIZE (MODE) <= GET_MODE_SIZE (word_mode)))           \
733      goto ADDR;                                                         \
734   if (GET_CODE (X) == PLUS                                              \
735       && RTX_OK_FOR_BASE_P (XEXP (X, 0))                                \
736       && (GET_CODE (XEXP (X,1)) == CONST_INT && CONST_OK_FOR_K (INTVAL(XEXP (X,1)) + GET_MODE_NUNITS(MODE) * UNITS_PER_WORD)) \
737       && ((MODE == QImode || INTVAL (XEXP (X, 1)) % 2 == 0)             \
738            && CONST_OK_FOR_K (INTVAL (XEXP (X, 1))                      \
739                               + (GET_MODE_NUNITS (MODE) * UNITS_PER_WORD)))) \
740     goto ADDR;                  \
741 } while (0)
742
743 \f
744 /* Nonzero if the constant value X is a legitimate general operand.
745    It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE.  */
746
747 #define LEGITIMATE_CONSTANT_P(X)                                        \
748   (GET_CODE (X) == CONST_DOUBLE                                         \
749    || !(GET_CODE (X) == CONST                                           \
750         && GET_CODE (XEXP (X, 0)) == PLUS                               \
751         && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF               \
752         && GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT                \
753         && ! CONST_OK_FOR_K (INTVAL (XEXP (XEXP (X, 0), 1)))))
754
755 /* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
756    return the mode to be used for the comparison.
757
758    For floating-point equality comparisons, CCFPEQmode should be used.
759    VOIDmode should be used in all other cases.
760
761    For integer comparisons against zero, reduce to CCNOmode or CCZmode if
762    possible, to allow for more combinations.  */
763
764 #define SELECT_CC_MODE(OP, X, Y)       v850_select_cc_mode (OP, X, Y)
765
766 /* Tell final.c how to eliminate redundant test instructions.  */
767
768 /* Here we define machine-dependent flags and fields in cc_status
769    (see `conditions.h').  No extra ones are needed for the VAX.  */
770
771 /* Store in cc_status the expressions
772    that the condition codes will describe
773    after execution of an instruction whose pattern is EXP.
774    Do not alter them if the instruction would not alter the cc's.  */
775
776 #define CC_OVERFLOW_UNUSABLE 0x200
777 #define CC_NO_CARRY CC_NO_OVERFLOW
778 #define NOTICE_UPDATE_CC(EXP, INSN) notice_update_cc(EXP, INSN)
779
780 /* Nonzero if access to memory by bytes or half words is no faster
781    than accessing full words.  */
782 #define SLOW_BYTE_ACCESS 1
783
784 /* According expr.c, a value of around 6 should minimize code size, and
785    for the V850 series, that's our primary concern.  */
786 #define MOVE_RATIO(speed) 6
787
788 /* Indirect calls are expensive, never turn a direct call
789    into an indirect call.  */
790 #define NO_FUNCTION_CSE
791
792 /* The four different data regions on the v850.  */
793 typedef enum 
794 {
795   DATA_AREA_NORMAL,
796   DATA_AREA_SDA,
797   DATA_AREA_TDA,
798   DATA_AREA_ZDA
799 } v850_data_area;
800
801 #define TEXT_SECTION_ASM_OP  "\t.section .text"
802 #define DATA_SECTION_ASM_OP  "\t.section .data"
803 #define BSS_SECTION_ASM_OP   "\t.section .bss"
804 #define SDATA_SECTION_ASM_OP "\t.section .sdata,\"aw\""
805 #define SBSS_SECTION_ASM_OP  "\t.section .sbss,\"aw\""
806
807 #define SCOMMON_ASM_OP         "\t.scomm\t"
808 #define ZCOMMON_ASM_OP         "\t.zcomm\t"
809 #define TCOMMON_ASM_OP         "\t.tcomm\t"
810
811 #define ASM_COMMENT_START "#"
812
813 /* Output to assembler file text saying following lines
814    may contain character constants, extra white space, comments, etc.  */
815
816 #define ASM_APP_ON "#APP\n"
817
818 /* Output to assembler file text saying following lines
819    no longer contain unusual constructs.  */
820
821 #define ASM_APP_OFF "#NO_APP\n"
822
823 #undef  USER_LABEL_PREFIX
824 #define USER_LABEL_PREFIX "_"
825
826 #define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL)  \
827   if (! v850_output_addr_const_extra (FILE, X)) \
828      goto FAIL
829
830 /* This says how to output the assembler to define a global
831    uninitialized but not common symbol.  */
832
833 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
834   asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))
835
836 #undef  ASM_OUTPUT_ALIGNED_BSS 
837 #define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
838   v850_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
839
840 /* This says how to output the assembler to define a global
841    uninitialized, common symbol.  */
842 #undef  ASM_OUTPUT_ALIGNED_COMMON
843 #undef  ASM_OUTPUT_COMMON
844 #define ASM_OUTPUT_ALIGNED_DECL_COMMON(FILE, DECL, NAME, SIZE, ALIGN) \
845      v850_output_common (FILE, DECL, NAME, SIZE, ALIGN)
846
847 /* This says how to output the assembler to define a local
848    uninitialized symbol.  */
849 #undef  ASM_OUTPUT_ALIGNED_LOCAL
850 #undef  ASM_OUTPUT_LOCAL
851 #define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \
852      v850_output_local (FILE, DECL, NAME, SIZE, ALIGN)
853      
854 /* Globalizing directive for a label.  */
855 #define GLOBAL_ASM_OP "\t.global "
856
857 #define ASM_PN_FORMAT "%s___%lu"
858
859 /* This is how we tell the assembler that two symbols have the same value.  */
860
861 #define ASM_OUTPUT_DEF(FILE,NAME1,NAME2) \
862   do { assemble_name(FILE, NAME1);       \
863        fputs(" = ", FILE);               \
864        assemble_name(FILE, NAME2);       \
865        fputc('\n', FILE); } while (0)
866
867
868 /* How to refer to registers in assembler output.
869    This sequence is indexed by compiler's hard-register-number (see above).  */
870
871 #define REGISTER_NAMES                                         \
872 {  "r0",  "r1",  "r2",  "sp",  "gp",  "r5",  "r6" , "r7",      \
873    "r8",  "r9", "r10", "r11", "r12", "r13", "r14", "r15",      \
874   "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",      \
875   "r24", "r25", "r26", "r27", "r28", "r29",  "ep", "r31",      \
876   "psw", "fcc",      \
877   ".fp", ".ap"}
878
879 /* Register numbers */
880
881 #define ADDITIONAL_REGISTER_NAMES              \
882 { { "zero",    ZERO_REGNUM },                  \
883   { "hp",      2 },                            \
884   { "r3",      3 },                            \
885   { "r4",      4 },                            \
886   { "tp",      5 },                            \
887   { "fp",      29 },                           \
888   { "r30",     30 },                           \
889   { "lp",      LP_REGNUM} }
890
891 #define ASM_OUTPUT_REG_PUSH(FILE,REGNO)
892 #define ASM_OUTPUT_REG_POP(FILE,REGNO)
893
894 /* This is how to output an element of a case-vector that is absolute.  */
895
896 #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \
897   fprintf (FILE, "\t%s .L%d\n",                                 \
898            (TARGET_BIG_SWITCH ? ".long" : ".short"), VALUE)
899
900 /* This is how to output an element of a case-vector that is relative.  */
901
902 /* Disable the shift, which is for the currently disabled "switch"
903    opcode.  Se casesi in v850.md.  */
904
905 #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL)                \
906   fprintf (FILE, "\t%s %s.L%d-.L%d%s\n",                                \
907            (TARGET_BIG_SWITCH ? ".long" : ".short"),                    \
908            (0 && ! TARGET_BIG_SWITCH && (TARGET_V850E || TARGET_V850E2_ALL) ? "(" : ""),             \
909            VALUE, REL,                                                  \
910            (0 && ! TARGET_BIG_SWITCH && (TARGET_V850E || TARGET_V850E2_ALL) ? ")>>1" : ""))
911
912 #define ASM_OUTPUT_ALIGN(FILE, LOG)     \
913   if ((LOG) != 0)                       \
914     fprintf (FILE, "\t.align %d\n", (LOG))
915
916 /* We don't have to worry about dbx compatibility for the v850.  */
917 #define DEFAULT_GDB_EXTENSIONS 1
918
919 /* Use stabs debugging info by default.  */
920 #undef PREFERRED_DEBUGGING_TYPE
921 #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
922
923 /* Specify the machine mode that this machine uses
924    for the index in the tablejump instruction.  */
925 #define CASE_VECTOR_MODE (TARGET_BIG_SWITCH ? SImode : HImode)
926
927 /* Define as C expression which evaluates to nonzero if the tablejump
928    instruction expects the table to contain offsets from the address of the
929    table.
930    Do not define this if the table should contain absolute addresses.  */
931 #define CASE_VECTOR_PC_RELATIVE 1
932
933 /* The switch instruction requires that the jump table immediately follow
934    it.  */
935 #define JUMP_TABLES_IN_TEXT_SECTION (!TARGET_JUMP_TABLES_IN_DATA_SECTION)
936
937 /* svr4.h defines this assuming that 4 byte alignment is required.  */
938 #undef ASM_OUTPUT_BEFORE_CASE_LABEL
939 #define ASM_OUTPUT_BEFORE_CASE_LABEL(FILE,PREFIX,NUM,TABLE) \
940   ASM_OUTPUT_ALIGN ((FILE), (TARGET_BIG_SWITCH ? 2 : 1));
941
942 #define WORD_REGISTER_OPERATIONS
943
944 /* Byte and short loads sign extend the value to a word.  */
945 #define LOAD_EXTEND_OP(MODE) SIGN_EXTEND
946
947 /* This flag, if defined, says the same insns that convert to a signed fixnum
948    also convert validly to an unsigned one.  */
949 #define FIXUNS_TRUNC_LIKE_FIX_TRUNC
950
951 /* Max number of bytes we can move from memory to memory
952    in one reasonably fast instruction.  */
953 #define MOVE_MAX        4
954
955 /* Define if shifts truncate the shift count
956    which implies one can omit a sign-extension or zero-extension
957    of a shift count.  */
958 #define SHIFT_COUNT_TRUNCATED 1
959
960 /* Value is 1 if truncating an integer of INPREC bits to OUTPREC bits
961    is done just by pretending it is already truncated.  */
962 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
963
964 /* Specify the machine mode that pointers have.
965    After generation of rtl, the compiler makes no further distinction
966    between pointers and any other objects of this machine mode.  */
967 #define Pmode SImode
968
969 /* A function address in a call instruction
970    is a byte address (for indexing purposes)
971    so give the MEM rtx a byte's mode.  */
972 #define FUNCTION_MODE QImode
973
974 /* Tell compiler we want to support GHS pragmas */
975 #define REGISTER_TARGET_PRAGMAS() do {                          \
976   c_register_pragma ("ghs", "interrupt", ghs_pragma_interrupt); \
977   c_register_pragma ("ghs", "section",   ghs_pragma_section);   \
978   c_register_pragma ("ghs", "starttda",  ghs_pragma_starttda);  \
979   c_register_pragma ("ghs", "startsda",  ghs_pragma_startsda);  \
980   c_register_pragma ("ghs", "startzda",  ghs_pragma_startzda);  \
981   c_register_pragma ("ghs", "endtda",    ghs_pragma_endtda);    \
982   c_register_pragma ("ghs", "endsda",    ghs_pragma_endsda);    \
983   c_register_pragma ("ghs", "endzda",    ghs_pragma_endzda);    \
984 } while (0)
985
986 /* enum GHS_SECTION_KIND is an enumeration of the kinds of sections that
987    can appear in the "ghs section" pragma.  These names are used to index
988    into the GHS_default_section_names[] and GHS_current_section_names[]
989    that are defined in v850.c, and so the ordering of each must remain
990    consistent. 
991
992    These arrays give the default and current names for each kind of 
993    section defined by the GHS pragmas.  The current names can be changed
994    by the "ghs section" pragma.  If the current names are null, use 
995    the default names.  Note that the two arrays have different types.
996
997    For the *normal* section kinds (like .data, .text, etc.) we do not
998    want to explicitly force the name of these sections, but would rather
999    let the linker (or at least the back end) choose the name of the 
1000    section, UNLESS the user has force a specific name for these section
1001    kinds.  To accomplish this set the name in ghs_default_section_names
1002    to null.  */
1003
1004 enum GHS_section_kind
1005
1006   GHS_SECTION_KIND_DEFAULT,
1007
1008   GHS_SECTION_KIND_TEXT,
1009   GHS_SECTION_KIND_DATA, 
1010   GHS_SECTION_KIND_RODATA,
1011   GHS_SECTION_KIND_BSS,
1012   GHS_SECTION_KIND_SDATA,
1013   GHS_SECTION_KIND_ROSDATA,
1014   GHS_SECTION_KIND_TDATA,
1015   GHS_SECTION_KIND_ZDATA,
1016   GHS_SECTION_KIND_ROZDATA,
1017
1018   COUNT_OF_GHS_SECTION_KINDS  /* must be last */
1019 };
1020
1021 /* The following code is for handling pragmas supported by the
1022    v850 compiler produced by Green Hills Software.  This is at
1023    the specific request of a customer.  */
1024
1025 typedef struct data_area_stack_element
1026 {
1027   struct data_area_stack_element * prev;
1028   v850_data_area                   data_area; /* Current default data area.  */
1029 } data_area_stack_element;
1030
1031 /* Track the current data area set by the
1032    data area pragma (which can be nested).  */
1033 extern data_area_stack_element * data_area_stack;
1034
1035 /* Names of the various data areas used on the v850.  */
1036 extern union tree_node * GHS_default_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
1037 extern union tree_node * GHS_current_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
1038
1039 /* The assembler op to start the file.  */
1040
1041 #define FILE_ASM_OP "\t.file\n"
1042
1043 /* Enable the register move pass to improve code.  */
1044 #define ENABLE_REGMOVE_PASS
1045
1046
1047 /* Implement ZDA, TDA, and SDA */
1048
1049 #define EP_REGNUM 30    /* ep register number */
1050
1051 #define SYMBOL_FLAG_ZDA         (SYMBOL_FLAG_MACH_DEP << 0)
1052 #define SYMBOL_FLAG_TDA         (SYMBOL_FLAG_MACH_DEP << 1)
1053 #define SYMBOL_FLAG_SDA         (SYMBOL_FLAG_MACH_DEP << 2)
1054 #define SYMBOL_REF_ZDA_P(X)     ((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_ZDA) != 0)
1055 #define SYMBOL_REF_TDA_P(X)     ((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_TDA) != 0)
1056 #define SYMBOL_REF_SDA_P(X)     ((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_SDA) != 0)
1057
1058 #define TARGET_ASM_INIT_SECTIONS v850_asm_init_sections
1059
1060 /* Define this so that the cc1plus will not think that system header files
1061    need an implicit 'extern "C" { ... }' assumed.  This breaks testing C++
1062    in a build directory where the libstdc++ header files are found via a
1063    -isystem <path-to-build-dir>.  */
1064 #define NO_IMPLICIT_EXTERN_C
1065
1066 #endif /* ! GCC_V850_H */