1 /* Generate code from machine description to emit insns as rtl.
2 Copyright (C) 1987, 88, 91, 94, 95, 97, 98, 1999 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
28 static struct obstack obstack
;
29 struct obstack
*rtl_obstack
= &obstack
;
31 #define obstack_chunk_alloc xmalloc
32 #define obstack_chunk_free free
34 /* Define this so we can link with print-rtl.o to get debug_rtx function. */
35 char **insn_name_ptr
= 0;
38 static int max_dup_opno
;
39 static int max_scratch_opno
;
40 static int register_constraints
;
41 static int insn_code_number
;
42 static int insn_index_number
;
44 /* Data structure for recording the patterns of insns that have CLOBBERs.
45 We use this to output a function that adds these CLOBBERs to a
46 previously-allocated PARALLEL expression. */
50 struct clobber_ent
*insns
;
53 struct clobber_pat
*next
;
56 /* Records one insn that uses the clobber list. */
60 int code_number
; /* Counts only insns. */
61 struct clobber_ent
*next
;
64 static void max_operand_1
PROTO((rtx
));
65 static int max_operand_vec
PROTO((rtx
, int));
66 static void print_code
PROTO((RTX_CODE
));
67 static void gen_exp
PROTO((rtx
, enum rtx_code
));
68 static void gen_insn
PROTO((rtx
));
69 static void gen_expand
PROTO((rtx
));
70 static void gen_split
PROTO((rtx
));
71 static void output_add_clobbers
PROTO((void));
72 static void gen_rtx_scratch
PROTO((rtx
, enum rtx_code
));
73 static void output_peephole2_scratches
PROTO((rtx
));
80 register RTX_CODE code
;
83 register const char *fmt
;
90 if (code
== MATCH_OPERAND
&& XSTR (x
, 2) != 0 && *XSTR (x
, 2) != '\0')
91 register_constraints
= 1;
92 if (code
== MATCH_SCRATCH
&& XSTR (x
, 1) != 0 && *XSTR (x
, 1) != '\0')
93 register_constraints
= 1;
94 if (code
== MATCH_OPERAND
|| code
== MATCH_OPERATOR
95 || code
== MATCH_PARALLEL
)
96 max_opno
= MAX (max_opno
, XINT (x
, 0));
97 if (code
== MATCH_DUP
|| code
== MATCH_OP_DUP
|| code
== MATCH_PAR_DUP
)
98 max_dup_opno
= MAX (max_dup_opno
, XINT (x
, 0));
99 if (code
== MATCH_SCRATCH
)
100 max_scratch_opno
= MAX (max_scratch_opno
, XINT (x
, 0));
102 fmt
= GET_RTX_FORMAT (code
);
103 len
= GET_RTX_LENGTH (code
);
104 for (i
= 0; i
< len
; i
++)
106 if (fmt
[i
] == 'e' || fmt
[i
] == 'u')
107 max_operand_1 (XEXP (x
, i
));
108 else if (fmt
[i
] == 'E')
111 for (j
= 0; j
< XVECLEN (x
, i
); j
++)
112 max_operand_1 (XVECEXP (x
, i
, j
));
118 max_operand_vec (insn
, arg
)
122 register int len
= XVECLEN (insn
, arg
);
127 max_scratch_opno
= -1;
129 for (i
= 0; i
< len
; i
++)
130 max_operand_1 (XVECEXP (insn
, arg
, i
));
139 register const char *p1
;
140 for (p1
= GET_RTX_NAME (code
); *p1
; p1
++)
142 if (*p1
>= 'a' && *p1
<= 'z')
143 putchar (*p1
+ 'A' - 'a');
150 gen_rtx_scratch (x
, subroutine_type
)
152 enum rtx_code subroutine_type
;
154 if (subroutine_type
== DEFINE_PEEPHOLE2
)
156 printf ("operand%d", XINT (x
, 0));
160 printf ("gen_rtx_SCRATCH (%smode)", GET_MODE_NAME (GET_MODE (x
)));
164 /* Print a C expression to construct an RTX just like X,
165 substituting any operand references appearing within. */
168 gen_exp (x
, subroutine_type
)
170 enum rtx_code subroutine_type
;
172 register RTX_CODE code
;
175 register const char *fmt
;
189 printf ("operand%d", XINT (x
, 0));
193 printf ("gen_rtx (GET_CODE (operand%d), ", XINT (x
, 0));
194 if (GET_MODE (x
) == VOIDmode
)
195 printf ("GET_MODE (operand%d)", XINT (x
, 0));
197 printf ("%smode", GET_MODE_NAME (GET_MODE (x
)));
198 for (i
= 0; i
< XVECLEN (x
, 1); i
++)
201 gen_exp (XVECEXP (x
, 1, i
), subroutine_type
);
207 printf ("gen_rtx (GET_CODE (operand%d)", XINT (x
, 0));
208 printf (", %smode", GET_MODE_NAME (GET_MODE (x
)));
209 for (i
= 0; i
< XVECLEN (x
, 2); i
++)
212 gen_exp (XVECEXP (x
, 2, i
), subroutine_type
);
219 printf ("operand%d", XINT (x
, 0));
223 gen_rtx_scratch (x
, subroutine_type
);
227 fatal ("ADDRESS expression code used in named instruction pattern");
239 printf ("const0_rtx");
240 else if (INTVAL (x
) == 1)
241 printf ("const1_rtx");
242 else if (INTVAL (x
) == -1)
243 printf ("constm1_rtx");
244 else if (INTVAL (x
) == STORE_FLAG_VALUE
)
245 printf ("const_true_rtx");
248 printf ("GEN_INT (");
249 printf (HOST_WIDE_INT_PRINT_DEC
, INTVAL (x
));
255 /* These shouldn't be written in MD files. Instead, the appropriate
256 routines in varasm.c should be called. */
265 printf (" (%smode", GET_MODE_NAME (GET_MODE (x
)));
267 fmt
= GET_RTX_FORMAT (code
);
268 len
= GET_RTX_LENGTH (code
);
269 for (i
= 0; i
< len
; i
++)
274 if (fmt
[i
] == 'e' || fmt
[i
] == 'u')
275 gen_exp (XEXP (x
, i
), subroutine_type
);
276 else if (fmt
[i
] == 'i')
277 printf ("%u", XINT (x
, i
));
278 else if (fmt
[i
] == 's')
279 printf ("\"%s\"", XSTR (x
, i
));
280 else if (fmt
[i
] == 'E')
283 printf ("gen_rtvec (%d", XVECLEN (x
, i
));
284 for (j
= 0; j
< XVECLEN (x
, i
); j
++)
287 gen_exp (XVECEXP (x
, i
, j
), subroutine_type
);
297 /* Generate the `gen_...' function for a DEFINE_INSN. */
306 /* See if the pattern for this insn ends with a group of CLOBBERs of (hard)
307 registers or MATCH_SCRATCHes. If so, store away the information for
312 for (i
= XVECLEN (insn
, 1) - 1; i
> 0; i
--)
313 if (GET_CODE (XVECEXP (insn
, 1, i
)) != CLOBBER
314 || (GET_CODE (XEXP (XVECEXP (insn
, 1, i
), 0)) != REG
315 && GET_CODE (XEXP (XVECEXP (insn
, 1, i
), 0)) != MATCH_SCRATCH
))
318 if (i
!= XVECLEN (insn
, 1) - 1)
320 register struct clobber_pat
*p
;
321 register struct clobber_ent
*link
322 = (struct clobber_ent
*) xmalloc (sizeof (struct clobber_ent
));
325 link
->code_number
= insn_code_number
;
327 /* See if any previous CLOBBER_LIST entry is the same as this
330 for (p
= clobber_list
; p
; p
= p
->next
)
332 if (p
->first_clobber
!= i
+ 1
333 || XVECLEN (p
->pattern
, 1) != XVECLEN (insn
, 1))
336 for (j
= i
+ 1; j
< XVECLEN (insn
, 1); j
++)
338 rtx old
= XEXP (XVECEXP (p
->pattern
, 1, j
), 0);
339 rtx
new = XEXP (XVECEXP (insn
, 1, j
), 0);
341 /* OLD and NEW are the same if both are to be a SCRATCH
343 or if both are registers of the same mode and number. */
344 if (! (GET_MODE (old
) == GET_MODE (new)
345 && ((GET_CODE (old
) == MATCH_SCRATCH
346 && GET_CODE (new) == MATCH_SCRATCH
)
347 || (GET_CODE (old
) == REG
&& GET_CODE (new) == REG
348 && REGNO (old
) == REGNO (new)))))
352 if (j
== XVECLEN (insn
, 1))
358 p
= (struct clobber_pat
*) xmalloc (sizeof (struct clobber_pat
));
362 p
->first_clobber
= i
+ 1;
363 p
->next
= clobber_list
;
367 link
->next
= p
->insns
;
372 /* Don't mention instructions whose names are the null string
373 or begin with '*'. They are in the machine description just
375 if (XSTR (insn
, 0)[0] == 0 || XSTR (insn
, 0)[0] == '*')
378 /* Find out how many operands this function has,
379 and also whether any of them have register constraints. */
380 register_constraints
= 0;
381 operands
= max_operand_vec (insn
, 1);
382 if (max_dup_opno
>= operands
)
383 fatal ("match_dup operand number has no match_operand");
385 /* Output the function name and argument declarations. */
386 printf ("rtx\ngen_%s (", XSTR (insn
, 0));
387 for (i
= 0; i
< operands
; i
++)
388 printf (i
? ", operand%d" : "operand%d", i
);
390 for (i
= 0; i
< operands
; i
++)
391 printf (" rtx operand%d;\n", i
);
394 /* Output code to construct and return the rtl for the instruction body */
396 if (XVECLEN (insn
, 1) == 1)
399 gen_exp (XVECEXP (insn
, 1, 0), DEFINE_INSN
);
404 printf (" return gen_rtx_PARALLEL (VOIDmode, gen_rtvec (%d", XVECLEN (insn
, 1));
405 for (i
= 0; i
< XVECLEN (insn
, 1); i
++)
408 gen_exp (XVECEXP (insn
, 1, i
), DEFINE_INSN
);
410 printf ("));\n}\n\n");
414 /* Generate the `gen_...' function for a DEFINE_EXPAND. */
423 if (strlen (XSTR (expand
, 0)) == 0)
424 fatal ("define_expand lacks a name");
425 if (XVEC (expand
, 1) == 0)
426 fatal ("define_expand for %s lacks a pattern", XSTR (expand
, 0));
428 /* Find out how many operands this function has,
429 and also whether any of them have register constraints. */
430 register_constraints
= 0;
432 operands
= max_operand_vec (expand
, 1);
434 /* Output the function name and argument declarations. */
435 printf ("rtx\ngen_%s (", XSTR (expand
, 0));
436 for (i
= 0; i
< operands
; i
++)
437 printf (i
? ", operand%d" : "operand%d", i
);
439 for (i
= 0; i
< operands
; i
++)
440 printf (" rtx operand%d;\n", i
);
443 /* If we don't have any C code to write, only one insn is being written,
444 and no MATCH_DUPs are present, we can just return the desired insn
445 like we do for a DEFINE_INSN. This saves memory. */
446 if ((XSTR (expand
, 3) == 0 || *XSTR (expand
, 3) == '\0')
447 && operands
> max_dup_opno
448 && XVECLEN (expand
, 1) == 1)
451 gen_exp (XVECEXP (expand
, 1, 0), DEFINE_EXPAND
);
456 /* For each operand referred to only with MATCH_DUPs,
457 make a local variable. */
458 for (i
= operands
; i
<= max_dup_opno
; i
++)
459 printf (" rtx operand%d;\n", i
);
460 for (; i
<= max_scratch_opno
; i
++)
461 printf (" rtx operand%d;\n", i
);
462 if (operands
> 0 || max_dup_opno
>= 0 || max_scratch_opno
>= 0)
463 printf (" rtx operands[%d];\n",
464 MAX (operands
, MAX (max_scratch_opno
, max_dup_opno
) + 1));
465 printf (" rtx _val = 0;\n");
466 printf (" start_sequence ();\n");
468 /* The fourth operand of DEFINE_EXPAND is some code to be executed
469 before the actual construction.
470 This code expects to refer to `operands'
471 just as the output-code in a DEFINE_INSN does,
472 but here `operands' is an automatic array.
473 So copy the operand values there before executing it. */
474 if (XSTR (expand
, 3) && *XSTR (expand
, 3))
476 /* Output code to copy the arguments into `operands'. */
477 for (i
= 0; i
< operands
; i
++)
478 printf (" operands[%d] = operand%d;\n", i
, i
);
480 /* Output the special code to be executed before the sequence
482 printf ("%s\n", XSTR (expand
, 3));
484 /* Output code to copy the arguments back out of `operands'
485 (unless we aren't going to use them at all). */
486 if (XVEC (expand
, 1) != 0)
488 for (i
= 0; i
< operands
; i
++)
489 printf (" operand%d = operands[%d];\n", i
, i
);
490 for (; i
<= max_dup_opno
; i
++)
491 printf (" operand%d = operands[%d];\n", i
, i
);
492 for (; i
<= max_scratch_opno
; i
++)
493 printf (" operand%d = operands[%d];\n", i
, i
);
497 /* Output code to construct the rtl for the instruction bodies.
498 Use emit_insn to add them to the sequence being accumulated.
499 But don't do this if the user's code has set `no_more' nonzero. */
501 for (i
= 0; i
< XVECLEN (expand
, 1); i
++)
503 rtx next
= XVECEXP (expand
, 1, i
);
504 if ((GET_CODE (next
) == SET
&& GET_CODE (SET_DEST (next
)) == PC
)
505 || (GET_CODE (next
) == PARALLEL
506 && GET_CODE (XVECEXP (next
, 0, 0)) == SET
507 && GET_CODE (SET_DEST (XVECEXP (next
, 0, 0))) == PC
)
508 || GET_CODE (next
) == RETURN
)
509 printf (" emit_jump_insn (");
510 else if ((GET_CODE (next
) == SET
&& GET_CODE (SET_SRC (next
)) == CALL
)
511 || GET_CODE (next
) == CALL
512 || (GET_CODE (next
) == PARALLEL
513 && GET_CODE (XVECEXP (next
, 0, 0)) == SET
514 && GET_CODE (SET_SRC (XVECEXP (next
, 0, 0))) == CALL
)
515 || (GET_CODE (next
) == PARALLEL
516 && GET_CODE (XVECEXP (next
, 0, 0)) == CALL
))
517 printf (" emit_call_insn (");
518 else if (GET_CODE (next
) == CODE_LABEL
)
519 printf (" emit_label (");
520 else if (GET_CODE (next
) == MATCH_OPERAND
521 || GET_CODE (next
) == MATCH_DUP
522 || GET_CODE (next
) == MATCH_OPERATOR
523 || GET_CODE (next
) == MATCH_OP_DUP
524 || GET_CODE (next
) == MATCH_PARALLEL
525 || GET_CODE (next
) == MATCH_PAR_DUP
526 || GET_CODE (next
) == PARALLEL
)
529 printf (" emit_insn (");
530 gen_exp (next
, DEFINE_EXPAND
);
532 if (GET_CODE (next
) == SET
&& GET_CODE (SET_DEST (next
)) == PC
533 && GET_CODE (SET_SRC (next
)) == LABEL_REF
)
534 printf (" emit_barrier ();");
537 /* Call `gen_sequence' to make a SEQUENCE out of all the
538 insns emitted within this gen_... function. */
540 printf (" _val = gen_sequence ();\n");
541 printf (" end_sequence ();\n");
542 printf (" return _val;\n}\n\n");
545 /* Like gen_expand, but generates a SEQUENCE. */
553 char *name
= "split";
555 if (GET_CODE (split
) == DEFINE_PEEPHOLE2
)
558 if (XVEC (split
, 0) == 0)
559 fatal ("define_%s (definition %d) lacks a pattern", name
,
561 else if (XVEC (split
, 2) == 0)
562 fatal ("define_%s (definition %d) lacks a replacement pattern", name
,
565 /* Find out how many operands this function has. */
567 max_operand_vec (split
, 2);
568 operands
= MAX (max_opno
, MAX (max_dup_opno
, max_scratch_opno
)) + 1;
570 /* Output the prototype, function name and argument declarations. */
571 if (GET_CODE (split
) == DEFINE_PEEPHOLE2
)
573 printf ("extern rtx gen_%s_%d PROTO ((rtx, rtx *));\n",
574 name
, insn_code_number
);
575 printf ("rtx\ngen_%s_%d (curr_insn, operands)\n\
576 rtx curr_insn ATTRIBUTE_UNUSED;\n\
578 name
, insn_code_number
);
582 printf ("extern rtx gen_split_%d PROTO ((rtx *));\n", insn_code_number
);
583 printf ("rtx\ngen_%s_%d (operands)\n rtx *operands;\n", name
,
588 /* Declare all local variables. */
589 for (i
= 0; i
< operands
; i
++)
590 printf (" rtx operand%d;\n", i
);
591 printf (" rtx _val = 0;\n");
593 if (GET_CODE (split
) == DEFINE_PEEPHOLE2
)
594 output_peephole2_scratches (split
);
596 printf (" start_sequence ();\n");
598 /* The fourth operand of DEFINE_SPLIT is some code to be executed
599 before the actual construction. */
602 printf ("%s\n", XSTR (split
, 3));
604 /* Output code to copy the arguments back out of `operands' */
605 for (i
= 0; i
< operands
; i
++)
606 printf (" operand%d = operands[%d];\n", i
, i
);
608 /* Output code to construct the rtl for the instruction bodies.
609 Use emit_insn to add them to the sequence being accumulated.
610 But don't do this if the user's code has set `no_more' nonzero. */
612 for (i
= 0; i
< XVECLEN (split
, 2); i
++)
614 rtx next
= XVECEXP (split
, 2, i
);
615 if ((GET_CODE (next
) == SET
&& GET_CODE (SET_DEST (next
)) == PC
)
616 || (GET_CODE (next
) == PARALLEL
617 && GET_CODE (XVECEXP (next
, 0, 0)) == SET
618 && GET_CODE (SET_DEST (XVECEXP (next
, 0, 0))) == PC
)
619 || GET_CODE (next
) == RETURN
)
620 printf (" emit_jump_insn (");
621 else if ((GET_CODE (next
) == SET
&& GET_CODE (SET_SRC (next
)) == CALL
)
622 || GET_CODE (next
) == CALL
623 || (GET_CODE (next
) == PARALLEL
624 && GET_CODE (XVECEXP (next
, 0, 0)) == SET
625 && GET_CODE (SET_SRC (XVECEXP (next
, 0, 0))) == CALL
)
626 || (GET_CODE (next
) == PARALLEL
627 && GET_CODE (XVECEXP (next
, 0, 0)) == CALL
))
628 printf (" emit_call_insn (");
629 else if (GET_CODE (next
) == CODE_LABEL
)
630 printf (" emit_label (");
631 else if (GET_CODE (next
) == MATCH_OPERAND
632 || GET_CODE (next
) == MATCH_OPERATOR
633 || GET_CODE (next
) == MATCH_PARALLEL
634 || GET_CODE (next
) == MATCH_OP_DUP
635 || GET_CODE (next
) == MATCH_DUP
636 || GET_CODE (next
) == PARALLEL
)
639 printf (" emit_insn (");
640 gen_exp (next
, GET_CODE (split
));
642 if (GET_CODE (next
) == SET
&& GET_CODE (SET_DEST (next
)) == PC
643 && GET_CODE (SET_SRC (next
)) == LABEL_REF
)
644 printf (" emit_barrier ();");
647 /* Call `gen_sequence' to make a SEQUENCE out of all the
648 insns emitted within this gen_... function. */
650 printf (" _val = gen_sequence ();\n");
651 printf (" end_sequence ();\n");
652 printf (" return _val;\n}\n\n");
655 /* Write a function, `add_clobbers', that is given a PARALLEL of sufficient
656 size for the insn and an INSN_CODE, and inserts the required CLOBBERs at
657 the end of the vector. */
660 output_add_clobbers ()
662 struct clobber_pat
*clobber
;
663 struct clobber_ent
*ent
;
666 printf ("\n\nvoid\nadd_clobbers (pattern, insn_code_number)\n");
667 printf (" rtx pattern;\n int insn_code_number;\n");
669 printf (" switch (insn_code_number)\n");
672 for (clobber
= clobber_list
; clobber
; clobber
= clobber
->next
)
674 for (ent
= clobber
->insns
; ent
; ent
= ent
->next
)
675 printf (" case %d:\n", ent
->code_number
);
677 for (i
= clobber
->first_clobber
; i
< XVECLEN (clobber
->pattern
, 1); i
++)
679 printf (" XVECEXP (pattern, 0, %d) = ", i
);
680 gen_exp (XVECEXP (clobber
->pattern
, 1, i
),
681 GET_CODE (clobber
->pattern
));
685 printf (" break;\n\n");
688 printf (" default:\n");
689 printf (" abort ();\n");
694 /* Generate code to invoke find_free_register () as needed for the
695 scratch registers used by the peephole2 pattern in SPLIT. */
698 output_peephole2_scratches (split
)
704 printf (" rtx first_insn ATTRIBUTE_UNUSED;\n");
705 printf (" rtx last_insn ATTRIBUTE_UNUSED;\n");
706 printf (" HARD_REG_SET _regs_allocated;\n");
708 printf (" CLEAR_HARD_REG_SET (_regs_allocated);\n");
710 for (i
= 0; i
< XVECLEN (split
, 0); i
++)
712 rtx elt
= XVECEXP (split
, 0, i
);
713 if (GET_CODE (elt
) == MATCH_SCRATCH
)
715 int last_insn_nr
= insn_nr
;
716 int cur_insn_nr
= insn_nr
;
718 for (j
= i
+ 1; j
< XVECLEN (split
, 0); j
++)
719 if (GET_CODE (XVECEXP (split
, 0, j
)) == MATCH_DUP
)
721 if (XINT (XVECEXP (split
, 0, j
), 0) == XINT (elt
, 0))
722 last_insn_nr
= cur_insn_nr
;
724 else if (GET_CODE (XVECEXP (split
, 0, j
)) != MATCH_SCRATCH
)
726 printf (" first_insn = recog_next_insn (curr_insn, %d);\n", insn_nr
);
727 if (last_insn_nr
> insn_nr
)
728 printf (" last_insn = recog_next_insn (curr_insn, %d);\n",
731 printf (" last_insn = 0;\n");
732 printf (" if ((operands[%d] = find_free_register (first_insn, last_insn, \"%s\", %smode, &_regs_allocated)) == NULL_RTX)\n\
736 GET_MODE_NAME (GET_MODE (elt
)));
739 else if (GET_CODE (elt
) != MATCH_DUP
)
748 register PTR val
= (PTR
) malloc (size
);
751 fatal ("virtual memory exhausted");
763 ptr
= (PTR
) realloc (old
, size
);
765 ptr
= (PTR
) malloc (size
);
767 fatal ("virtual memory exhausted");
780 progname
= "genemit";
781 obstack_init (rtl_obstack
);
784 fatal ("No input file name.");
786 infile
= fopen (argv
[1], "r");
790 exit (FATAL_EXIT_CODE
);
793 /* Assign sequential codes to all entries in the machine description
794 in parallel with the tables in insn-output.c. */
796 insn_code_number
= 0;
797 insn_index_number
= 0;
799 printf ("/* Generated automatically by the program `genemit'\n\
800 from the machine description file `md'. */\n\n");
802 printf ("#include \"config.h\"\n");
803 printf ("#include \"system.h\"\n");
804 printf ("#include \"rtl.h\"\n");
805 printf ("#include \"function.h\"\n");
806 printf ("#include \"expr.h\"\n");
807 printf ("#include \"real.h\"\n");
808 printf ("#include \"flags.h\"\n");
809 printf ("#include \"output.h\"\n");
810 printf ("#include \"insn-config.h\"\n");
811 printf ("#include \"insn-flags.h\"\n");
812 printf ("#include \"insn-codes.h\"\n");
813 printf ("#include \"recog.h\"\n");
814 printf ("#include \"hard-reg-set.h\"\n");
815 printf ("#include \"resource.h\"\n");
816 printf ("#include \"reload.h\"\n\n");
817 printf ("extern rtx recog_operand[];\n");
818 printf ("#define operands emit_operand\n\n");
819 printf ("#define FAIL return (end_sequence (), _val)\n");
820 printf ("#define DONE return (_val = gen_sequence (), end_sequence (), _val)\n");
822 /* Read the machine description. */
826 c
= read_skip_spaces (infile
);
831 desc
= read_rtx (infile
);
833 if (GET_CODE (desc
) == DEFINE_INSN
)
838 if (GET_CODE (desc
) == DEFINE_EXPAND
)
843 if (GET_CODE (desc
) == DEFINE_SPLIT
)
848 if (GET_CODE (desc
) == DEFINE_PEEPHOLE2
)
853 if (GET_CODE (desc
) == DEFINE_PEEPHOLE
)
860 /* Write out the routine to add CLOBBERs to a pattern. */
861 output_add_clobbers ();
864 exit (ferror (stdout
) != 0 ? FATAL_EXIT_CODE
: SUCCESS_EXIT_CODE
);