* configure.in: Add tic4x target.
[platform/upstream/gcc.git] / gcc / print-rtl.c
1 /* Print RTL for GNU C Compiler.
2    Copyright (C) 1987, 1988, 1992, 1997, 1998, 1999, 2000
3    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 under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
11
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING.  If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA.  */
21
22
23 #include "config.h"
24 #include "system.h"
25 #include "rtl.h"
26
27 /* We don't want the tree code checking code for the access to the
28    DECL_NAME to be included in the gen* programs.  */
29 #undef ENABLE_TREE_CHECKING
30 #include "tree.h"
31 #include "real.h"
32 #include "flags.h"
33 #include "hard-reg-set.h"
34 #include "basic-block.h"
35
36 /* How to print out a register name.
37    We don't use PRINT_REG because some definitions of PRINT_REG
38    don't work here.  */
39 #ifndef DEBUG_PRINT_REG
40 #define DEBUG_PRINT_REG(RTX, CODE, FILE) \
41   fprintf ((FILE), "%d %s", REGNO (RTX), reg_names[REGNO (RTX)])
42 #endif
43
44 /* Array containing all of the register names */
45
46 #ifdef DEBUG_REGISTER_NAMES
47 static const char * const debug_reg_names[] = DEBUG_REGISTER_NAMES;
48 #define reg_names debug_reg_names
49 #else
50 const char * reg_names[] = REGISTER_NAMES;
51 #endif
52
53 static FILE *outfile;
54
55 static int sawclose = 0;
56
57 static int indent;
58
59 static void print_rtx           PARAMS ((rtx));
60
61 /* String printed at beginning of each RTL when it is dumped.
62    This string is set to ASM_COMMENT_START when the RTL is dumped in
63    the assembly output file.  */
64 const char *print_rtx_head = "";
65
66 /* Nonzero means suppress output of instruction numbers and line number
67    notes in debugging dumps.
68    This must be defined here so that programs like gencodes can be linked.  */
69 int flag_dump_unnumbered = 0;
70
71 /* Nonzero means use simplified format without flags, modes, etc.  */
72 int flag_simple = 0;
73
74 /* Nonzero if we are dumping graphical description.  */
75 int dump_for_graph;
76
77 /* Nonzero to dump all call_placeholder alternatives.  */
78 static int debug_call_placeholder_verbose;
79
80 void
81 print_mem_expr (outfile, expr)
82      FILE *outfile;
83      tree expr;
84 {
85   if (TREE_CODE (expr) == COMPONENT_REF)
86     {
87       if (TREE_OPERAND (expr, 0))
88         print_mem_expr (outfile, TREE_OPERAND (expr, 0));
89       else
90         fputs (" <variable>", outfile);
91       if (DECL_NAME (TREE_OPERAND (expr, 1)))
92         fprintf (outfile, ".%s",
93                  IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (expr, 1))));
94     }
95   else if (TREE_CODE (expr) == INDIRECT_REF)
96     {
97       fputs (" (*", outfile);
98       print_mem_expr (outfile, TREE_OPERAND (expr, 0));
99       fputs (")", outfile);
100     }
101   else if (DECL_NAME (expr))
102     fprintf (outfile, " %s", IDENTIFIER_POINTER (DECL_NAME (expr)));
103   else if (TREE_CODE (expr) == RESULT_DECL)
104     fputs (" <result>", outfile);
105   else
106     fputs (" <anonymous>", outfile);
107 }
108
109 /* Print IN_RTX onto OUTFILE.  This is the recursive part of printing.  */
110
111 static void
112 print_rtx (in_rtx)
113      rtx in_rtx;
114 {
115   int i = 0;
116   int j;
117   const char *format_ptr;
118   int is_insn;
119   rtx tem;
120
121   if (sawclose)
122     {
123       if (flag_simple)
124         fputc (' ', outfile);
125       else
126         fprintf (outfile, "\n%s%*s", print_rtx_head, indent * 2, "");
127       sawclose = 0;
128     }
129
130   if (in_rtx == 0)
131     {
132       fputs ("(nil)", outfile);
133       sawclose = 1;
134       return;
135     }
136   else if (GET_CODE (in_rtx) > NUM_RTX_CODE)
137     {
138        fprintf (outfile, "(??? bad code %d\n)", GET_CODE (in_rtx));
139        sawclose = 1;
140        return;
141     }
142
143   is_insn = INSN_P (in_rtx);
144
145   /* When printing in VCG format we write INSNs, NOTE, LABEL, and BARRIER
146      in separate nodes and therefore have to handle them special here.  */
147   if (dump_for_graph
148       && (is_insn || GET_CODE (in_rtx) == NOTE
149           || GET_CODE (in_rtx) == CODE_LABEL || GET_CODE (in_rtx) == BARRIER))
150     {
151       i = 3;
152       indent = 0;
153     }
154   else
155     {
156       /* Print name of expression code.  */
157       if (flag_simple && GET_CODE (in_rtx) == CONST_INT)
158         fputc ('(', outfile);
159       else
160         fprintf (outfile, "(%s", GET_RTX_NAME (GET_CODE (in_rtx)));
161
162       if (! flag_simple)
163         {
164           if (RTX_FLAG (in_rtx, in_struct))
165             fputs ("/s", outfile);
166
167           if (RTX_FLAG (in_rtx, volatil))
168             fputs ("/v", outfile);
169
170           if (RTX_FLAG (in_rtx, unchanging))
171             fputs ("/u", outfile);
172
173           if (RTX_FLAG (in_rtx, integrated))
174             fputs ("/i", outfile);
175
176           if (RTX_FLAG (in_rtx, frame_related))
177             fputs ("/f", outfile);
178
179           if (RTX_FLAG (in_rtx, jump))
180             fputs ("/j", outfile);
181
182           if (RTX_FLAG (in_rtx, call))
183             fputs ("/c", outfile);
184
185           if (GET_MODE (in_rtx) != VOIDmode)
186             {
187               /* Print REG_NOTE names for EXPR_LIST and INSN_LIST.  */
188               if (GET_CODE (in_rtx) == EXPR_LIST
189                   || GET_CODE (in_rtx) == INSN_LIST)
190                 fprintf (outfile, ":%s",
191                          GET_REG_NOTE_NAME (GET_MODE (in_rtx)));
192               else
193                 fprintf (outfile, ":%s", GET_MODE_NAME (GET_MODE (in_rtx)));
194             }
195         }
196     }
197
198 #ifndef GENERATOR_FILE
199   if (GET_CODE (in_rtx) == CONST_DOUBLE && FLOAT_MODE_P (GET_MODE (in_rtx)))
200     i = 5;
201 #endif
202
203   /* Get the format string and skip the first elements if we have handled
204      them already.  */
205   format_ptr = GET_RTX_FORMAT (GET_CODE (in_rtx)) + i;
206   for (; i < GET_RTX_LENGTH (GET_CODE (in_rtx)); i++)
207     switch (*format_ptr++)
208       {
209         const char *str;
210
211       case 'T':
212         str = XTMPL (in_rtx, i);
213         goto string;
214
215       case 'S':
216       case 's':
217         str = XSTR (in_rtx, i);
218       string:
219
220         if (str == 0)
221           fputs (dump_for_graph ? " \\\"\\\"" : " \"\"", outfile);
222         else
223           {
224             if (dump_for_graph)
225               fprintf (outfile, " (\\\"%s\\\")", str);
226             else
227               fprintf (outfile, " (\"%s\")", str);
228           }
229         sawclose = 1;
230         break;
231
232         /* 0 indicates a field for internal use that should not be printed.
233            An exception is the third field of a NOTE, where it indicates
234            that the field has several different valid contents.  */
235       case '0':
236         if (i == 1 && GET_CODE (in_rtx) == REG)
237           {
238             if (REGNO (in_rtx) != ORIGINAL_REGNO (in_rtx))
239               fprintf (outfile, " [%d]", ORIGINAL_REGNO (in_rtx));
240             break;
241           }
242         if (i == 4 && GET_CODE (in_rtx) == NOTE)
243           {
244             switch (NOTE_LINE_NUMBER (in_rtx))
245               {
246               case NOTE_INSN_EH_REGION_BEG:
247               case NOTE_INSN_EH_REGION_END:
248                 if (flag_dump_unnumbered)
249                   fprintf (outfile, " #");
250                 else
251                   fprintf (outfile, " %d", NOTE_EH_HANDLER (in_rtx));
252                 sawclose = 1;
253                 break;
254
255               case NOTE_INSN_BLOCK_BEG:
256               case NOTE_INSN_BLOCK_END:
257                 fprintf (outfile, " ");
258                 if (flag_dump_unnumbered)
259                   fprintf (outfile, "#");
260                 else
261                   fprintf (outfile, HOST_PTR_PRINTF,
262                            (char *) NOTE_BLOCK (in_rtx));
263                 sawclose = 1;
264                 break;
265
266               case NOTE_INSN_BASIC_BLOCK:
267                 {
268                   basic_block bb = NOTE_BASIC_BLOCK (in_rtx);
269                   if (bb != 0)
270                     fprintf (outfile, " [bb %d]", bb->index);
271                   break;
272                 }
273
274               case NOTE_INSN_EXPECTED_VALUE:
275                 indent += 2;
276                 if (!sawclose)
277                   fprintf (outfile, " ");
278                 print_rtx (NOTE_EXPECTED_VALUE (in_rtx));
279                 indent -= 2;
280                 break;
281
282               case NOTE_INSN_DELETED_LABEL:
283                 if (NOTE_SOURCE_FILE (in_rtx))
284                   fprintf (outfile, " (\"%s\")", NOTE_SOURCE_FILE (in_rtx));
285                 else
286                   fprintf (outfile, " \"\"");
287                 break;
288
289               case NOTE_INSN_PREDICTION:
290                 if (NOTE_PREDICTION (in_rtx))
291                   fprintf (outfile, " [ %d %d ] ",
292                            (int)NOTE_PREDICTION_ALG (in_rtx),
293                            (int) NOTE_PREDICTION_FLAGS (in_rtx));
294                 else
295                   fprintf (outfile, " [ ERROR ]");
296                 break;
297
298               default:
299                 {
300                   const char * const str = X0STR (in_rtx, i);
301
302                   if (NOTE_LINE_NUMBER (in_rtx) < 0)
303                     ;
304                   else if (str == 0)
305                     fputs (dump_for_graph ? " \\\"\\\"" : " \"\"", outfile);
306                   else
307                     {
308                       if (dump_for_graph)
309                         fprintf (outfile, " (\\\"%s\\\")", str);
310                       else
311                         fprintf (outfile, " (\"%s\")", str);
312                     }
313                   break;
314                 }
315               }
316           }
317         break;
318
319       case 'e':
320       do_e:
321         indent += 2;
322         if (!sawclose)
323           fprintf (outfile, " ");
324         print_rtx (XEXP (in_rtx, i));
325         indent -= 2;
326         break;
327
328       case 'E':
329       case 'V':
330         indent += 2;
331         if (sawclose)
332           {
333             fprintf (outfile, "\n%s%*s",
334                      print_rtx_head, indent * 2, "");
335             sawclose = 0;
336           }
337         fputs (" [", outfile);
338         if (NULL != XVEC (in_rtx, i))
339           {
340             indent += 2;
341             if (XVECLEN (in_rtx, i))
342               sawclose = 1;
343
344             for (j = 0; j < XVECLEN (in_rtx, i); j++)
345               print_rtx (XVECEXP (in_rtx, i, j));
346
347             indent -= 2;
348           }
349         if (sawclose)
350           fprintf (outfile, "\n%s%*s", print_rtx_head, indent * 2, "");
351
352         fputs ("]", outfile);
353         sawclose = 1;
354         indent -= 2;
355         break;
356
357       case 'w':
358         if (! flag_simple)
359           fprintf (outfile, " ");
360         fprintf (outfile, HOST_WIDE_INT_PRINT_DEC, XWINT (in_rtx, i));
361         if (! flag_simple)
362           {
363             fprintf (outfile, " [");
364             fprintf (outfile, HOST_WIDE_INT_PRINT_HEX, XWINT (in_rtx, i));
365             fprintf (outfile, "]");
366           }
367         break;
368
369       case 'i':
370         if (i == 6 && GET_CODE (in_rtx) == NOTE)
371           {
372             /* This field is only used for NOTE_INSN_DELETED_LABEL, and
373                other times often contains garbage from INSN->NOTE death.  */
374             if (NOTE_LINE_NUMBER (in_rtx) == NOTE_INSN_DELETED_LABEL)
375               fprintf (outfile, " %d",  XINT (in_rtx, i));
376           }
377         else
378           {
379             int value = XINT (in_rtx, i);
380             const char *name;
381
382             if (GET_CODE (in_rtx) == REG && value < FIRST_PSEUDO_REGISTER)
383               {
384                 fputc (' ', outfile);
385                 DEBUG_PRINT_REG (in_rtx, 0, outfile);
386               }
387             else if (GET_CODE (in_rtx) == REG
388                      && value <= LAST_VIRTUAL_REGISTER)
389               {
390                 if (value == VIRTUAL_INCOMING_ARGS_REGNUM)
391                   fprintf (outfile, " %d virtual-incoming-args", value);
392                 else if (value == VIRTUAL_STACK_VARS_REGNUM)
393                   fprintf (outfile, " %d virtual-stack-vars", value);
394                 else if (value == VIRTUAL_STACK_DYNAMIC_REGNUM)
395                   fprintf (outfile, " %d virtual-stack-dynamic", value);
396                 else if (value == VIRTUAL_OUTGOING_ARGS_REGNUM)
397                   fprintf (outfile, " %d virtual-outgoing-args", value);
398                 else if (value == VIRTUAL_CFA_REGNUM)
399                   fprintf (outfile, " %d virtual-cfa", value);
400                 else
401                   fprintf (outfile, " %d virtual-reg-%d", value,
402                            value-FIRST_VIRTUAL_REGISTER);
403               }
404             else if (flag_dump_unnumbered
405                      && (is_insn || GET_CODE (in_rtx) == NOTE))
406               fputc ('#', outfile);
407             else
408               fprintf (outfile, " %d", value);
409
410             if (is_insn && &INSN_CODE (in_rtx) == &XINT (in_rtx, i)
411                 && XINT (in_rtx, i) >= 0
412                 && (name = get_insn_name (XINT (in_rtx, i))) != NULL)
413               fprintf (outfile, " {%s}", name);
414             sawclose = 0;
415           }
416         break;
417
418       /* Print NOTE_INSN names rather than integer codes.  */
419
420       case 'n':
421         if (XINT (in_rtx, i) >= (int) NOTE_INSN_BIAS
422             && XINT (in_rtx, i) < (int) NOTE_INSN_MAX)
423           fprintf (outfile, " %s", GET_NOTE_INSN_NAME (XINT (in_rtx, i)));
424         else
425           fprintf (outfile, " %d", XINT (in_rtx, i));
426         sawclose = 0;
427         break;
428
429       case 'u':
430         if (XEXP (in_rtx, i) != NULL)
431           {
432             rtx sub = XEXP (in_rtx, i);
433             enum rtx_code subc = GET_CODE (sub);
434
435             if (GET_CODE (in_rtx) == LABEL_REF)
436               {
437                 if (subc == NOTE
438                     && NOTE_LINE_NUMBER (sub) == NOTE_INSN_DELETED_LABEL)
439                   {
440                     if (flag_dump_unnumbered)
441                       fprintf (outfile, " [# deleted]");
442                     else
443                       fprintf (outfile, " [%d deleted]", INSN_UID (sub));
444                     sawclose = 0;
445                     break;
446                   }
447
448                 if (subc != CODE_LABEL)
449                   goto do_e;
450               }
451
452             if (flag_dump_unnumbered)
453               fputs (" #", outfile);
454             else
455               fprintf (outfile, " %d", INSN_UID (sub));
456           }
457         else
458           fputs (" 0", outfile);
459         sawclose = 0;
460         break;
461
462       case 'b':
463         if (XBITMAP (in_rtx, i) == NULL)
464           fputs (" {null}", outfile);
465         else
466           bitmap_print (outfile, XBITMAP (in_rtx, i), " {", "}");
467         sawclose = 0;
468         break;
469
470       case 't':
471         putc (' ', outfile);
472         fprintf (outfile, HOST_PTR_PRINTF, (char *) XTREE (in_rtx, i));
473         break;
474
475       case '*':
476         fputs (" Unknown", outfile);
477         sawclose = 0;
478         break;
479
480       case 'B':
481         if (XBBDEF (in_rtx, i))
482           fprintf (outfile, " %i", XBBDEF (in_rtx, i)->index);
483         break;
484
485       default:
486         fprintf (stderr,
487                  "switch format wrong in rtl.print_rtx(). format was: %c.\n",
488                  format_ptr[-1]);
489         abort ();
490       }
491
492   switch (GET_CODE (in_rtx))
493     {
494     case MEM:
495       fputs (" [", outfile);
496       fprintf (outfile, HOST_WIDE_INT_PRINT_DEC, MEM_ALIAS_SET (in_rtx));
497
498       if (MEM_EXPR (in_rtx))
499         print_mem_expr (outfile, MEM_EXPR (in_rtx));
500
501       if (MEM_OFFSET (in_rtx))
502         {
503           fputc ('+', outfile);
504           fprintf (outfile, HOST_WIDE_INT_PRINT_DEC,
505                    INTVAL (MEM_OFFSET (in_rtx)));
506         }
507
508       if (MEM_SIZE (in_rtx))
509         {
510           fputs (" S", outfile);
511           fprintf (outfile, HOST_WIDE_INT_PRINT_DEC,
512                    INTVAL (MEM_SIZE (in_rtx)));
513         }
514
515       if (MEM_ALIGN (in_rtx) != 1)
516         fprintf (outfile, " A%u", MEM_ALIGN (in_rtx));
517
518       fputc (']', outfile);
519       break;
520
521 #ifndef GENERATOR_FILE
522     case CONST_DOUBLE:
523       if (FLOAT_MODE_P (GET_MODE (in_rtx)))
524         {
525           char s[30];
526
527           real_to_decimal (s, CONST_DOUBLE_REAL_VALUE (in_rtx), -1);
528           fprintf (outfile, " %s", s);
529
530           real_to_hexadecimal (s, CONST_DOUBLE_REAL_VALUE (in_rtx), -1);
531           fprintf (outfile, " [%s]", s);
532         }
533       break;
534 #endif
535
536     case CODE_LABEL:
537       fprintf (outfile, " [%d uses]", LABEL_NUSES (in_rtx));
538       switch (LABEL_KIND (in_rtx))
539         {
540           case LABEL_NORMAL: break;
541           case LABEL_STATIC_ENTRY: fputs (" [entry]", outfile); break;
542           case LABEL_GLOBAL_ENTRY: fputs (" [global entry]", outfile); break;
543           case LABEL_WEAK_ENTRY: fputs (" [weak entry]", outfile); break;
544           default: abort();
545         }
546       break;
547
548     case CALL_PLACEHOLDER:
549       if (debug_call_placeholder_verbose)
550         {
551           fputs (" (cond [\n  (const_string \"normal\") (sequence [", outfile);
552           for (tem = XEXP (in_rtx, 0); tem != 0; tem = NEXT_INSN (tem))
553             {
554               fputs ("\n    ", outfile);
555               print_inline_rtx (outfile, tem, 4);
556             }
557
558           tem = XEXP (in_rtx, 1);
559           if (tem)
560             fputs ("\n    ])\n  (const_string \"tail_call\") (sequence [",
561                    outfile);
562           for (; tem != 0; tem = NEXT_INSN (tem))
563             {
564               fputs ("\n    ", outfile);
565               print_inline_rtx (outfile, tem, 4);
566             }
567
568           tem = XEXP (in_rtx, 2);
569           if (tem)
570             fputs ("\n    ])\n  (const_string \"tail_recursion\") (sequence [",
571                    outfile);
572           for (; tem != 0; tem = NEXT_INSN (tem))
573             {
574               fputs ("\n    ", outfile);
575               print_inline_rtx (outfile, tem, 4);
576             }
577
578           fputs ("\n    ])\n  ])", outfile);
579           break;
580         }
581
582       for (tem = XEXP (in_rtx, 0); tem != 0; tem = NEXT_INSN (tem))
583         if (GET_CODE (tem) == CALL_INSN)
584           {
585             fprintf (outfile, " ");
586             print_rtx (tem);
587             break;
588           }
589       break;
590
591     default:
592       break;
593     }
594
595   if (dump_for_graph
596       && (is_insn || GET_CODE (in_rtx) == NOTE
597           || GET_CODE (in_rtx) == CODE_LABEL || GET_CODE (in_rtx) == BARRIER))
598     sawclose = 0;
599   else
600     {
601       fputc (')', outfile);
602       sawclose = 1;
603     }
604 }
605
606 /* Print an rtx on the current line of FILE.  Initially indent IND
607    characters.  */
608
609 void
610 print_inline_rtx (outf, x, ind)
611      FILE *outf;
612      rtx x;
613      int ind;
614 {
615   int oldsaw = sawclose;
616   int oldindent = indent;
617
618   sawclose = 0;
619   indent = ind;
620   outfile = outf;
621   print_rtx (x);
622   sawclose = oldsaw;
623   indent = oldindent;
624 }
625
626 /* Call this function from the debugger to see what X looks like.  */
627
628 void
629 debug_rtx (x)
630      rtx x;
631 {
632   outfile = stderr;
633   sawclose = 0;
634   print_rtx (x);
635   fprintf (stderr, "\n");
636 }
637
638 /* Count of rtx's to print with debug_rtx_list.
639    This global exists because gdb user defined commands have no arguments.  */
640
641 int debug_rtx_count = 0;        /* 0 is treated as equivalent to 1 */
642
643 /* Call this function to print list from X on.
644
645    N is a count of the rtx's to print. Positive values print from the specified
646    rtx on.  Negative values print a window around the rtx.
647    EG: -5 prints 2 rtx's on either side (in addition to the specified rtx).  */
648
649 void
650 debug_rtx_list (x, n)
651      rtx x;
652      int n;
653 {
654   int i,count;
655   rtx insn;
656
657   count = n == 0 ? 1 : n < 0 ? -n : n;
658
659   /* If we are printing a window, back up to the start.  */
660
661   if (n < 0)
662     for (i = count / 2; i > 0; i--)
663       {
664         if (PREV_INSN (x) == 0)
665           break;
666         x = PREV_INSN (x);
667       }
668
669   for (i = count, insn = x; i > 0 && insn != 0; i--, insn = NEXT_INSN (insn))
670     {
671       debug_rtx (insn);
672       fprintf (stderr, "\n");
673     }
674 }
675
676 /* Call this function to print an rtx list from START to END inclusive.  */
677
678 void
679 debug_rtx_range (start, end)
680      rtx start, end;
681 {
682   while (1)
683     {
684       debug_rtx (start);
685       fprintf (stderr, "\n");
686       if (!start || start == end)
687         break;
688       start = NEXT_INSN (start);
689     }
690 }
691
692 /* Call this function to search an rtx list to find one with insn uid UID,
693    and then call debug_rtx_list to print it, using DEBUG_RTX_COUNT.
694    The found insn is returned to enable further debugging analysis.  */
695
696 rtx
697 debug_rtx_find (x, uid)
698      rtx x;
699      int uid;
700 {
701   while (x != 0 && INSN_UID (x) != uid)
702     x = NEXT_INSN (x);
703   if (x != 0)
704     {
705       debug_rtx_list (x, debug_rtx_count);
706       return x;
707     }
708   else
709     {
710       fprintf (stderr, "insn uid %d not found\n", uid);
711       return 0;
712     }
713 }
714
715 /* External entry point for printing a chain of insns
716    starting with RTX_FIRST onto file OUTF.
717    A blank line separates insns.
718
719    If RTX_FIRST is not an insn, then it alone is printed, with no newline.  */
720
721 void
722 print_rtl (outf, rtx_first)
723      FILE *outf;
724      rtx rtx_first;
725 {
726   rtx tmp_rtx;
727
728   outfile = outf;
729   sawclose = 0;
730
731   if (rtx_first == 0)
732     {
733       fputs (print_rtx_head, outf);
734       fputs ("(nil)\n", outf);
735     }
736   else
737     switch (GET_CODE (rtx_first))
738       {
739       case INSN:
740       case JUMP_INSN:
741       case CALL_INSN:
742       case NOTE:
743       case CODE_LABEL:
744       case BARRIER:
745         for (tmp_rtx = rtx_first; tmp_rtx != 0; tmp_rtx = NEXT_INSN (tmp_rtx))
746           if (! flag_dump_unnumbered
747               || GET_CODE (tmp_rtx) != NOTE || NOTE_LINE_NUMBER (tmp_rtx) < 0)
748             {
749               fputs (print_rtx_head, outfile);
750               print_rtx (tmp_rtx);
751               fprintf (outfile, "\n");
752             }
753         break;
754
755       default:
756         fputs (print_rtx_head, outfile);
757         print_rtx (rtx_first);
758       }
759 }
760
761 /* Like print_rtx, except specify a file.  */
762 /* Return nonzero if we actually printed anything.  */
763
764 int
765 print_rtl_single (outf, x)
766      FILE *outf;
767      rtx x;
768 {
769   outfile = outf;
770   sawclose = 0;
771   if (! flag_dump_unnumbered
772       || GET_CODE (x) != NOTE || NOTE_LINE_NUMBER (x) < 0)
773     {
774       fputs (print_rtx_head, outfile);
775       print_rtx (x);
776       putc ('\n', outf);
777       return 1;
778     }
779   return 0;
780 }
781
782
783 /* Like print_rtl except without all the detail; for example,
784    if RTX is a CONST_INT then print in decimal format.  */
785
786 void
787 print_simple_rtl (outf, x)
788      FILE *outf;
789      rtx x;
790 {
791   flag_simple = 1;
792   print_rtl (outf, x);
793   flag_simple = 0;
794 }