f99a85d9593c7cf3f211455709061835a2127375
[platform/upstream/gcc.git] / gcc / config / iq2000 / iq2000.h
1 /* Definitions of target machine for GNU compiler.  
2    Vitesse IQ2000 processors
3    Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
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 /* Driver configuration.  */
22
23 #undef  SWITCH_TAKES_ARG
24 #define SWITCH_TAKES_ARG(CHAR)                                          \
25   (DEFAULT_SWITCH_TAKES_ARG (CHAR) || (CHAR) == 'G')
26
27 /* The svr4.h LIB_SPEC with -leval and --*group tacked on */
28 #undef  LIB_SPEC
29 #define LIB_SPEC "%{!shared:%{!symbolic:--start-group -lc -leval -lgcc --end-group}}"
30
31 #undef STARTFILE_SPEC
32 #undef ENDFILE_SPEC
33
34 \f
35 /* Run-time target specifications.  */
36
37 #define TARGET_CPU_CPP_BUILTINS()               \
38   do                                            \
39     {                                           \
40       builtin_define ("__iq2000__");            \
41       builtin_assert ("cpu=iq2000");            \
42       builtin_assert ("machine=iq2000");        \
43     }                                           \
44   while (0)
45
46 /* Macros used in the machine description to test the flags.  */
47
48 #define TARGET_STATS            0
49
50 #define TARGET_DEBUG_MODE       0
51 #define TARGET_DEBUG_A_MODE     0
52 #define TARGET_DEBUG_B_MODE     0
53 #define TARGET_DEBUG_C_MODE     0
54 #define TARGET_DEBUG_D_MODE     0
55
56 #ifndef IQ2000_ISA_DEFAULT
57 #define IQ2000_ISA_DEFAULT 1
58 #endif
59
60 #define IQ2000_VERSION "[1.0]"
61
62 #ifndef MACHINE_TYPE
63 #define MACHINE_TYPE "IQ2000"
64 #endif
65
66 #ifndef TARGET_VERSION_INTERNAL
67 #define TARGET_VERSION_INTERNAL(STREAM)                                 \
68   fprintf (STREAM, " %s %s", IQ2000_VERSION, MACHINE_TYPE)
69 #endif
70
71 #ifndef TARGET_VERSION
72 #define TARGET_VERSION TARGET_VERSION_INTERNAL (stderr)
73 #endif
74
75 #define OVERRIDE_OPTIONS override_options ()
76
77 #define CAN_DEBUG_WITHOUT_FP
78 \f
79 /* Storage Layout.  */
80
81 #define BITS_BIG_ENDIAN                 0
82 #define BYTES_BIG_ENDIAN                1 
83 #define WORDS_BIG_ENDIAN                1
84 #define LIBGCC2_WORDS_BIG_ENDIAN        1
85 #define BITS_PER_WORD                   32
86 #define MAX_BITS_PER_WORD               64
87 #define UNITS_PER_WORD                  4
88 #define MIN_UNITS_PER_WORD              4
89 #define POINTER_SIZE                    32
90
91 /* Define this macro if it is advisable to hold scalars in registers
92    in a wider mode than that declared by the program.  In such cases,
93    the value is constrained to be within the bounds of the declared
94    type, but kept valid in the wider mode.  The signedness of the
95    extension may differ from that of the type.
96
97    We promote any value smaller than SImode up to SImode.  */
98
99 #define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE)     \
100   if (GET_MODE_CLASS (MODE) == MODE_INT         \
101       && GET_MODE_SIZE (MODE) < 4)              \
102     (MODE) = SImode;
103
104 #define PARM_BOUNDARY 32
105
106 #define STACK_BOUNDARY 64
107
108 #define FUNCTION_BOUNDARY 32
109
110 #define BIGGEST_ALIGNMENT 64
111
112 #undef  DATA_ALIGNMENT
113 #define DATA_ALIGNMENT(TYPE, ALIGN)                                     \
114   ((((ALIGN) < BITS_PER_WORD)                                           \
115     && (TREE_CODE (TYPE) == ARRAY_TYPE                                  \
116         || TREE_CODE (TYPE) == UNION_TYPE                               \
117         || TREE_CODE (TYPE) == RECORD_TYPE)) ? BITS_PER_WORD : (ALIGN))
118
119 #define CONSTANT_ALIGNMENT(EXP, ALIGN)                                  \
120   ((TREE_CODE (EXP) == STRING_CST  || TREE_CODE (EXP) == CONSTRUCTOR)   \
121    && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
122
123 #define EMPTY_FIELD_BOUNDARY 32
124
125 #define STRUCTURE_SIZE_BOUNDARY 8
126
127 #define STRICT_ALIGNMENT 1
128
129 #define PCC_BITFIELD_TYPE_MATTERS 1
130
131 \f
132 /* Layout of Source Language Data Types.  */
133
134 #define INT_TYPE_SIZE           32
135 #define SHORT_TYPE_SIZE         16
136 #define LONG_TYPE_SIZE          32
137 #define LONG_LONG_TYPE_SIZE     64
138 #define CHAR_TYPE_SIZE          BITS_PER_UNIT
139 #define FLOAT_TYPE_SIZE         32
140 #define DOUBLE_TYPE_SIZE        64
141 #define LONG_DOUBLE_TYPE_SIZE   64
142 #define DEFAULT_SIGNED_CHAR     1
143
144 \f
145 /* Register Basics.  */
146
147 /* On the IQ2000, we have 32 integer registers.  */
148 #define FIRST_PSEUDO_REGISTER 33
149
150 #define FIXED_REGISTERS                                                 \
151 {                                                                       \
152   1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,                       \
153   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1                     \
154 }
155
156 #define CALL_USED_REGISTERS                                             \
157 {                                                                       \
158   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,                       \
159   0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1                     \
160 }
161
162 \f
163 /* Order of allocation of registers.  */
164
165 #define REG_ALLOC_ORDER                                                 \
166 {  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15,       \
167   16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31        \
168 }
169
170 \f
171 /* How Values Fit in Registers.  */
172
173 #define HARD_REGNO_NREGS(REGNO, MODE)   \
174   ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
175
176 #define HARD_REGNO_MODE_OK(REGNO, MODE)                         \
177  ((REGNO_REG_CLASS (REGNO) == GR_REGS)                          \
178   ? ((REGNO) & 1) == 0 || GET_MODE_SIZE (MODE) <= 4             \
179   : ((REGNO) & 1) == 0 || GET_MODE_SIZE (MODE) == 4)
180
181 #define MODES_TIEABLE_P(MODE1, MODE2)                           \
182   ((GET_MODE_CLASS (MODE1) == MODE_FLOAT ||                     \
183     GET_MODE_CLASS (MODE1) == MODE_COMPLEX_FLOAT)               \
184    == (GET_MODE_CLASS (MODE2) == MODE_FLOAT ||                  \
185        GET_MODE_CLASS (MODE2) == MODE_COMPLEX_FLOAT))
186
187 #define AVOID_CCMODE_COPIES
188
189 \f
190 /* Register Classes.  */
191
192 enum reg_class
193 {
194   NO_REGS,                      /* No registers in set.  */
195   GR_REGS,                      /* Integer registers.  */
196   ALL_REGS,                     /* All registers.  */
197   LIM_REG_CLASSES               /* Max value + 1.  */
198 };
199
200 #define GENERAL_REGS GR_REGS
201
202 #define N_REG_CLASSES (int) LIM_REG_CLASSES
203
204 #define REG_CLASS_NAMES                                         \
205 {                                                               \
206   "NO_REGS",                                                    \
207   "GR_REGS",                                                    \
208   "ALL_REGS"                                                    \
209 }
210
211 #define REG_CLASS_CONTENTS                                      \
212 {                                                               \
213   { 0x00000000, 0x00000000 },   /* No registers,  */            \
214   { 0xffffffff, 0x00000000 },   /* Integer registers.  */       \
215   { 0xffffffff, 0x00000001 }    /* All registers.  */           \
216 }
217
218 #define REGNO_REG_CLASS(REGNO) \
219 ((REGNO) <= GP_REG_LAST + 1 ? GR_REGS : NO_REGS)
220
221 #define BASE_REG_CLASS  (GR_REGS)
222
223 #define INDEX_REG_CLASS NO_REGS
224
225 #define REG_CLASS_FROM_LETTER(C) \
226   ((C) == 'd' ? GR_REGS :        \
227    (C) == 'b' ? ALL_REGS :       \
228    (C) == 'y' ? GR_REGS :        \
229    NO_REGS)
230
231 #define REGNO_OK_FOR_INDEX_P(regno)     0
232
233 #define PREFERRED_RELOAD_CLASS(X,CLASS)                         \
234   ((CLASS) != ALL_REGS                                          \
235    ? (CLASS)                                                    \
236    : ((GET_MODE_CLASS (GET_MODE (X)) == MODE_FLOAT              \
237        || GET_MODE_CLASS (GET_MODE (X)) == MODE_COMPLEX_FLOAT)  \
238       ? (GR_REGS)                                               \
239       : ((GET_MODE_CLASS (GET_MODE (X)) == MODE_INT             \
240           || GET_MODE (X) == VOIDmode)                          \
241          ? (GR_REGS)                                            \
242          : (CLASS))))
243
244 #define SMALL_REGISTER_CLASSES 0
245
246 #define CLASS_MAX_NREGS(CLASS, MODE)    \
247   ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
248
249 /* For IQ2000:
250
251    `I'  is used for the range of constants an arithmetic insn can
252         actually contain (16-bits signed integers).
253
254    `J'  is used for the range which is just zero (i.e., $r0).
255
256    `K'  is used for the range of constants a logical insn can actually
257         contain (16-bit zero-extended integers).
258
259    `L'  is used for the range of constants that be loaded with lui
260         (i.e., the bottom 16 bits are zero).
261
262    `M'  is used for the range of constants that take two words to load
263         (i.e., not matched by `I', `K', and `L').
264
265    `N'  is used for constants 0xffffnnnn or 0xnnnnffff
266
267    `O'  is a 5-bit zero-extended integer.  */
268
269 #define CONST_OK_FOR_LETTER_P(VALUE, C)                                 \
270   ((C) == 'I' ? ((unsigned HOST_WIDE_INT) ((VALUE) + 0x8000) < 0x10000) \
271    : (C) == 'J' ? ((VALUE) == 0)                                        \
272    : (C) == 'K' ? ((unsigned HOST_WIDE_INT) (VALUE) < 0x10000)          \
273    : (C) == 'L' ? (((VALUE) & 0x0000ffff) == 0                          \
274                    && (((VALUE) & ~2147483647) == 0                     \
275                        || ((VALUE) & ~2147483647) == ~2147483647))      \
276    : (C) == 'M' ? ((((VALUE) & ~0x0000ffff) != 0)                       \
277                    && (((VALUE) & ~0x0000ffff) != ~0x0000ffff)          \
278                    && (((VALUE) & 0x0000ffff) != 0                      \
279                        || (((VALUE) & ~2147483647) != 0                 \
280                            && ((VALUE) & ~2147483647) != ~2147483647))) \
281    : (C) == 'N' ? ((((VALUE) & 0xffff) == 0xffff)                       \
282                    || (((VALUE) & 0xffff0000) == 0xffff0000))           \
283    : (C) == 'O' ? ((unsigned HOST_WIDE_INT) ((VALUE) + 0x20) < 0x40)    \
284    : 0)
285
286 #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)                          \
287   ((C) == 'G'                                                           \
288    && (VALUE) == CONST0_RTX (GET_MODE (VALUE)))
289
290 /* `R' is for memory references which take 1 word for the instruction.  */
291
292 #define EXTRA_CONSTRAINT(OP,CODE)                                       \
293   (((CODE) == 'R')        ? simple_memory_operand (OP, GET_MODE (OP))   \
294    : FALSE)
295
296 \f
297 /* Basic Stack Layout.  */
298
299 #define STACK_GROWS_DOWNWARD
300
301 #define FRAME_GROWS_DOWNWARD 0
302
303 #define STARTING_FRAME_OFFSET                                           \
304   (crtl->outgoing_args_size)
305
306 /* Use the default value zero.  */
307 /* #define STACK_POINTER_OFFSET 0 */
308
309 #define FIRST_PARM_OFFSET(FNDECL) 0
310
311 /* The return address for the current frame is in r31 if this is a leaf
312    function.  Otherwise, it is on the stack.  It is at a variable offset
313    from sp/fp/ap, so we define a fake hard register rap which is a
314    pointer to the return address on the stack.  This always gets eliminated
315    during reload to be either the frame pointer or the stack pointer plus
316    an offset.  */
317
318 #define RETURN_ADDR_RTX(count, frame)                                   \
319   (((count) == 0)                                                       \
320    ? (leaf_function_p ()                                                \
321       ? gen_rtx_REG (Pmode, GP_REG_FIRST + 31)                          \
322       : gen_rtx_MEM (Pmode, gen_rtx_REG (Pmode,                         \
323                                          RETURN_ADDRESS_POINTER_REGNUM))) \
324     : (rtx) 0)
325
326 /* Before the prologue, RA lives in r31.  */
327 #define INCOMING_RETURN_ADDR_RTX  gen_rtx_REG (VOIDmode, GP_REG_FIRST + 31)
328
329 \f
330 /* Register That Address the Stack Frame.  */
331
332 #define STACK_POINTER_REGNUM            (GP_REG_FIRST + 29)
333 #define FRAME_POINTER_REGNUM            (GP_REG_FIRST + 1)
334 #define HARD_FRAME_POINTER_REGNUM       (GP_REG_FIRST + 27)
335 #define ARG_POINTER_REGNUM              GP_REG_FIRST
336 #define RETURN_ADDRESS_POINTER_REGNUM   RAP_REG_NUM
337 #define STATIC_CHAIN_REGNUM             (GP_REG_FIRST + 2)
338
339 \f
340 /* Eliminating the Frame Pointer and the Arg Pointer.  */
341
342 #define FRAME_POINTER_REQUIRED 0
343
344 #define ELIMINABLE_REGS                                                 \
345 {{ ARG_POINTER_REGNUM,   STACK_POINTER_REGNUM},                         \
346  { ARG_POINTER_REGNUM,   HARD_FRAME_POINTER_REGNUM},                    \
347  { RETURN_ADDRESS_POINTER_REGNUM, STACK_POINTER_REGNUM},                \
348  { RETURN_ADDRESS_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM},           \
349  { RETURN_ADDRESS_POINTER_REGNUM, GP_REG_FIRST + 31},                   \
350  { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM},                         \
351  { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM}}
352
353
354 /* We can always eliminate to the frame pointer.  We can eliminate to the 
355    stack pointer unless a frame pointer is needed.  */
356
357 #define CAN_ELIMINATE(FROM, TO)                                         \
358   (((FROM) == RETURN_ADDRESS_POINTER_REGNUM && (! leaf_function_p ()    \
359    || (TO == GP_REG_FIRST + 31 && leaf_function_p)))                    \
360   || ((FROM) != RETURN_ADDRESS_POINTER_REGNUM                           \
361    && ((TO) == HARD_FRAME_POINTER_REGNUM                                \
362    || ((TO) == STACK_POINTER_REGNUM && ! frame_pointer_needed))))
363
364 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET)                     \
365         (OFFSET) = iq2000_initial_elimination_offset ((FROM), (TO))
366 \f
367 /* Passing Function Arguments on the Stack.  */
368
369 /* #define PUSH_ROUNDING(BYTES) 0 */
370
371 #define ACCUMULATE_OUTGOING_ARGS 1
372
373 #define REG_PARM_STACK_SPACE(FNDECL) 0
374
375 #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1
376
377 #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0
378
379 \f
380 /* Function Arguments in Registers.  */
381
382 #define FUNCTION_ARG(CUM, MODE, TYPE, NAMED) \
383   function_arg (& CUM, MODE, TYPE, NAMED)
384
385 #define MAX_ARGS_IN_REGISTERS 8
386
387 typedef struct iq2000_args
388 {
389   int gp_reg_found;             /* Whether a gp register was found yet.  */
390   unsigned int arg_number;      /* Argument number.  */
391   unsigned int arg_words;       /* # total words the arguments take.  */
392   unsigned int fp_arg_words;    /* # words for FP args (IQ2000_EABI only).  */
393   int last_arg_fp;              /* Nonzero if last arg was FP (EABI only).  */
394   int fp_code;                  /* Mode of FP arguments.  */
395   unsigned int num_adjusts;     /* Number of adjustments made.  */
396                                 /* Adjustments made to args pass in regs.  */
397   struct rtx_def * adjust[MAX_ARGS_IN_REGISTERS * 2];
398 } CUMULATIVE_ARGS;
399
400 /* Initialize a variable CUM of type CUMULATIVE_ARGS
401    for a call to a function whose data type is FNTYPE.
402    For a library call, FNTYPE is 0.  */
403 #define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \
404   init_cumulative_args (& CUM, FNTYPE, LIBNAME)                         \
405
406 #define FUNCTION_ARG_ADVANCE(CUM, MODE, TYPE, NAMED)                    \
407   function_arg_advance (& CUM, MODE, TYPE, NAMED)
408
409 #define FUNCTION_ARG_PADDING(MODE, TYPE)                                \
410   (! BYTES_BIG_ENDIAN                                                   \
411    ? upward                                                             \
412    : (((MODE) == BLKmode                                                \
413        ? ((TYPE) && TREE_CODE (TYPE_SIZE (TYPE)) == INTEGER_CST         \
414           && int_size_in_bytes (TYPE) < (PARM_BOUNDARY / BITS_PER_UNIT))\
415        : (GET_MODE_BITSIZE (MODE) < PARM_BOUNDARY                       \
416           && (GET_MODE_CLASS (MODE) == MODE_INT)))                      \
417       ? downward : upward))
418
419 #define FUNCTION_ARG_BOUNDARY(MODE, TYPE)                               \
420   (((TYPE) != 0)                                                        \
421         ? ((TYPE_ALIGN(TYPE) <= PARM_BOUNDARY)                          \
422                 ? PARM_BOUNDARY                                         \
423                 : TYPE_ALIGN(TYPE))                                     \
424         : ((GET_MODE_ALIGNMENT(MODE) <= PARM_BOUNDARY)                  \
425                 ? PARM_BOUNDARY                                         \
426                 : GET_MODE_ALIGNMENT(MODE)))
427
428 #define FUNCTION_ARG_REGNO_P(N)                                         \
429   (((N) >= GP_ARG_FIRST && (N) <= GP_ARG_LAST))                 
430
431 \f
432 /* How Scalar Function Values are Returned.  */
433
434 #define FUNCTION_VALUE(VALTYPE, FUNC)   iq2000_function_value (VALTYPE, FUNC)
435
436 #define LIBCALL_VALUE(MODE)                             \
437   gen_rtx_REG (((GET_MODE_CLASS (MODE) != MODE_INT      \
438                  || GET_MODE_SIZE (MODE) >= 4)          \
439                 ? (MODE)                                \
440                 : SImode),                              \
441                GP_RETURN)
442
443 /* On the IQ2000, R2 and R3 are the only register thus used.  */
444
445 #define FUNCTION_VALUE_REGNO_P(N) ((N) == GP_RETURN)
446
447 \f
448 /* How Large Values are Returned.  */
449
450 #define DEFAULT_PCC_STRUCT_RETURN 0
451 \f
452 /* Function Entry and Exit.  */
453
454 #define EXIT_IGNORE_STACK 1
455
456 \f
457 /* Generating Code for Profiling.  */
458
459 #define FUNCTION_PROFILER(FILE, LABELNO)                                \
460 {                                                                       \
461   fprintf (FILE, "\t.set\tnoreorder\n");                                \
462   fprintf (FILE, "\t.set\tnoat\n");                                     \
463   fprintf (FILE, "\tmove\t%s,%s\t\t# save current return address\n",    \
464            reg_names[GP_REG_FIRST + 1], reg_names[GP_REG_FIRST + 31]);  \
465   fprintf (FILE, "\tjal\t_mcount\n");                                   \
466   fprintf (FILE,                                                        \
467            "\t%s\t%s,%s,%d\t\t# _mcount pops 2 words from  stack\n",    \
468            "subu",                                                      \
469            reg_names[STACK_POINTER_REGNUM],                             \
470            reg_names[STACK_POINTER_REGNUM],                             \
471            Pmode == DImode ? 16 : 8);                                   \
472   fprintf (FILE, "\t.set\treorder\n");                                  \
473   fprintf (FILE, "\t.set\tat\n");                                       \
474 }
475
476 \f
477 /* Trampolines for Nested Functions.  */
478
479 /* A C statement to output, on the stream FILE, assembler code for a
480    block of data that contains the constant parts of a trampoline.
481    This code should not include a label--the label is taken care of
482    automatically.  */
483
484 #define TRAMPOLINE_TEMPLATE(STREAM)                                      \
485 {                                                                        \
486   fprintf (STREAM, "\t.word\t0x03e00821\t\t# move   $1,$31\n");         \
487   fprintf (STREAM, "\t.word\t0x04110001\t\t# bgezal $0,.+8\n");         \
488   fprintf (STREAM, "\t.word\t0x00000000\t\t# nop\n");                   \
489   if (Pmode == DImode)                                                  \
490     {                                                                   \
491       fprintf (STREAM, "\t.word\t0xdfe30014\t\t# ld     $3,20($31)\n"); \
492       fprintf (STREAM, "\t.word\t0xdfe2001c\t\t# ld     $2,28($31)\n"); \
493     }                                                                   \
494   else                                                                  \
495     {                                                                   \
496       fprintf (STREAM, "\t.word\t0x8fe30014\t\t# lw     $3,20($31)\n"); \
497       fprintf (STREAM, "\t.word\t0x8fe20018\t\t# lw     $2,24($31)\n"); \
498     }                                                                   \
499   fprintf (STREAM, "\t.word\t0x0060c821\t\t# move   $25,$3 (abicalls)\n"); \
500   fprintf (STREAM, "\t.word\t0x00600008\t\t# jr     $3\n");             \
501   fprintf (STREAM, "\t.word\t0x0020f821\t\t# move   $31,$1\n");         \
502   fprintf (STREAM, "\t.word\t0x00000000\t\t# <function address>\n"); \
503   fprintf (STREAM, "\t.word\t0x00000000\t\t# <static chain value>\n"); \
504 }
505
506 #define TRAMPOLINE_SIZE (40)
507
508 #define TRAMPOLINE_ALIGNMENT 32
509
510 #define INITIALIZE_TRAMPOLINE(ADDR, FUNC, CHAIN)                            \
511 {                                                                           \
512   rtx addr = ADDR;                                                          \
513     emit_move_insn (gen_rtx_MEM (SImode, plus_constant (addr, 32)), FUNC); \
514     emit_move_insn (gen_rtx_MEM (SImode, plus_constant (addr, 36)), CHAIN);\
515 }
516
517 \f
518 /* Addressing Modes.  */
519
520 #define CONSTANT_ADDRESS_P(X)                                           \
521   (   (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF          \
522     || GET_CODE (X) == CONST_INT || GET_CODE (X) == HIGH                \
523     || (GET_CODE (X) == CONST)))
524
525 #define MAX_REGS_PER_ADDRESS 1
526
527 #ifdef REG_OK_STRICT
528 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)         \
529   {                                                     \
530     if (iq2000_legitimate_address_p (MODE, X, 1))       \
531       goto ADDR;                                        \
532   }
533 #else
534 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)         \
535   {                                                     \
536     if (iq2000_legitimate_address_p (MODE, X, 0))       \
537       goto ADDR;                                        \
538   }
539 #endif
540
541 #define REG_OK_FOR_INDEX_P(X) 0
542
543
544 /* For the IQ2000, transform:
545
546         memory(X + <large int>)
547    into:
548         Y = <large int> & ~0x7fff;
549         Z = X + Y
550         memory (Z + (<large int> & 0x7fff));
551 */
552
553 #define LEGITIMIZE_ADDRESS(X,OLDX,MODE,WIN)                             \
554 {                                                                       \
555   rtx xinsn = (X);                                                      \
556                                                                         \
557   if (TARGET_DEBUG_B_MODE)                                              \
558     {                                                                   \
559       GO_PRINTF ("\n========== LEGITIMIZE_ADDRESS\n");                  \
560       GO_DEBUG_RTX (xinsn);                                             \
561     }                                                                   \
562                                                                         \
563   if (iq2000_check_split (X, MODE))             \
564     {                                                                   \
565       X = gen_rtx_LO_SUM (Pmode,                                        \
566                           copy_to_mode_reg (Pmode,                      \
567                                             gen_rtx_HIGH (Pmode, X)),   \
568                           X);                                           \
569       goto WIN;                                                         \
570     }                                                                   \
571                                                                         \
572   if (GET_CODE (xinsn) == PLUS)                                         \
573     {                                                                   \
574       rtx xplus0 = XEXP (xinsn, 0);                                     \
575       rtx xplus1 = XEXP (xinsn, 1);                                     \
576       enum rtx_code code0 = GET_CODE (xplus0);                          \
577       enum rtx_code code1 = GET_CODE (xplus1);                          \
578                                                                         \
579       if (code0 != REG && code1 == REG)                                 \
580         {                                                               \
581           xplus0 = XEXP (xinsn, 1);                                     \
582           xplus1 = XEXP (xinsn, 0);                                     \
583           code0 = GET_CODE (xplus0);                                    \
584           code1 = GET_CODE (xplus1);                                    \
585         }                                                               \
586                                                                         \
587       if (code0 == REG && REG_MODE_OK_FOR_BASE_P (xplus0, MODE)         \
588           && code1 == CONST_INT && !SMALL_INT (xplus1))                 \
589         {                                                               \
590           rtx int_reg = gen_reg_rtx (Pmode);                            \
591           rtx ptr_reg = gen_reg_rtx (Pmode);                            \
592                                                                         \
593           emit_move_insn (int_reg,                                      \
594                           GEN_INT (INTVAL (xplus1) & ~ 0x7fff));        \
595                                                                         \
596           emit_insn (gen_rtx_SET (VOIDmode,                             \
597                                   ptr_reg,                              \
598                                   gen_rtx_PLUS (Pmode, xplus0, int_reg))); \
599                                                                         \
600           X = plus_constant (ptr_reg, INTVAL (xplus1) & 0x7fff);        \
601           goto WIN;                                                     \
602         }                                                               \
603     }                                                                   \
604                                                                         \
605   if (TARGET_DEBUG_B_MODE)                                              \
606     GO_PRINTF ("LEGITIMIZE_ADDRESS could not fix.\n");                  \
607 }
608
609 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) {}
610
611 #define LEGITIMATE_CONSTANT_P(X) (1)
612
613 \f
614 /* Describing Relative Costs of Operations.  */
615
616 #define REGISTER_MOVE_COST(MODE, FROM, TO)      2
617
618 #define MEMORY_MOVE_COST(MODE,CLASS,TO_P)       \
619   (TO_P ? 2 : 16)
620
621 #define BRANCH_COST 2
622
623 #define SLOW_BYTE_ACCESS 1
624
625 #define NO_FUNCTION_CSE 1
626
627 #define ADJUST_COST(INSN,LINK,DEP_INSN,COST)                            \
628   if (REG_NOTE_KIND (LINK) != 0)                                        \
629     (COST) = 0; /* Anti or output dependence.  */
630
631 \f
632 /* Dividing the output into sections.  */
633
634 #define TEXT_SECTION_ASM_OP     "\t.text"       /* Instructions.  */
635
636 #define DATA_SECTION_ASM_OP     "\t.data"       /* Large data.  */
637
638 \f
639 /* The Overall Framework of an Assembler File.  */
640
641 #define ASM_COMMENT_START " #"
642
643 #define ASM_APP_ON "#APP\n"
644
645 #define ASM_APP_OFF "#NO_APP\n"
646
647 \f
648 /* Output and Generation of Labels.  */
649
650 #undef ASM_GENERATE_INTERNAL_LABEL
651 #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)                   \
652   sprintf ((LABEL), "*%s%s%ld", (LOCAL_LABEL_PREFIX), (PREFIX), (long) (NUM))
653
654 #define GLOBAL_ASM_OP "\t.globl\t"
655
656 \f
657 /* Output of Assembler Instructions.  */
658
659 #define REGISTER_NAMES                                                  \
660 {                                                                       \
661  "%0",   "%1",   "%2",   "%3",   "%4",   "%5",   "%6",   "%7",          \
662  "%8",   "%9",   "%10",  "%11",  "%12",  "%13",  "%14",  "%15",         \
663  "%16",  "%17",  "%18",  "%19",  "%20",  "%21",  "%22",  "%23",         \
664  "%24",  "%25",  "%26",  "%27",  "%28",  "%29",  "%30",  "%31",  "%rap" \
665 };
666
667 #define ADDITIONAL_REGISTER_NAMES                                       \
668 {                                                                       \
669   { "%0",        0 + GP_REG_FIRST },                                    \
670   { "%1",        1 + GP_REG_FIRST },                                    \
671   { "%2",        2 + GP_REG_FIRST },                                    \
672   { "%3",        3 + GP_REG_FIRST },                                    \
673   { "%4",        4 + GP_REG_FIRST },                                    \
674   { "%5",        5 + GP_REG_FIRST },                                    \
675   { "%6",        6 + GP_REG_FIRST },                                    \
676   { "%7",        7 + GP_REG_FIRST },                                    \
677   { "%8",        8 + GP_REG_FIRST },                                    \
678   { "%9",        9 + GP_REG_FIRST },                                    \
679   { "%10",      10 + GP_REG_FIRST },                                    \
680   { "%11",      11 + GP_REG_FIRST },                                    \
681   { "%12",      12 + GP_REG_FIRST },                                    \
682   { "%13",      13 + GP_REG_FIRST },                                    \
683   { "%14",      14 + GP_REG_FIRST },                                    \
684   { "%15",      15 + GP_REG_FIRST },                                    \
685   { "%16",      16 + GP_REG_FIRST },                                    \
686   { "%17",      17 + GP_REG_FIRST },                                    \
687   { "%18",      18 + GP_REG_FIRST },                                    \
688   { "%19",      19 + GP_REG_FIRST },                                    \
689   { "%20",      20 + GP_REG_FIRST },                                    \
690   { "%21",      21 + GP_REG_FIRST },                                    \
691   { "%22",      22 + GP_REG_FIRST },                                    \
692   { "%23",      23 + GP_REG_FIRST },                                    \
693   { "%24",      24 + GP_REG_FIRST },                                    \
694   { "%25",      25 + GP_REG_FIRST },                                    \
695   { "%26",      26 + GP_REG_FIRST },                                    \
696   { "%27",      27 + GP_REG_FIRST },                                    \
697   { "%28",      28 + GP_REG_FIRST },                                    \
698   { "%29",      29 + GP_REG_FIRST },                                    \
699   { "%30",      27 + GP_REG_FIRST },                                    \
700   { "%31",      31 + GP_REG_FIRST },                                    \
701   { "%rap",     32 + GP_REG_FIRST },                                    \
702 }
703
704 /* Check if the current insn needs a nop in front of it
705    because of load delays, and also update the delay slot statistics.  */
706
707 #define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS)                      \
708   final_prescan_insn (INSN, OPVEC, NOPERANDS)
709
710 /* See iq2000.c for the IQ2000 specific codes.  */
711 #define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE)
712
713 #define PRINT_OPERAND_PUNCT_VALID_P(CODE) iq2000_print_operand_punct[CODE]
714
715 #define PRINT_OPERAND_ADDRESS(FILE, ADDR) print_operand_address (FILE, ADDR)
716
717 #define DBR_OUTPUT_SEQEND(STREAM)                                       \
718 do                                                                      \
719   {                                                                     \
720     fputs ("\n", STREAM);                                               \
721   }                                                                     \
722 while (0)
723
724 #define LOCAL_LABEL_PREFIX      "$"
725
726 #define USER_LABEL_PREFIX       ""
727
728 \f
729 /* Output of dispatch tables.  */
730
731 #define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL)              \
732   do                                                                    \
733     {                                                                   \
734       fprintf (STREAM, "\t%s\t%sL%d\n",                                 \
735                Pmode == DImode ? ".dword" : ".word",                    \
736                LOCAL_LABEL_PREFIX, VALUE);                              \
737     }                                                                   \
738   while (0)
739
740 #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM, VALUE)                          \
741   fprintf (STREAM, "\t%s\t%sL%d\n",                                     \
742            Pmode == DImode ? ".dword" : ".word",                        \
743            LOCAL_LABEL_PREFIX,                                          \
744            VALUE)
745
746 \f
747 /* Assembler Commands for Alignment.  */
748
749 #undef ASM_OUTPUT_SKIP
750 #define ASM_OUTPUT_SKIP(STREAM,SIZE)                                    \
751   fprintf (STREAM, "\t.space\t" HOST_WIDE_INT_PRINT_UNSIGNED "\n",      \
752            (unsigned HOST_WIDE_INT)(SIZE))
753
754 #define ASM_OUTPUT_ALIGN(STREAM,LOG)                                    \
755   if ((LOG) != 0)                                                       \
756     fprintf (STREAM, "\t.balign %d\n", 1<<(LOG))
757
758 \f
759 /* Macros Affecting all Debug Formats.  */
760
761 #define DEBUGGER_AUTO_OFFSET(X)  \
762   iq2000_debugger_offset (X, (HOST_WIDE_INT) 0)
763
764 #define DEBUGGER_ARG_OFFSET(OFFSET, X)  \
765   iq2000_debugger_offset (X, (HOST_WIDE_INT) OFFSET)
766
767 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
768
769 #define DWARF2_DEBUGGING_INFO 1
770
771 \f
772 /* Miscellaneous Parameters.  */
773
774 #define CASE_VECTOR_MODE SImode
775
776 #define WORD_REGISTER_OPERATIONS
777
778 #define LOAD_EXTEND_OP(MODE) ZERO_EXTEND
779
780 #define MOVE_MAX 4
781
782 #define MAX_MOVE_MAX 8
783
784 #define SHIFT_COUNT_TRUNCATED 1
785
786 #define TRULY_NOOP_TRUNCATION(OUTPREC, INPREC) 1
787
788 #define STORE_FLAG_VALUE 1
789
790 #define Pmode SImode
791
792 #define FUNCTION_MODE SImode
793
794 /* Standard GCC variables that we reference.  */
795
796 extern char     call_used_regs[];
797
798 /* IQ2000 external variables defined in iq2000.c.  */
799
800 /* Comparison type.  */
801 enum cmp_type
802 {
803   CMP_SI,                               /* Compare four byte integers.  */
804   CMP_DI,                               /* Compare eight byte integers.  */
805   CMP_SF,                               /* Compare single precision floats.  */
806   CMP_DF,                               /* Compare double precision floats.  */
807   CMP_MAX                               /* Max comparison type.  */
808 };
809
810 /* Types of delay slot.  */
811 enum delay_type
812 {
813   DELAY_NONE,                           /* No delay slot.  */
814   DELAY_LOAD,                           /* Load from memory delay.  */
815   DELAY_FCMP                            /* Delay after doing c.<xx>.{d,s}.  */
816 };
817
818 /* Which processor to schedule for.  */
819
820 enum processor_type
821 {
822   PROCESSOR_DEFAULT,
823   PROCESSOR_IQ2000,
824   PROCESSOR_IQ10
825 };
826
827 /* Recast the cpu class to be the cpu attribute.  */
828 #define iq2000_cpu_attr ((enum attr_cpu) iq2000_tune)
829
830 #define BITMASK_UPPER16 ((unsigned long) 0xffff << 16)  /* 0xffff0000 */
831 #define BITMASK_LOWER16 ((unsigned long) 0xffff)        /* 0x0000ffff */
832
833 \f
834 #define GENERATE_BRANCHLIKELY  (ISA_HAS_BRANCHLIKELY)
835
836 /* Macros to decide whether certain features are available or not,
837    depending on the instruction set architecture level.  */
838
839 #define BRANCH_LIKELY_P()       GENERATE_BRANCHLIKELY
840
841 /* ISA has branch likely instructions.  */
842 #define ISA_HAS_BRANCHLIKELY    (iq2000_isa == 1)
843
844 \f
845 #undef ASM_SPEC
846
847 \f
848 /* The mapping from gcc register number to DWARF 2 CFA column number.  */
849 #define DWARF_FRAME_REGNUM(REG)        (REG)
850
851 /* The DWARF 2 CFA column which tracks the return address.  */
852 #define DWARF_FRAME_RETURN_COLUMN (GP_REG_FIRST + 31)
853
854 /* Describe how we implement __builtin_eh_return.  */
855 #define EH_RETURN_DATA_REGNO(N) ((N) < 4 ? (N) + GP_ARG_FIRST : INVALID_REGNUM)
856
857 /* The EH_RETURN_STACKADJ_RTX macro returns RTL which describes the
858    location used to store the amount to adjust the stack.  This is
859    usually a register that is available from end of the function's body
860    to the end of the epilogue. Thus, this cannot be a register used as a
861    temporary by the epilogue.
862
863    This must be an integer register.  */
864 #define EH_RETURN_STACKADJ_REGNO        3
865 #define EH_RETURN_STACKADJ_RTX  gen_rtx_REG (Pmode, EH_RETURN_STACKADJ_REGNO)
866
867 /* The EH_RETURN_HANDLER_RTX macro returns RTL which describes the
868    location used to store the address the processor should jump to
869    catch exception.  This is usually a registers that is available from
870    end of the function's body to the end of the epilogue. Thus, this
871    cannot be a register used as a temporary by the epilogue.
872
873    This must be an address register.  */
874 #define EH_RETURN_HANDLER_REGNO         26
875 #define EH_RETURN_HANDLER_RTX           \
876         gen_rtx_REG (Pmode, EH_RETURN_HANDLER_REGNO)
877
878 /* Offsets recorded in opcodes are a multiple of this alignment factor.  */
879 #define DWARF_CIE_DATA_ALIGNMENT 4
880
881 /* For IQ2000, width of a floating point register.  */
882 #define UNITS_PER_FPREG 4
883
884 /* Force right-alignment for small varargs in 32 bit little_endian mode */
885
886 #define PAD_VARARGS_DOWN !BYTES_BIG_ENDIAN
887
888 /* Internal macros to classify a register number as to whether it's a
889    general purpose register, a floating point register, a
890    multiply/divide register, or a status register.  */
891
892 #define GP_REG_FIRST 0
893 #define GP_REG_LAST  31
894 #define GP_REG_NUM   (GP_REG_LAST - GP_REG_FIRST + 1)
895
896 #define RAP_REG_NUM   32
897 #define AT_REGNUM       (GP_REG_FIRST + 1)
898
899 #define GP_REG_P(REGNO) \
900   ((unsigned int) ((int) (REGNO) - GP_REG_FIRST) < GP_REG_NUM)
901
902 /* IQ2000 registers used in prologue/epilogue code when the stack frame
903    is larger than 32K bytes.  These registers must come from the
904    scratch register set, and not used for passing and returning
905    arguments and any other information used in the calling sequence.  */
906
907 #define IQ2000_TEMP1_REGNUM (GP_REG_FIRST + 12)
908 #define IQ2000_TEMP2_REGNUM (GP_REG_FIRST + 13)
909
910 /* This macro is used later on in the file.  */
911 #define GR_REG_CLASS_P(CLASS)                                           \
912   ((CLASS) == GR_REGS)
913
914 #define SMALL_INT(X) ((unsigned HOST_WIDE_INT) (INTVAL (X) + 0x8000) < 0x10000)
915 #define SMALL_INT_UNSIGNED(X) ((unsigned HOST_WIDE_INT) (INTVAL (X)) < 0x10000)
916
917 /* Certain machines have the property that some registers cannot be
918    copied to some other registers without using memory.  Define this
919    macro on those machines to be a C expression that is nonzero if
920    objects of mode MODE in registers of CLASS1 can only be copied to
921    registers of class CLASS2 by storing a register of CLASS1 into
922    memory and loading that memory location into a register of CLASS2.
923
924    Do not define this macro if its value would always be zero.  */
925
926 /* Return the maximum number of consecutive registers
927    needed to represent mode MODE in a register of class CLASS.  */
928
929 #define CLASS_UNITS(mode, size)                                         \
930   ((GET_MODE_SIZE (mode) + (size) - 1) / (size))
931
932 /* If defined, gives a class of registers that cannot be used as the
933    operand of a SUBREG that changes the mode of the object illegally.  */
934
935 #define CLASS_CANNOT_CHANGE_MODE 0
936
937 /* Defines illegal mode changes for CLASS_CANNOT_CHANGE_MODE.  */
938
939 #define CLASS_CANNOT_CHANGE_MODE_P(FROM,TO) \
940   (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO))
941
942 /* Make sure 4 words are always allocated on the stack.  */
943
944 #ifndef STACK_ARGS_ADJUST
945 #define STACK_ARGS_ADJUST(SIZE)                                         \
946   {                                                                     \
947     if (SIZE.constant < 4 * UNITS_PER_WORD)                             \
948       SIZE.constant = 4 * UNITS_PER_WORD;                               \
949   }
950 #endif
951
952 \f
953 /* Symbolic macros for the registers used to return integer and floating
954    point values.  */
955
956 #define GP_RETURN (GP_REG_FIRST + 2)
957
958 /* Symbolic macros for the first/last argument registers.  */
959
960 #define GP_ARG_FIRST (GP_REG_FIRST + 4)
961 #define GP_ARG_LAST  (GP_REG_FIRST + 11)
962
963 #define MAX_ARGS_IN_REGISTERS   8
964
965 \f
966 /* Tell prologue and epilogue if register REGNO should be saved / restored.  */
967
968 #define MUST_SAVE_REGISTER(regno) \
969   ((df_regs_ever_live_p (regno) && !call_used_regs[regno])              \
970   || (regno == HARD_FRAME_POINTER_REGNUM && frame_pointer_needed)       \
971    || (regno == (GP_REG_FIRST + 31) && df_regs_ever_live_p (GP_REG_FIRST + 31)))
972
973 /* ALIGN FRAMES on double word boundaries */
974 #ifndef IQ2000_STACK_ALIGN
975 #define IQ2000_STACK_ALIGN(LOC) (((LOC) + 7) & ~7)
976 #endif
977
978 \f
979 /* These assume that REGNO is a hard or pseudo reg number.
980    They give nonzero only if REGNO is a hard reg of the suitable class
981    or a pseudo reg currently allocated to a suitable hard reg.
982    These definitions are NOT overridden anywhere.  */
983
984 #define BASE_REG_P(regno, mode)                                 \
985   (GP_REG_P (regno))
986
987 #define GP_REG_OR_PSEUDO_STRICT_P(regno, mode)                              \
988   BASE_REG_P((regno < FIRST_PSEUDO_REGISTER) ? regno : reg_renumber[regno], \
989              (mode))
990
991 #define GP_REG_OR_PSEUDO_NONSTRICT_P(regno, mode) \
992   (((regno) >= FIRST_PSEUDO_REGISTER) || (BASE_REG_P ((regno), (mode))))
993
994 #define REGNO_MODE_OK_FOR_BASE_P(regno, mode) \
995   GP_REG_OR_PSEUDO_STRICT_P ((regno), (mode))
996
997 /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx
998    and check its validity for a certain class.
999    We have two alternate definitions for each of them.
1000    The usual definition accepts all pseudo regs; the other rejects them all.
1001    The symbol REG_OK_STRICT causes the latter definition to be used.
1002
1003    Most source files want to accept pseudo regs in the hope that
1004    they will get allocated to the class that the insn wants them to be in.
1005    Some source files that are used after register allocation
1006    need to be strict.  */
1007
1008 #ifndef REG_OK_STRICT
1009 #define REG_MODE_OK_FOR_BASE_P(X, MODE) \
1010   iq2000_reg_mode_ok_for_base_p (X, MODE, 0)
1011 #else
1012 #define REG_MODE_OK_FOR_BASE_P(X, MODE) \
1013   iq2000_reg_mode_ok_for_base_p (X, MODE, 1)
1014 #endif
1015
1016 #if 1
1017 #define GO_PRINTF(x)    fprintf (stderr, (x))
1018 #define GO_PRINTF2(x,y) fprintf (stderr, (x), (y))
1019 #define GO_DEBUG_RTX(x) debug_rtx (x)
1020
1021 #else
1022 #define GO_PRINTF(x)
1023 #define GO_PRINTF2(x,y)
1024 #define GO_DEBUG_RTX(x)
1025 #endif
1026
1027 /* If defined, modifies the length assigned to instruction INSN as a
1028    function of the context in which it is used.  LENGTH is an lvalue
1029    that contains the initially computed length of the insn and should
1030    be updated with the correct length of the insn.  */
1031 #define ADJUST_INSN_LENGTH(INSN, LENGTH) \
1032   ((LENGTH) = iq2000_adjust_insn_length ((INSN), (LENGTH)))
1033
1034 \f
1035
1036
1037 /* How to tell the debugger about changes of source files.  */
1038
1039 #ifndef SET_FILE_NUMBER
1040 #define SET_FILE_NUMBER() ++ num_source_filenames
1041 #endif
1042
1043 /* This is how to output a note the debugger telling it the line number
1044    to which the following sequence of instructions corresponds.  */
1045
1046 #ifndef LABEL_AFTER_LOC
1047 #define LABEL_AFTER_LOC(STREAM)
1048 #endif
1049
1050 \f
1051 /* Default to -G 8 */
1052 #ifndef IQ2000_DEFAULT_GVALUE
1053 #define IQ2000_DEFAULT_GVALUE 8
1054 #endif
1055
1056 #define SDATA_SECTION_ASM_OP    "\t.sdata"      /* Small data.  */
1057
1058 \f
1059 /* List of all IQ2000 punctuation characters used by print_operand.  */
1060 extern char iq2000_print_operand_punct[256];
1061
1062 /* The target cpu for optimization and scheduling.  */
1063 extern enum processor_type iq2000_tune;
1064
1065 /* Which instruction set architecture to use.  */
1066 extern int iq2000_isa;
1067
1068 /* Cached operands, and operator to compare for use in set/branch/trap
1069    on condition codes.  */
1070 extern rtx branch_cmp[2];
1071
1072 /* What type of branch to use.  */
1073 extern enum cmp_type branch_type;
1074
1075 enum iq2000_builtins
1076 {
1077   IQ2000_BUILTIN_ADO16,
1078   IQ2000_BUILTIN_CFC0,
1079   IQ2000_BUILTIN_CFC1,
1080   IQ2000_BUILTIN_CFC2,
1081   IQ2000_BUILTIN_CFC3,
1082   IQ2000_BUILTIN_CHKHDR,
1083   IQ2000_BUILTIN_CTC0,
1084   IQ2000_BUILTIN_CTC1,
1085   IQ2000_BUILTIN_CTC2,
1086   IQ2000_BUILTIN_CTC3,
1087   IQ2000_BUILTIN_LU,
1088   IQ2000_BUILTIN_LUC32L,
1089   IQ2000_BUILTIN_LUC64,
1090   IQ2000_BUILTIN_LUC64L,
1091   IQ2000_BUILTIN_LUK,
1092   IQ2000_BUILTIN_LULCK,
1093   IQ2000_BUILTIN_LUM32,
1094   IQ2000_BUILTIN_LUM32L,
1095   IQ2000_BUILTIN_LUM64,
1096   IQ2000_BUILTIN_LUM64L,
1097   IQ2000_BUILTIN_LUR,
1098   IQ2000_BUILTIN_LURL,
1099   IQ2000_BUILTIN_MFC0,
1100   IQ2000_BUILTIN_MFC1,
1101   IQ2000_BUILTIN_MFC2,
1102   IQ2000_BUILTIN_MFC3,
1103   IQ2000_BUILTIN_MRGB,
1104   IQ2000_BUILTIN_MTC0,
1105   IQ2000_BUILTIN_MTC1,
1106   IQ2000_BUILTIN_MTC2,
1107   IQ2000_BUILTIN_MTC3,
1108   IQ2000_BUILTIN_PKRL,
1109   IQ2000_BUILTIN_RAM,
1110   IQ2000_BUILTIN_RB,
1111   IQ2000_BUILTIN_RX,
1112   IQ2000_BUILTIN_SRRD,
1113   IQ2000_BUILTIN_SRRDL,
1114   IQ2000_BUILTIN_SRULC,
1115   IQ2000_BUILTIN_SRULCK,
1116   IQ2000_BUILTIN_SRWR,
1117   IQ2000_BUILTIN_SRWRU,
1118   IQ2000_BUILTIN_TRAPQF,
1119   IQ2000_BUILTIN_TRAPQFL,
1120   IQ2000_BUILTIN_TRAPQN,
1121   IQ2000_BUILTIN_TRAPQNE,
1122   IQ2000_BUILTIN_TRAPRE,
1123   IQ2000_BUILTIN_TRAPREL,
1124   IQ2000_BUILTIN_WB,
1125   IQ2000_BUILTIN_WBR,
1126   IQ2000_BUILTIN_WBU,
1127   IQ2000_BUILTIN_WX,
1128   IQ2000_BUILTIN_SYSCALL
1129 };