OSDN Git Service

Add PC-relative branch support to Moxie port.
[pf3gnuchains/gcc-fork.git] / gcc / config / moxie / moxie.h
1 /* Target Definitions for moxie.
2    Copyright (C) 2008, 2009  Free Software Foundation, Inc.
3    Contributed by Anthony Green.
4
5    This file is part of GCC.
6
7    GCC is free software; you can redistribute it and/or modify it
8    under the terms of the GNU General Public License as published
9    by the Free Software Foundation; either version 3, or (at your
10    option) any later version.
11
12    GCC is distributed in the hope that it will be useful, but WITHOUT
13    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
15    License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with GCC; see the file COPYING3.  If not see
19    <http://www.gnu.org/licenses/>.  */
20
21 #ifndef GCC_MOXIE_H
22 #define GCC_MOXIE_H
23
24 /* This is defined by svr4.h, which is included prior to this file.
25    However, we should undefine it for moxie-elf, since we don't provide
26    functions like access() and mkdir() in newlib.  This will have to
27    be defined again for a Linux port.  */
28 #undef TARGET_POSIX_IO
29
30 /* Another C string constant used much like `LINK_SPEC'.  The difference
31    between the two is that `STARTFILE_SPEC' is used at the very beginning of
32    the command given to the linker.
33
34    If this macro is not defined, a default is provided that loads the standard
35    C startup file from the usual place.  See `gcc.c'.
36
37    Defined in svr4.h.  */
38 #undef  STARTFILE_SPEC
39 #define STARTFILE_SPEC "crt0%O%s crti.o%s crtbegin.o%s"
40
41 /* Provide an ENDFILE_SPEC appropriate for svr4.  Here we tack on our own
42    magical crtend.o file (see crtstuff.c) which provides part of the
43    support for getting C++ file-scope static object constructed before
44    entering `main', followed by the normal svr3/svr4 "finalizer" file,
45    which is either `gcrtn.o' or `crtn.o'.  */
46
47 #undef  ENDFILE_SPEC
48 #define ENDFILE_SPEC "crtend.o%s crtn.o%s"
49
50 /* Provide a LIB_SPEC appropriate for svr4.  Here we tack on the default
51    standard C library (unless we are building a shared library) and
52    the simulator BSP code.  */
53
54 #undef LIB_SPEC
55 #define LIB_SPEC "%{!shared:%{!symbolic:-lc}}"
56
57 /* Layout of Source Language Data Types */
58
59 #define INT_TYPE_SIZE 32
60 #define SHORT_TYPE_SIZE 16
61 #define LONG_TYPE_SIZE 32
62 #define LONG_LONG_TYPE_SIZE 64
63
64 #define FLOAT_TYPE_SIZE 32
65 #define DOUBLE_TYPE_SIZE 64
66 #define LONG_DOUBLE_TYPE_SIZE 64
67
68 #define DEFAULT_SIGNED_CHAR 1
69
70 /* Registers...
71
72    $fp  - frame pointer
73    $sp  - stack pointer
74    $r0  - general purpose 32-bit register.
75    $r1  - general purpose 32-bit register.
76    $r2  - general purpose 32-bit register.
77    $r3  - general purpose 32-bit register.
78    $r4  - general purpose 32-bit register.
79    $r5  - general purpose 32-bit register.
80    $r6  - general purpose 32-bit register.
81    $r7  - general purpose 32-bit register.
82    $r8  - general purpose 32-bit register.
83    $r9  - general purpose 32-bit register.
84    $r10 - general purpose 32-bit register.
85    $r11 - general purpose 32-bit register.
86    $r12 - general purpose 32-bit register.
87    $r13 - reserved for execution environment.
88
89    Special Registers...
90
91    $pc - 32-bit program counter.
92    
93 */
94
95 #define REGISTER_NAMES {        \
96   "$fp", "$sp", "$r0", "$r1",   \
97   "$r2", "$r3", "$r4", "$r5",   \
98   "$r6", "$r7", "$r8", "$r9",   \
99   "$r10", "$r11", "$r12", "$r13",   \
100   "?fp", "?ap", "$pc", "?cc" }
101
102 #define MOXIE_FP     0
103 #define MOXIE_SP     1
104 #define MOXIE_R0     2
105 #define MOXIE_R1     3 
106 #define MOXIE_R2     4
107 #define MOXIE_R3     5
108 #define MOXIE_R4     6
109 #define MOXIE_R5     7
110 #define MOXIE_R6     8
111 #define MOXIE_R7     9
112 #define MOXIE_R8     10
113 #define MOXIE_R9     11
114 #define MOXIE_R10    12
115 #define MOXIE_R11    13
116 #define MOXIE_R12    14
117 #define MOXIE_R13    15
118 #define MOXIE_QFP    16
119 #define MOXIE_QAP    17
120 #define MOXIE_PC     18
121 #define MOXIE_CC     19
122
123 #define FIRST_PSEUDO_REGISTER 20
124
125 enum reg_class
126 {
127   NO_REGS,
128   GENERAL_REGS,
129   SPECIAL_REGS,
130   CC_REG,
131   ALL_REGS,
132   LIM_REG_CLASSES
133 };
134
135
136 /* The following macro defines cover classes for Integrated Register
137    Allocator.  Cover classes is a set of non-intersected register
138    classes covering all hard registers used for register allocation
139    purpose.  Any move between two registers of a cover class should be
140    cheaper than load or store of the registers.  The macro value is
141    array of register classes with LIM_REG_CLASSES used as the end
142    marker.  */
143 #define IRA_COVER_CLASSES { GENERAL_REGS, LIM_REG_CLASSES }
144
145 #define REG_CLASS_CONTENTS \
146 { { 0x00000000 }, /* Empty */                      \
147   { 0x0003FFFF }, /* $fp, $sp, $r0 to $r5, ?fp */  \
148   { 0x00040000 }, /* $pc */                        \
149   { 0x00080000 }, /* ?cc */                        \
150   { 0x000FFFFF }  /* All registers */              \
151 }
152
153 #define N_REG_CLASSES LIM_REG_CLASSES
154
155 #define REG_CLASS_NAMES {\
156     "NO_REGS", \
157     "GENERAL_REGS", \
158     "SPECIAL_REGS", \
159     "CC_REG", \
160     "ALL_REGS" }
161
162 #define FIXED_REGISTERS     { 1, 1, 0, 0, \
163                               0, 0, 0, 0, \
164                               0, 0, 0, 0, \
165                               0, 0, 0, 1, \
166                               1, 1, 1, 1 }
167
168 #define CALL_USED_REGISTERS { 1, 1, 1, 1, \
169                               0, 0, 0, 0, \
170                               0, 0, 0, 0, \
171                               0, 0, 1, 1, \
172                               1, 1, 1, 1 }
173
174 /* We can't copy to or from our CC register. */
175 #define AVOID_CCMODE_COPIES 1
176
177 /* A C expression that is nonzero if it is permissible to store a
178    value of mode MODE in hard register number REGNO (or in several
179    registers starting with that one).  All gstore registers are 
180    equivalent, so we can set this to 1.  */
181 #define HARD_REGNO_MODE_OK(R,M) 1
182
183 /* A C expression whose value is a register class containing hard
184    register REGNO.  */
185 #define REGNO_REG_CLASS(R) ((R < MOXIE_PC) ? GENERAL_REGS : \
186                             (R == MOXIE_CC ? CC_REG : SPECIAL_REGS))
187
188 /* A C expression for the number of consecutive hard registers,
189    starting at register number REGNO, required to hold a value of mode
190    MODE.  */
191 #define HARD_REGNO_NREGS(REGNO, MODE)                      \
192   ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1)             \
193    / UNITS_PER_WORD)
194
195 /* A C expression that is nonzero if a value of mode MODE1 is
196    accessible in mode MODE2 without copying.  */
197 #define MODES_TIEABLE_P(MODE1, MODE2) 1
198
199 /* A C expression for the maximum number of consecutive registers of
200    class CLASS needed to hold a value of mode MODE.  */
201 #define CLASS_MAX_NREGS(CLASS, MODE) \
202   ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
203
204 /* A C expression that places additional restrictions on the register
205    class to use when it is necessary to copy value X into a register
206    in class CLASS.  */
207 #define PREFERRED_RELOAD_CLASS(X,CLASS) CLASS
208
209 /* The Overall Framework of an Assembler File */
210
211 #undef  ASM_SPEC
212 #define ASM_COMMENT_START "#"
213 #define ASM_APP_ON ""
214 #define ASM_APP_OFF ""
215
216 #define FILE_ASM_OP     "\t.file\n"
217
218 /* Switch to the text or data segment.  */
219 #define TEXT_SECTION_ASM_OP  "\t.text"
220 #define DATA_SECTION_ASM_OP  "\t.data"
221
222 /* Assembler Commands for Alignment */
223
224 #define ASM_OUTPUT_ALIGN(STREAM,POWER) \
225         fprintf (STREAM, "\t.p2align\t%d\n", POWER);
226
227 /* A C compound statement to output to stdio stream STREAM the
228    assembler syntax for an instruction operand X.  */
229 #define PRINT_OPERAND(STREAM, X, CODE) moxie_print_operand (STREAM, X, CODE)
230
231 #define PRINT_OPERAND_ADDRESS(STREAM ,X) moxie_print_operand_address (STREAM, X)
232
233 /* Output and Generation of Labels */
234
235 #define GLOBAL_ASM_OP "\t.global\t"
236
237 /* Passing Arguments in Registers */
238
239 /* A C expression that controls whether a function argument is passed
240    in a register, and which register.  */
241 #define FUNCTION_ARG(CUM,MODE,TYPE,NAMED) \
242   moxie_function_arg(CUM,MODE,TYPE,NAMED)
243
244 /* A C type for declaring a variable that is used as the first
245    argument of `FUNCTION_ARG' and other related values.  */
246 #define CUMULATIVE_ARGS unsigned int
247
248 /* If defined, the maximum amount of space required for outgoing arguments
249    will be computed and placed into the variable
250    `current_function_outgoing_args_size'.  No space will be pushed
251    onto the stack for each call; instead, the function prologue should
252    increase the stack frame size by this amount.  */
253 #define ACCUMULATE_OUTGOING_ARGS 1
254
255 /* A C statement (sans semicolon) for initializing the variable CUM
256    for the state at the beginning of the argument list.  
257    For moxie, the first arg is passed in register 2 (aka $r0).  */
258 #define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,FNDECL,N_NAMED_ARGS) \
259   (CUM = MOXIE_R0)
260
261 #define MOXIE_FUNCTION_ARG_SIZE(MODE, TYPE)     \
262   ((MODE) != BLKmode ? GET_MODE_SIZE (MODE)     \
263    : (unsigned) int_size_in_bytes (TYPE))
264
265 #define FUNCTION_ARG_ADVANCE(CUM,MODE,TYPE,NAMED) \
266   (CUM = (CUM < MOXIE_R2 ?                        \
267           CUM + ((3 + MOXIE_FUNCTION_ARG_SIZE(MODE,TYPE))/4) : CUM ))
268
269 /* How Scalar Function Values Are Returned */
270
271 /* These macros are deprecated, but we still need them for now since
272    the version of gcc we're using doesn't fully support
273    TARGET_FUNCTION_VALUE.  */
274 #define FUNCTION_VALUE(VALTYPE, FUNC) \
275   moxie_function_value (VALTYPE, FUNC, 0)
276 #define FUNCTION_OUTGOING_VALUE(VALTYPE, FUNC) \
277   moxie_function_value (VALTYPE, FUNC, 1)
278
279 /* A C expression to create an RTX representing the place where a
280    library function returns a value of mode MODE.  */
281 #define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, 2)
282
283 /* STACK AND CALLING */
284
285 /* Define this macro if pushing a word onto the stack moves the stack
286    pointer to a smaller address.  */
287 #define STACK_GROWS_DOWNWARD
288
289 #define INITIAL_FRAME_POINTER_OFFSET(DEPTH) (DEPTH) = 0
290
291 /* Offset from the frame pointer to the first local variable slot to
292    be allocated.  */
293 #define STARTING_FRAME_OFFSET 0
294
295 /* Define this if the above stack space is to be considered part of the
296    space allocated by the caller.  */
297 #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
298 #define STACK_PARMS_IN_REG_PARM_AREA
299
300 /* Define this if it is the responsibility of the caller to allocate
301    the area reserved for arguments passed in registers.  */
302 #define REG_PARM_STACK_SPACE(FNDECL) (2 * UNITS_PER_WORD)
303
304 /* Offset from the argument pointer register to the first argument's
305    address.  On some machines it may depend on the data type of the
306    function.  */
307 #define FIRST_PARM_OFFSET(F) 12
308
309 /* Define this macro to nonzero value if the addresses of local variable slots
310    are at negative offsets from the frame pointer.  */
311 #define FRAME_GROWS_DOWNWARD 1
312
313 /* Define this macro as a C expression that is nonzero for registers that are
314    used by the epilogue or the return pattern.  The stack and frame
315    pointer registers are already assumed to be used as needed.  */
316 #define EPILOGUE_USES(R) (R == MOXIE_R5)
317
318 #define OVERRIDE_OPTIONS moxie_override_options ()
319
320 /* Storage Layout */
321
322 #define BITS_BIG_ENDIAN 0
323 #define BYTES_BIG_ENDIAN 1
324 #define WORDS_BIG_ENDIAN 1
325
326 /* Alignment required for a function entry point, in bits.  */
327 #define FUNCTION_BOUNDARY 16
328
329 /* Define this macro as a C expression which is nonzero if accessing
330    less than a word of memory (i.e. a `char' or a `short') is no
331    faster than accessing a word of memory.  */
332 #define SLOW_BYTE_ACCESS 1
333
334 /* Number of storage units in a word; normally the size of a
335    general-purpose register, a power of two from 1 or 8.  */
336 #define UNITS_PER_WORD 4
337
338 /* Define this macro to the minimum alignment enforced by hardware
339    for the stack pointer on this machine.  The definition is a C
340    expression for the desired alignment (measured in bits).  */
341 #define STACK_BOUNDARY 32
342
343 /* Normal alignment required for function parameters on the stack, in
344    bits.  All stack parameters receive at least this much alignment
345    regardless of data type.  */
346 #define PARM_BOUNDARY 32
347
348 /* Alignment of field after `int : 0' in a structure.  */
349 #define EMPTY_FIELD_BOUNDARY  32
350
351 /* No data type wants to be aligned rounder than this.  */
352 #define BIGGEST_ALIGNMENT 32
353
354 /* The best alignment to use in cases where we have a choice.  */
355 #define FASTEST_ALIGNMENT 32
356
357 /* Every structures size must be a multiple of 8 bits.  */
358 #define STRUCTURE_SIZE_BOUNDARY 8
359
360 /* Look at the fundamental type that is used for a bit-field and use 
361    that to impose alignment on the enclosing structure.
362    struct s {int a:8}; should have same alignment as "int", not "char".  */
363 #define PCC_BITFIELD_TYPE_MATTERS       1
364
365 /* Largest integer machine mode for structures.  If undefined, the default
366    is GET_MODE_SIZE(DImode).  */
367 #define MAX_FIXED_MODE_SIZE 32
368
369 /* Make strings word-aligned so strcpy from constants will be faster.  */
370 #define CONSTANT_ALIGNMENT(EXP, ALIGN)  \
371   ((TREE_CODE (EXP) == STRING_CST       \
372     && (ALIGN) < FASTEST_ALIGNMENT)     \
373    ? FASTEST_ALIGNMENT : (ALIGN))
374
375 /* Make arrays of chars word-aligned for the same reasons.  */
376 #define DATA_ALIGNMENT(TYPE, ALIGN)             \
377   (TREE_CODE (TYPE) == ARRAY_TYPE               \
378    && TYPE_MODE (TREE_TYPE (TYPE)) == QImode    \
379    && (ALIGN) < FASTEST_ALIGNMENT ? FASTEST_ALIGNMENT : (ALIGN))
380      
381 /* Set this nonzero if move instructions will actually fail to work
382    when given unaligned data.  */
383 #define STRICT_ALIGNMENT 1
384
385 /* Generating Code for Profiling */
386 #define FUNCTION_PROFILER(FILE,LABELNO) (abort (), 0)
387
388 /* Trampolines for Nested Functions.  */
389 #define TRAMPOLINE_SIZE (2 + 6 + 6 + 2 + 6)
390
391 /* Alignment required for trampolines, in bits.  */
392 #define TRAMPOLINE_ALIGNMENT 16
393
394 /* A C statement to initialize the variable parts of a trampoline.  ADDR is an
395    RTX for the address of the trampoline; FNADDR is an RTX for the address of
396    the nested function; STATIC_CHAIN is an RTX for the static chain value that
397    should be passed to the function when it is called.  */
398 #define INITIALIZE_TRAMPOLINE(ADDR, FNADDR, STATIC_CHAIN)                     \
399 do                                                                            \
400 {                                                                             \
401   emit_move_insn (gen_rtx_MEM (SImode,                                        \
402                                plus_constant (ADDR, 4)), STATIC_CHAIN);       \
403   emit_move_insn (gen_rtx_MEM (SImode, plus_constant (ADDR, 18)), FNADDR);    \
404 } while (0);
405
406 /* A C statement to output, on the stream FILE, assembler code for a
407    block of data that contains the constant parts of a trampoline.
408    This code should not include a label--the label is taken care of
409    automatically.  */
410 #define TRAMPOLINE_TEMPLATE(FILE)               \
411 {                                               \
412   fprintf (FILE, "\tpush  $sp, $r0\n");         \
413   fprintf (FILE, "\tldi.l $r0, 0x0\n");         \
414   fprintf (FILE, "\tsto.l 0x8($fp), $r0\n");    \
415   fprintf (FILE, "\tpop   $sp, $r0\n");         \
416   fprintf (FILE, "\tjmpa  0x0\n");              \
417 }
418
419 /* An alias for the machine mode for pointers.  */
420 #define Pmode         SImode
421
422 /* An alias for the machine mode used for memory references to
423    functions being called, in `call' RTL expressions.  */
424 #define FUNCTION_MODE QImode
425
426 /* The register number of the stack pointer register, which must also
427    be a fixed register according to `FIXED_REGISTERS'.  */
428 #define STACK_POINTER_REGNUM 1
429
430 /* The register number of the frame pointer register, which is used to
431    access automatic variables in the stack frame.  */
432 #define FRAME_POINTER_REGNUM MOXIE_QFP
433
434 /* The register number of the arg pointer register, which is used to
435    access the function's argument list.  */
436 #define ARG_POINTER_REGNUM MOXIE_QAP
437
438 /* If the static chain is passed in memory, these macros provide rtx
439    giving 'mem' expressions that denote where they are stored.
440    'STATIC_CHAIN' and 'STATIC_CHAIN_INCOMING' give the locations as
441    seen by the calling and called functions, respectively.  */
442
443 #define STATIC_CHAIN                                                    \
444   gen_rtx_MEM (Pmode, plus_constant (stack_pointer_rtx, -UNITS_PER_WORD))
445
446 #define STATIC_CHAIN_INCOMING                                           \
447   gen_rtx_MEM (Pmode, plus_constant (arg_pointer_rtx, 2 * UNITS_PER_WORD))
448
449 #define HARD_FRAME_POINTER_REGNUM MOXIE_FP
450
451 #if 0
452 #define ELIMINABLE_REGS                                                 \
453 {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM },                        \
454  { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM },                   \
455  { ARG_POINTER_REGNUM,   STACK_POINTER_REGNUM },                        \
456  { ARG_POINTER_REGNUM,   HARD_FRAME_POINTER_REGNUM }}                   
457 #else
458 #define ELIMINABLE_REGS                                                 \
459 {{ FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM },                   \
460  { ARG_POINTER_REGNUM,   HARD_FRAME_POINTER_REGNUM }}                   
461 #endif
462
463 /* A C expression that returns nonzero if the compiler is allowed to
464    try to replace register number FROM-REG with register number
465    TO-REG.  This macro need only be defined if `ELIMINABLE_REGS' is
466    defined, and will usually be the constant 1, since most of the
467    cases preventing register elimination are things that the compiler
468    already knows about.  */
469 #define CAN_ELIMINATE(FROM, TO) 1
470
471 /* This macro is similar to `INITIAL_FRAME_POINTER_OFFSET'.  It
472    specifies the initial difference between the specified pair of
473    registers.  This macro must be defined if `ELIMINABLE_REGS' is
474    defined.  */
475 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET)                    \
476   do {                                                                  \
477     (OFFSET) = moxie_initial_elimination_offset ((FROM), (TO));         \
478   } while (0)
479
480 /* A C expression that is nonzero if REGNO is the number of a hard
481    register in which function arguments are sometimes passed.  */
482 #define FUNCTION_ARG_REGNO_P(r) (r == MOXIE_R0 || r == MOXIE_R1)
483
484 /* A C expression that is nonzero if REGNO is the number of a hard
485    register in which the values of called function may come back.  */
486 #define FUNCTION_VALUE_REGNO_P(r) (r == MOXIE_R0)
487
488 /* A macro whose definition is the name of the class to which a valid
489    base register must belong.  A base register is one used in an
490    address which is the register value plus a displacement.  */
491 #define BASE_REG_CLASS GENERAL_REGS
492
493 #define INDEX_REG_CLASS NO_REGS
494
495 #define HARD_REGNO_OK_FOR_BASE_P(NUM) \
496   ((NUM) >= 0 && (NUM) < FIRST_PSEUDO_REGISTER \
497    && (REGNO_REG_CLASS(NUM) == GENERAL_REGS \
498        || (NUM) == HARD_FRAME_POINTER_REGNUM))
499
500 /* A C expression which is nonzero if register number NUM is suitable
501    for use as a base register in operand addresses.  */
502 #ifdef REG_OK_STRICT
503 #define REGNO_OK_FOR_BASE_P(NUM)                 \
504   (HARD_REGNO_OK_FOR_BASE_P(NUM)                 \
505    || HARD_REGNO_OK_FOR_BASE_P(reg_renumber[(NUM)]))
506 #else
507 #define REGNO_OK_FOR_BASE_P(NUM)                 \
508   ((NUM) >= FIRST_PSEUDO_REGISTER || HARD_REGNO_OK_FOR_BASE_P(NUM))
509 #endif
510
511 /* A C expression which is nonzero if register number NUM is suitable
512    for use as an index register in operand addresses.  */
513 #define REGNO_OK_FOR_INDEX_P(NUM) MOXIE_FP
514
515 /* The maximum number of bytes that a single instruction can move
516    quickly between memory and registers or between two memory
517    locations.  */
518 #define MOVE_MAX 4
519 #define TRULY_NOOP_TRUNCATION(op,ip) 1
520
521 #define RETURN_POPS_ARGS(FUNDECL, FUNTYPE, STACK_SIZE) 0
522
523 /* A C expression that is nonzero if X is a legitimate constant for
524    an immediate operand on the target machine.  */
525 #define LEGITIMATE_CONSTANT_P(X) 1
526
527 #define FRAME_POINTER_REQUIRED 1
528
529 /* A C expression that is 1 if the RTX X is a constant which is a
530    valid address.  */
531 #define CONSTANT_ADDRESS_P(X) CONSTANT_P(X)
532
533 /* A number, the maximum number of registers that can appear in a
534    valid memory address.  */
535 #define MAX_REGS_PER_ADDRESS 1
536
537 #define TRULY_NOOP_TRUNCATION(op,ip) 1
538
539 /* An alias for a machine mode name.  This is the machine mode that
540    elements of a jump-table should have.  */
541 #define CASE_VECTOR_MODE SImode
542
543 /* A C compound statement with a conditional `goto LABEL;' executed
544    if X (an RTX) is a legitimate memory address on the target machine
545    for a memory operand of mode MODE.  */
546 #define GO_IF_LEGITIMATE_ADDRESS(MODE,X,LABEL)          \
547   do {                                                  \
548     if (GET_CODE(X) == PLUS)                            \
549       {                                                 \
550         rtx op1,op2;                                    \
551         op1 = XEXP(X,0);                                \
552         op2 = XEXP(X,1);                                \
553         if (GET_CODE(op1) == REG                        \
554             && CONSTANT_ADDRESS_P(op2)                  \
555             && REGNO_OK_FOR_BASE_P(REGNO(op1)))         \
556           goto LABEL;                                   \
557       }                                                 \
558     if (REG_P (X) && REGNO_OK_FOR_BASE_P (REGNO (X)))   \
559       goto LABEL;                                       \
560     if (GET_CODE (X) == SYMBOL_REF                      \
561         || GET_CODE (X) == LABEL_REF                    \
562         || GET_CODE (X) == CONST)                       \
563       goto LABEL;                                       \
564   } while (0)
565
566 /* Run-time Target Specification */
567
568 #define TARGET_CPU_CPP_BUILTINS() \
569   { \
570     builtin_define_std ("moxie");               \
571     builtin_define_std ("MOXIE");               \
572   }
573
574 #define HAS_LONG_UNCOND_BRANCH true
575
576 #endif /* GCC_MOXIE_H */